Raid software recovery
Hello everybody ! I have setup a test station where I'm simulating RAID crash to help me to understand how recovery a RAID, but I have questions :
Infos about my test station :
-------------------------------------------------------------------
Red Hat Linux 8.0
Kernel 2.4.18-14
raidtools-1.00.2
-------------------------------------------------------------------
Question 1.
-----------------
raiddev /dev/md0
raid-level 1
nr-raid-disks 2
nr-spare-disks 0
chunk-size 4
persistent-superblock 1
device /dev/hdc1
raid-disk 0
device /dev/hda5
raid-disk 1
When I'm simulating the crash of the disk hdc1 in a RAID-1 and that I reboot, the system don't want to complete the boot. That is indicating something "Invalid argument /dev/md0 is not a RAID0 or LINEAR array". Why it is not booting in "degraded mode". So, I have to enter the root password to enter a "maintenance mode". But how recover the RAID ? I can't do execute raidstart /dev/md0 because this error "Invalid argument /dev/md0 is not a RAID0 or LINEAR array" keep coming. So, how I'm suppose to execute my "raidhotadd" </dev/something> ?
Finally I have change my /etc/raidtab for that...
raiddev /dev/md0
raid-level 1
nr-raid-disks 2
nr-spare-disks 0
chunk-size 4
persistent-superblock 1
device /dev/hda5
raid-disk 1
device /dev/hdc1
failed-disk 1
...and the system has finally reboot in degraded mode ! I don't understand. Personnally I was thinking that the file should have be edited just like that :
raiddev /dev/md0
raid-level 1
nr-raid-disks 2
nr-spare-disks 0
chunk-size 4
persistent-superblock 1
device /dev/hdc1
failed-disk 1
device /dev/hda5
raid-disk 1
Why the fact of deplacing the entry about the failed drive to the bottom of the /etc/raidtab is important ?
Question 2.
--------------
If after a drive crash I'm adding (with the raidhotadd command) to the RAID a partition which was not listed in the /etc/raidtab initially, have me to edit the /etc/raidtab to add the new drive like listed by /proc/mdstat after the RAID reconstruction ?
|