Twitter Facebook Google Plus Linked in

How to Rebuild the RAID 1 in Mac OS 10.11 (El Capitan)

This article provides instructions to rebuild a RAID 1 using the Mac OS Terminal.



IMPORTANT! Before proceeding, please safely eject and then physically disconnect all external storage devices (external hard drives, SD cards, etc) from your Mac computer, except the device on which you want to create the RAID.

 

IMPORTANT! Do not attempt the following while your Mac is in Recovery Mode. Proceed only when your computer has started normally.

 

When one drive in a RAID 1 fails, it may need to be replaced. Please follow this procedure to check the RAID status and rebuild the RAID 1:

 

Step 1 - Check the RAID status

These steps will demonstrate how to identify which drive has failed from the array:

  1. From the Desktop, select Go from the top menu bar, then Utilities > Terminal.

  2. Type the following:

diskutil checkraid
(See Figure A in the picture below.)
The Status for the RAID displays that it is Degraded.
The Status for the disk may display Missing/Damaged or Failed.

  1. Please note the Unique ID of the RAID (Figure B), the Device Node disk number (Figure C), and the UUID from the failed disk (Figure D) for later use. You will need this data in order to remove the failed drive from the RAID, as well to rebuild the RAID.

 
 

Step 2 - Remove the failed drive from the RAID 1

  1. In Terminal, type the following commands:
    diskutil appleraid remove (Figure 1) UUID of the failed drive (Figure 2) Device Node (Figure 3).
    Example:

diskutil appleraid remove 148AC6C0-6105-4246-978B-CC729CCEEF9E disk3


Disk Utility will now remove the failed drive from the RAID.

 
  1. Discover which of the two physical hard drives is the failed one.
    --If the LED on the unit is red or blinking, that is most probably the problem drive.
    --If you are not sure which drive is faulty, follow this procedure:
    a. Safely remove the RAID by dragging it to the trash can.
    b. Disconnect the device from power.
    c. Physically disconnect one of the two drives from the device.
    d. Power the device on again.
    e. Repeat the diskutil checkraid command in Terminal as explained above.
    Repeat steps a-e if necessary to confirm which one is failed.

 
  1. Power down the storage device.

  2. Physically remove the failed drive from the storage device.

 

Step 3 - Rebuild the RAID 1

 

Once you have a new drive:

 
  1. Power down the storage device.

  2. Physically insert the new drive into the available slot on the storage device.

  3. Power the storage device on.
    A message may appear, asking to initialize the drive.

  4. Select Initialize.

  5. From the Desktop, select Go from the top menu bar, then Utilities > Terminal.

  6. Type the following:
    diskutil list

  7. The new drive’s TYPE NAME will be blank (Figure 2). Please note the IDENTIFIER disk number (Figure 3).

     

  8. Type the following:
    diskutil addtoRAID member (Figure 1) IDENTIFIER of new drive (Figure 2) RAID Unique ID (Figure 3)
    then press Enter.  
    Reminder: The RAID Unique ID was seen in Step 1 and was indicated as Figure B.
    Example:
    diskutil addtoRAID member disk2 53667811-3184-46D6-AA33-4A0D93D5F91A


     

  9. A message will indicate that the adding process has begun.
    Note: Just because the message “Finished RAID operation on disk_” appears, this does not mean the RAID rebuild has concluded. The rebuilding may require several hours to complete.
    To facilitate the rebuilding:
    --Leave the storage device powered on for 24 consecutive hours.
    --Set your Mac computer’s Energy Saver preferences to Never sleep until the 24 hours.


Step 4 (Optional) - Check the RAID rebuilding progress

If you wish to check the RAID rebuilding progress, open the Terminal, then type:
diskutil checkraid

The figure below shows the rebuilding progress:

   

Once the rebuilding finishes, the checkraid tool will display the status of both disks as Online.