Innovation

How to manage RAID volumes in El Capitan: An intermediate guide

Jesus Vigo shows you the commands necessary to manage RAID volumes in OS X at an intermediate level. Building concatenated sets, rebuild/restoration settings and adding/deleting volumes from a RAID.

Image: Jesus Vigo

As touched upon in a previous article, one of the biggest changes in El Capitan - Disk Utility - saw a radical change from the app OS X users had come to know and rely upon to make changes to RAID, including the creation and management of arrays used in OS X.

The change in RAID management came in the form of being completely stripped out of Disk Utility and instead, left solely to be managed via Terminal.

Continuing where the beginner article left off, this intermediate level article will focus on managing RAID array settings, along with the settings necessary to invoke a rebuild of degraded arrays and configuring a concatenated set.

Creating a concatenated set

  1. Launch Terminal and execute the following command to obtain the disk IDs for each disk you wish to include in the set since they will be needed to complete the process.

diskutil list

(Figure A)

Image: Jesus Vigo

    2. After making a note of the disk IDs that will be included in the concatenation, enter the command below which will effectively create the concatenated set based on the disks listed.

    diskutil appleRAID create concat VolumeName JHFS+ diskID1 diskID2 diskID3 diskID4

    (Figure B)

    Image: Jesus Vigo

      3. To verify the command executed correctly, enter the following command for a complete readout of the current settings of the drives in the set. This command can also be used to read the RAID settings, as well as, display the Universally Unique Identifier (UUID) for each disk which may be used as an alternative to the diskID in step 1 above.

      diskutil listRAID

      (Figure C)

      Image: Jesus Vigo

      NOTE: Unlike striped arrays (RAID 0) or mirrored arrays (RAID 1) which feature performance and data redundancy respectively, concatenated sets offer neither of those benefits natively. Concatenation uses multiple hard disks of various sizes and speeds to span across all the included disks in the set, so as to appear as one large volume.

      As each drive is filled, the writing process will continue on the next disk and so on until the volume is filled. Moreover, if using disks of different speeds, performance will slow down when data is read from/written to the slower disk(s). Lastly, there is no native redundancy built-in to concatenated sets so in the event of a disk failure, the data stored on the disk that failed will be lost.

      Adding a new disk (or hot spare) to a RAID array

      1. Install the new disk, then power on your computer. Unless hot swapping is available for your Mac, always add/remove disks when the Mac is powered off.
      2. Launch the Terminal and enter the same command used in step 3 in the above section to display the UUID of a RAID array. You will also need to run the command from step 1 in the above section in order to determine the diskID assigned to the newly installed disk.
      3. Armed with both those bits of information, enter the following command to add the new disk to the existing array.

      diskutil appleRAID add member diskID UUID_of_RAID_ARRAY

      (Figure D)

      Image: Jesus Vigo

      NOTE: Conversely, the "member" argument may be substituted for "spare" to add a new disk as a hot spare instead. A hot spare will not be immediately added to the array, however, in the event of a degraded status in the array, the hot spare will be automatically added and the array rebuilt to ensure the status reverts back to online or non-degraded.

      Removing a failed disk from the RAID array

      1. Uninstall the failed disk, then power on your computer. Unless hot swapping is available for you Mac, always add/remove disks when the Mac is powered off.
      2. Launch the Terminal and enter the same command used in step 3 in the above section to display the UUID of a RAID array. You will also need to run the command from step 1 in the above section in order to determine the diskID assigned to the newly installed disk.
      3. Armed with both those bits of information, enter the following command to remove the failed disk from the existing array.

      diskutil appleRAID remove member UUID_of_FAILED_DRIVE UUID_of_RAID_ARRAY

      (Figure E)

      Image: Jesus Vigo

      NOTE: The removal of a failed disk from the RAID array should be done only after first physically uninstalled the disk from your Mac and after a new disk is installed as a replacement — both physically and via Terminal.

      Set mirrored RAID array to autorebuild

      1. Launch Terminal and enter the following command to view your RAID configuration.

      diskutil appleRAID list

      (Figure F)

      Image: Jesus Vigo

        2. Find the Rebuild line, by default, it should be listed as manual. This means in the event of degradation (loss of a drive), simply removing the failed drive and installing a new one will not cause for the array to rebuild itself automatically. To change this setting to allow for automatic rebuilding, enter the following command.

        diskutil appleRAID update AutoRebuild 1 UUID_of_RAID_ARRAY

        (Figure G)

        Image: Jesus Vigo

          3. To verify that the rebuild setting has been modified, reenter the command from step 1 to view the RAID configuration. If executed correctly, the rebuild status should now read as "automatic."

          Did you spot an error in the syntax? Or is there a better way to execute the same commands? Let us know in the comments down below.

          Also see

          About Jesus Vigo

          Jesus Vigo is a Network Administrator by day and owner of Mac|Jesus, LLC, specializing in Mac and Windows integration and providing solutions to small- and medium-size businesses. He brings 19 years of experience and multiple certifications from seve...

          Editor's Picks

          Free Newsletters, In your Inbox