- Tech Junkie - https://www.techjunkie.com -

How to Create RAID Volumes in OS X El Capitan

Disk Utility received its first significant makeover in years as part of the recent OS X El Capitan update, and while Apple hopes the new design will make the app easier to understand and use, the new version of Disk Utility is missing at least one crucial function: RAID support.
RAID — a redundant array of independent disks [1] — is a technology that allows users to combine multiple physical disks into a single virtual volume in one of several ways that can increase capacity, increase speed, increase redundancy, or some combination of the three. A deeper look at RAID is beyond the scope of this tip (for a quick overview, check out this video [2] from Techquickie‘s Linus Sebastian), but the key point is that the ability to create and manage software RAID volumes — something that was possible in previous versions of Disk Utility — is no longer available in OS X El Capitan.

disk utility raid before os x el capitan [3]

Previous versions of Disk Utility included the ability to create and manage RAID volumes.


While El Capitan’s version of Disk Utility may be missing this important feature, the good news is that users can still perform many RAID functions via Terminal. The process isn’t as simple as the old Disk Utility GUI, but for users running Apple’s latest desktop operating system, it’s the next best thing to investing in third party software SoftRAID [4].
To illustrate how users can manage RAID volumes in OS X El Capitan, we’ll use an example in which we want to create a 2TB RAID 0 volume from two 1TB SSDs, labeled TB1 and TB2. The first step is to determine the disk number of each drive you wish to include in your RAID, as we’ll need this information for the Terminal command that will eventually create the RAID volume. We can obtain this information in one of two ways: via Disk Utility or via the diskutil command line function.
Looking at GUI method first, launch Disk Utility and select the first disk that is destined for your RAID volume. In our example, we’re using two Samsung 840 EVO SSDs, so we’ll select one of the disks, not volumes, from the Disk Utility sidebar on the left. With the disk selected, find the Device box on the right side of the screen and note the disk number. In our case, our SSDs are disk2 and disk3.
disk utility disk info [5]
If you prefer to stick with Terminal, you can run the diskutil command to identify your Mac’s disk numbers. Just launch Terminal and enter the command diskutil list. You’ll get a list of each disk and volume currently connected to your Mac, along with other information such as partition scheme and name. The disk number for each disk is located on the first line of each entry. In our case, we see our 1TB disks with the TB1 and TB2 volumes and we can confirm that we’re working with disk2 and disk3.
terminal diskutil list [6]
Be careful to select and verify the correct disk, as the next steps will erase any data on the drives. If you pick the wrong disk number — something that could be easy to do if you have many attached drives — you could accidentally wipe your data. So, as always, be careful and double-check your information before proceeding.
With the correct disks identified, it’s time to build your RAID volume. Even though the GUI method for creating RAID volumes is now gone in OS X El Capitan, you can still access the basic underlying technology in OS X to perform most functions: appleRAID.
Part of the diskutil command, appleRAID can be used to create and manage RAID 0 (striped), RAID 1 (mirrored), and JBOD (concatenated) volumes. To use it, you’ll need to enter all of the RAID configuration info manually, including the type, name, and file system format.
create raid os x el capitan [7]
Continuing our example, we want to create a 2-disk RAID 0 volume called “Storage” with a Journaled HFS+ file system. Recalling that our two SSDs are disk2 and disk3, we’ll enter this command in Terminal:

diskutil appleRAID create stripe Storage JHFS+ disk2 disk3

The command will process for a few moments, and will automatically mount the new RAID volume when the operation is complete. If you head back to Disk Utility, you’ll now see your new RAID volume listed in the sidebar, although you won’t be able to modify it without returning to the command line.
create raid os x el capitan [8]
As another example, if we instead wanted to create a RAID 1 volume called “Backup,” we’d use this command instead:

diskutil appleRAID create mirror Backup JHFS+ disk2 disk3

There are many additional functions that can be used with the appleRAID command, such as issuing manual or automatic rebuilds, setting timeout values, and adding or removing disks. To see them all, check out the appleRAID section of the diskutil manual page [9].
While these Terminal commands will suffice for simple RAID volumes, it’s important to note that we don’t know what Apple’s future plans are for RAID support in OS X, and that it would be unwise to rely on Apple’s own solutions for mission critical RAID volumes. It is therefore recommended that users with more advanced RAID needs check out third party solutions such as the aforementioned SoftRAID [4] for software-based RAID volumes or, if your Mac supports it, one of the many hardware-based RAID solutions [10].