Adding the raid partitions back into the md device – Dell Software RAID with Red Hat Enterprise Linux4 User Manual

Page 9

Advertising
background image

Software RAID with Red Hat Enterprise Linux 4

7

Adding the RAID Partitions Back Into the md Device

Next, add the partitions back into each RAID device.

To add partition sdb1 back into the md0 device and to rebuild the data on that partition,
use the following command:

mdadm –a /dev/md0 /dev/sdb1

While the partition is rebuilding, track the status by running the watch cat /proc/mdstat
command, which displays the status and percentage of rebuilding completed. The status is
displayed similar to the following:

md2 : active raid1 sdb3[2] sda3[0]

5116608 blocks [2/1] [U_][=>..............] recovery = 7.7%

(397888/5116608) finish=1.7mins

Once the rebuilding is finished, watch cat /proc/mdstat shows the following output
for the example device:

md0 : active raid1] sda1[0] sdb1[1]

104320 blocks [2/2] [UU]

Use the mdadm –a command to add each partition back into its respective RAID device.

Once all the partitions have been added, run the GRUB commands discussed in “Preparing the
System for Drive Failure” to install GRUB on
the MBR of the new disk. After this step,
the RAID configuration will be fully restored.

Advertising