Fixing Degraded RAID

Mindwatering Incorporated

Author: Tripp W Black

Created: 10/09/2005 at 09:07 PM

 

Category:
OS X Configuration
General

You can use the gui Disk Utility but it's not very intuitive. It's needs a repair button.

The manual command line way:

1. Open a root terminal command window.
2. Type and press enter to run:
diskutil list

The report will show three disks, probably "/dev/disk0", "/dev/disk1", and "/dev/disk2". The latter is not a real/physical harddrive, but is the mirrored set made up from the other two being mirrored. That one will have the name of your disk.

3. If that was "/dev/disk2", type the following:

diskutil checkRAID disk2

Under "status", you will see "degraded" and one of the two "slices" (under the # column - e.g. #0 or #1) will have "Failed", "Missing", or nothing (the latter, if erased or new drive) for a status code.

4. If disk0 had a status of "OK" and disk1 was the "bad" one; type the following command to repair/rebuild the RAID:

diskutil repairMirror disk2 1 disk0 disk1

Description of parts of this command:

repairMirror - this is verb - the action, we want to rebuild/repair a mirror
disk2 - this is the mirrored set/virtual drive that is the RAID
1 - this is the "slice", the drive # is step 3 above that was "bad"
disk0 - this is the "good" drive
disk1 - this is the "bad" drive being rebuilt.

This will like take an hour to several hours to complete. Check the status by typing:
diskutil checkRaid disk2

The previously "bad" slice will have a %number under it's status with the percentage done.

previous page

×