question Bootable Raid1 Reconstruction Help

bearbo

What is this storage?
Joined
Aug 5, 2011
Messages
1
I think I need some help with mdadm RAID1 reconstruction.

Our server had 4 hard drive, /dev/sda, /dev/sdb, /dev/sdc, /dev/sdd. sdc and sdd are data drives, and sda and sdb were in RAID1 configurations, created using mdadm, as the boot disk. Recently sda has failed, and the /proc/mdstat showed:
Personalities : [raid1]
md_d0 : active raid1 sda[0]
488386496 blocks [2/1] [U_]

unused devices: <none>

Although sda was the failed one, it seems that the drive was suddenly not detected by the SATA controller, so it had somehow bumped sdb to sda. I don't really understand why/how that happened. Anyway, I found a used, but known good hard drive of the same capacity, and replaced drive. But upon rebooting, it seems that the OS (CentOS 5.6) no longer remembers that there was a RAID1, and mounted sdb by itself, instead. And now /proc/mdstat shows:

[root@polysep ~]# cat /proc/mdstat
Personalities :
unused devices: <none>
[root@server ~]#

It seems the /etc/mdadm.conf is still there:

[root@server ~]# cat /etc/mdadm.conf
ARRAY /dev/md_d0 level=raid1 num-devices=2 UUID=36aab33b:56203129:39b88797:173ebf4c
[root@server ~]#

And sdb still remembers that it was part of a RAID1:

[root@server ~]# mdadm --examine /dev/sdb
/dev/sdb:
Magic : a92b4efc
Version : 0.90.00
UUID : 36aab33b:56203129:39b88797:173ebf4c
Creation Time : Thu Nov 25 15:10:18 2010
Raid Level : raid1
Used Dev Size : 488386496 (465.76 GiB 500.11 GB)
Array Size : 488386496 (465.76 GiB 500.11 GB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 0

Update Time : Mon May 16 16:39:33 2011
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Checksum : 3eca4e92 - correct
Events : 166


Number Major Minor RaidDevice State
this 1 8 16 1 active sync /dev/sdb

0 0 8 0 0 active sync /dev/sda
1 1 8 16 1 active sync /dev/sdb
[root@server ~]#


So my question is how can I recreate/reconstruct/resync the RAID while avoid/minimize down time?

Any help is appreciated!
 
Top