Rebuilding Raid1 array

Having problems getting this to work…

I originally had openSUSE 10.2 running as a simple fileserver with 2 software RAID 1 arrays. Things were working fine, until the system drive (a small, cheap 10GB IDE drive) died.

I put in a new IDE drive and have installed openSUSE 11.2 on it without a problem. Problem now is that I need to get the RAID arrays up and running again. I had used YAST to build the arrays originally under 10.2, but it’s unclear to me how to reconstruct previously functioning software RAID arrays.

I tried this with one pair of the drives. They are 2 500GB SATA drives on a PCI SATA adapter:

# mdadm --assemble /dev/md0 /dev/sdb1 /dev/sdc1
mdadm: failed to add /dev/sdc1 to /dev/md0: Invalid argument
mdadm: failed to add /dev/sdb1 to /dev/md0: Invalid argument
mdadm: /dev/md0 assembled from 0 drives - not enough to start the array.

Here is output of fdisk -l :


# fdisk -l /dev/sdb
 
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x69617220
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       60800   488375968+  fd  Linux raid autodetect


# fdisk -l /dev/sdc
 
Disk /dev/sdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0d646961
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1       60800   488375968+  fd  Linux raid autodetect


Any help, tips, guidance, suggestions, etc. would be appreciated.

Many thanks!

Okay, did some investigating.

Based on some instructions here:

http://www.mail-archive.com/linux-raid@vger.kernel.org/msg10381.html

I’m trying this out on one of the arrays (and I have a backup of it in case of failure).


# /sbin/mdadm -C /dev/md0 --verbose -l1 -n2 /dev/s
db1 /dev/sdc1
mdadm: /dev/sdb1 appears to contain a reiserfs file system
    size = 488375872K
mdadm: /dev/sdb1 appears to be part of a raid array:
    level=raid1 devices=2 ctime=Thu Dec 17 13:38:25 2009
mdadm: /dev/sdc1 appears to contain a reiserfs file system
    size = 488375872K
mdadm: /dev/sdc1 appears to be part of a raid array:
    level=raid1 devices=2 ctime=Thu Dec 17 13:38:25 2009
mdadm: size set to 488375872K
Continue creating array? y
mdadm: array /dev/md0 started.

# more /proc/mdstat
Personalities : [raid1] 
md0 : active raid1 sdc1[1] sdb1[0]
      488375872 blocks [2/2] [UU]
      >....................]  resync =  0.0% (191936/488375872) finish=254.3min
 speed=31989K/sec
      
unused devices: <none>


will keep tabs on the rebuild and see what happens…

finger crossed!