Hello.  I have recently started using the raidtools-0.90 package with RH
6.1 (2.2.12-20 kernel).  So far, I am only using RAID level 1, using two
identical IDE drives.  I have been able to successfully configure my
RAID devices.  However, I have some questions regarding the correct way
to recover from a HD failure of some kind.

First, I have a RAID 1 setup in which one of the IDE drives was
removed.  When raidstart is called, it reports that not all disks are
operational and that no spare disks are available to reconstruct the
array, and thus it continues in degraded mode.

My /proc/mdstat file reports:
read_ahead 1024 sectors
md2 : active raid1 hda5[0] 1435264 blocks [2/1] [U_]
md0 : active raid1 hda6[1] 1229632 blocks [2/1] [_U]
md1 : active raid1 hda7[1] 511936 blocks [2/1] [_U]
unused devices: <none>

I have since replaced the missing disk.  The disk used to be hdb, but it
is now hdc.  I modified my /etc/raidtab file to use hdc partitions
instead of partitions on hdb.  The hdc partitions in the /etc/raidtab
file are all identical in size to the partitions on hda (i.e., /dev/hdc5
= /dev/hda6).

The corresponding /etc/raidtab is:

Personalities : [raid1] raiddev             /dev/md0
raid-level                  1
nr-raid-disks               2
chunk-size                  64k
persistent-superblock       1
nr-spare-disks              0
    device          /dev/hdc5
    raid-disk     0
    device          /dev/hda6
    raid-disk     1
raiddev             /dev/md1
raid-level                  1
nr-raid-disks               2
chunk-size                  64k
persistent-superblock       1
nr-spare-disks              0
    device          /dev/hdc6
    raid-disk     0
    device          /dev/hda7
    raid-disk     1
raiddev             /dev/md2
raid-level                  1
nr-raid-disks               2
chunk-size                  64k
persistent-superblock       1
nr-spare-disks              0
    device          /dev/hda5
    raid-disk     0
    device          /dev/hdc1
    raid-disk     1



I am trying to get the raidtools to recreate each of the raid devices
using the intact information on /dev/hda.  For instance, I want to
rebuild /dev/md2 by copying the data on /dev/hda5 to /dev/hdc1 and then
build /dev/md2 using /dev/hda5 and /dev/hdc1.

I thought of using mkraid, but it complains about the existing
superblock information on /dev/hda5.

So, my question is, what do I need to do in order to rebuild /dev/md2?


Second (related question).  I am looking for a good way to test a RAID 1
array.  I tested the above RAID 1 array by unplugging the IDE controller
cable from one of the drives while the system was running.  This didn't
immediately crash the system, but the system did get bogged down trying
to access the removed drive.  After rebooting the system, the RAID 1
arrays began running in degraded mode, but the system otherwise operates
fine.  I am wondering if there is a better way to test the operation of
a RAID array that what I did.  I was expecting the system to recognize
that one of the physical disks in the RAID array was missing, but to
then continue to operate in degraded mode.  The messages that were
reported appeared to indicate that the system would continue in degraded
mode, but errors continued to come up as the system attempted to
communicate with the disk that had been removed.   These errors slowed
the operation of the system necessitating the reboot.  In the real world
however, the disk is not going to be unplugged but rather is going to
develop some sort of physical damage or be otherwise unreadable.  I am
wondering if the errors that were slowing my system were more related to
my method of unplugging the IDE controller cable than they were to any
limitations of the raidtools software.  So, is there a better way to
test the ability of a RAIDed system to survive a disk failure?


Thank you,
Blair



Reply via email to