Using Terminal to create a RAID 0 array, also known as a striped array, is an easy process that can be performed by any Mac user. No special skills are necessary, although you may find the Terminal app a bit strange if you've never used it before.
Before We Begin
We're going to create a striped RAID array to increase the speed at which data can be written to and read from a storage device. Striped arrays provide a speed increase, but they also increase the possibility of failure.
A failure of any single drive that makes up a striped array will cause the entire RAID array to fail. There's no magical method to recover data from a failed striped array, which means you should have a very good backup system that you can use to restore data, should a failure of the RAID array occur.
Getting Ready
In this example, we're going to use two disks as slices of the RAID 0 array. Slices are just the nomenclature used to describe the individual volumes that make up the elements of any RAID array.
You could use more than two disks; adding more disks will increase performance as long as the interface between the drives and your Mac can support the additional speed. But our example is for a basic minimum setup of two slices to make up the array.
What Type of Drives Can Be Used?
Just about any drive type can be used; hard drives, SSDs, even USB flash drives. Although not a strict requirement of RAID 0, it's a good idea for the drives to be identical, both in size and model.
Back Up Your Data First
Remember, the process of creating the striped array will erase all data on the drives that will be used.
Make sure you have a current backup before you begin.
Creating the Striped RAID Array
It's possible to use a partition from a drive that has been divided into multiple volumes. But while it's possible, it's not recommended. It's better to dedicate an entire drive to be a slice in your RAID array, and that's the approach we'll take in this guide.
If the drives you're planning to use haven't yet been formatted as a single volume using OS X Extended (Journaled) as the file system, please use one of the following guides:
Format a Mac's Drive Using Disk Utility (OS X El Capitan or later)
Format a Mac's Drive Using Disk Utility (OS X Yosemite or earlier)
Once the drives are properly formatted, it’s time to combine them into your RAID array.
- Launch Terminal, located at /Applications/Utilities/.
- Enter the following command at the prompt in Terminal. You can copy/paste the command to make the process a bit easier:
diskutil list
- This will cause Terminal to display all of the drives connected to your Mac, along with the drive identifiers we'll need when creating the RAID array. Your drives will be displayed by the file entry point, usually /dev/disk0 or /dev/disk1. Each drive will have its individual partitions displayed, along with the size of the partition and the identifier (the name).
The identifier will likely not be the same as the name you used when you formatted your drives. As an example, I formatted two drives, giving them the name Slice1 and Slice2. In the image above, you can see that Slice1’s identifier is disk2s2, and Slice2's is disk3s2. It's the identifier that we'll use on the next page to actually create the RAID 0 array.
Published: 9/27/2015
Updated: 2/23/2016