How Do I rebuild a Failed Redundant Boot drive?
How do I know one of my boot drives has failed?
Open the Disk Utility and scroll down to your RAID devices.
IF one of them has failed you will see DEGRADED.
Alternately you may open a terminal and enter the command "cat /proc/mdstat"
This will list the current status of all RAIDs you have in your system. for md0 and md1 you will see [_U] or [U_] indicating a drive is missing out of the array.
How do I rebuild my redundant boot drives?
When one of your redundant boot drives fail follow these steps to bring it back:
NOTE You will need a replacement HDD the EXACT same size of the HDD you are replacing.
- Turn off your machine
- Replace the failed boot drive with the exact same capacity HDD. Remove the old drive from the Boot drive bracket and install its replacement.
- Boot in the OS, and open disk utility. Note the label of your replacement HDD (i.e /dev/sdb)
- You must copy the partition scheme from your current boot drive to the replacement before we can rebuild the array.
- To do this you will use the following command:
* sfdisk -d /dev/sd[live boot drive] | sfdisk /dev/sd[replacement boot drive] -f * Where live boot drive is the current boot disk, /dev/sda and the replacement boot drive is /dev/sdb. These device names will be accurate as long as these are only devices in the motherboard SATA ports. * Note that this command takes the partition scheme on the first device and completely copies it onto the second device. * IF THERE IS ANY DATA ON THE SECOND DEVICE IT WILL BE DELETED. MAKE SURE YOU DO NOT MIX UP YOUR CURRENT BOOT DRIVE AND THE REPLACEMENT
- You can verify to see this done correctly by viewing the partitions in the disk utility.
- Alternatively you can use "parted /dev/sdb print", if using command line.
- Now you must reattach your replacement partitions to the live boot ones.
* Open terminal and enter cat /proc/mdstat. Note which disk is live in the array (typically /dev/sda or /dev/sdb) and match the corresponding partions. * For example, If /dev/sda is the live disk you will want to attach /dev/sdb1 to /dev/sda1 and /dev/sdb2 to /dev/sda2. where /dev/sdb is the replacement disk * This done using these commands: (following the same example as above) * mdadm --manage /dev/md0 --add /dev/sdb1 * mdadm --manage /dev/md1 --add /dev/sdb2 * These device nodes may be different on your system - double check them with "cat /proc/mdstat" to be sure.
- The rebuild process will begin and you can view the TOC via "cat /proc/mdstat" or for updates "watch cat /proc/mdstat"
- Progress can be viewed as a progress bar in the Disk Utility or by running the command "watch cat /proc/mdstat" which will give you the status of the RAIDs every 2 seconds.
- Once your drives are done syncing you have successfully rebuilt your redundant boot drives