Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm running 10.04 LTS Desktop 64bit, with two identical disks set up as a raid 1 array. Last week I kicked the power lead from the back of the PC Using the rescue disk to repair grub, I can now boot from sda2 mounted at /, while sdb2 seems OK but not mounted.

The swap partitions, sda1 & sdb1, still appear to be part of raid mdb1.

Can someone kindly please advise me how to reassemble the boot/data part of the raid, using sda2 as the master disk and overwriting sdb2?

Everything on sda2 has been backed up. Mdadm & mdstat output follows.

Mick

mick@mick-desktop:~/Desktop$ sudo mdadm -E /dev/sd[ab]2
mdadm: No md superblock detected on /dev/sda2.
mdadm: No md superblock detected on /dev/sdb2.
mick@mick-desktop:~/Desktop$ sudo mdadm -E /dev/sd[ab]1
/dev/sda1:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : 6e5f04e7:a2c2824e:4190d0c1:868b9bfb
  Creation Time : Thu Jun 17 11:59:49 2010
     Raid Level : raid1
  Used Dev Size : 7812032 (7.45 GiB 8.00 GB)
     Array Size : 7812032 (7.45 GiB 8.00 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 1

    Update Time : Thu Aug  2 11:58:37 2012
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0
       Checksum : 1f150e2e - correct
         Events : 7340


      Number   Major   Minor   RaidDevice State
this     0       8        1        0      active sync   /dev/sda1

   0     0       8        1        0      active sync   /dev/sda1
   1     1       8       17        1      active sync   /dev/sdb1
/dev/sdb1:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : 6e5f04e7:a2c2824e:4190d0c1:868b9bfb
  Creation Time : Thu Jun 17 11:59:49 2010
     Raid Level : raid1
  Used Dev Size : 7812032 (7.45 GiB 8.00 GB)
     Array Size : 7812032 (7.45 GiB 8.00 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 1

    Update Time : Thu Aug  2 11:58:37 2012
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0
       Checksum : 1f150e40 - correct
         Events : 7340


      Number   Major   Minor   RaidDevice State
this     1       8       17        1      active sync   /dev/sdb1

   0     0       8        1        0      active sync   /dev/sda1
   1     1       8       17        1      active sync   /dev/sdb1
mick@mick-desktop:~/Desktop$ cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md1 : active raid1 sdb1[1] sda1[0]
      7812032 blocks [2/2] [UU]

unused devices: 
mick@mick-desktop:~/Desktop$ 

share|improve this question
    
Can you add the output of sudo sfdisk -d /dev/sd[ab] (as code so it's formatted OK)? I suspect the rescue disk has changed /sda2 to be simply a Linux (type 83) partition rather than Raid (type FD). –  StarNamer Aug 16 '12 at 17:39
    
` # partition table of /dev/sda unit: sectors /dev/sda1 : start=609517568, size= 15624192, Id=fd /dev/sda2 : start= 2048, size=609515520, Id=fd, bootable /dev/sda3 : start= 0, size= 0, Id= 0 /dev/sda4 : start= 0, size= 0, Id= 0 # partition table of /dev/sdb unit: sectors /dev/sdb1 : start=609517568, size= 15624192, Id=fd /dev/sdb2 : start= 2048, size=609515520, Id=fd, bootable /dev/sdb3 : start= 0, size= 0, Id= 0 /dev/sdb4 : start= 0, size= 0, Id= 0 mick@mick-desktop:~/Desktop$` –  ComfortablyDumb Aug 17 '12 at 18:07

1 Answer 1

The suggestion here is that you may be able to simply recreate the RAID array by doing mdmadm --create.. and mdadm --assemble. But unless I had a full backup, I'd do it the slow way. I.e.

  1. Create an array with sdb1+missing
  2. Create the filesystem on sdb1
  3. Copy everything from sda1 to sdb1
  4. Fix up fstab on sdb1 to mount the raid device as root (it probably points to sda1)
  5. Reboot using sdb1 (which should be recognized as 1-drive RAID mirror)
  6. Add sda1 to existing RAID
  7. Wait for rebuild to finish...

Good luck.

share|improve this answer
    
Thanks for your response. I'll give this a go in the next few days & let you know how I get on! –  ComfortablyDumb Aug 19 '12 at 11:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.