Account Links: Cart | Your Account | Logout

Skip to content

Red Hat Knowledgebase

Red Hat Knowledgebase Search:

Updated Within the Last:

New Solutions within the last day New Solutions within the last week New Solutions within the last month

Browse by topics:


Click to View a Topic
Red Hat Enterprise Linux > Hardware > Issue <<  25 of 403 >>

Solution Tools:


Email a Solution Postcard Printer version Submit a comment on this answer Update notifications Request an answer Back

Article Reference

Article ID: 3637
Last update: 08-20-04
Issue:
1 of 2 (RAID 1) hard drives in my system failed and a new hard drive has been installed. How do I get the disks re-mirrored with Red Hat Enterprise Linux 3?
Resolution:
The raidhotadd command will rebuild your RAID array once the drive has been replaced.

Before running raidhotadd, you need to determine the layout of your RAID array. You can view this by looking at the /etc/raidtab file, for example:

 
# cat /etc/raidtab

       raiddev /dev/md0
           raid-level              1
           nr-raid-disks           2
           persistent-superblock   0
           chunk-size              8

           device                  /dev/hda1
           raid-disk               0
           device                  /dev/hdb1
           raid-disk               1
        


The above example shows that your RAID device is /dev/md0 and consists of two partitons: /dev/hda1 and /dev/hdb1. The RAID level on this device is RAID 1.

Assuming that the second drive in the RAID array (/dev/hdb) failed and was replaced. To rebuild the mirror for the RAID device, you need to issue the following command:

 
raidhotadd /dev/md0 /dev/hdb1
        


This will start the rebuild process on that RAID device. If you want to watch the progress of the rebuild, you can issue the command:

 
watch cat /proc/mdstat
       


Repeat this process for each RAID device in your system.

NOTE: Before performing these steps please make sure your replacement hard drive is properly partitioned using tools such as fdisk. Also, make sure that the partitions on the disk are of type Linux raid auto (type 0xfd). Otherwise, the rebuild operation will fail!


How well did this entry answer your question?


good wrong incomplete out of date
Red Hat Enterprise Linux > Hardware > Issue <<   25  of  403  >>