Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

madhatmac

macrumors newbie
Original poster
Jun 25, 2013
27
0
Hi folks,

I may need to set up a RAID mirror using Terminal in El Capitan (never used Terminal before but it doesn't look too hard...). Anyway, in previous Disk Utilities, it let you select options for RAID Block Size (16K, 32K, 64K, 128K & 256K options) and to select "Automatically rebuild RAID mirror sets" if desired.

So, what are the default settings when running a basic Terminal command like:
diskutil appleRAID create mirror [RAIDname] JHFS+ disk2 disk3

And, if one wanted to alter these settings, how do you go about it?

Thank you
 
I do not know much about this topic, so you may have to do a bit more research yourself (or play around with the settings). If you have not done so, read the manual page first: here or in Terminal with man diskutil. Apparently, there is no option to choose the RAID block size and automatic rebuilding upon creation with diskutil. Disk Utility used 32K as the default and automatic rebuilding was not selected by default, so it is likely that diskutil will maintain the same defaults. I have no idea about the block size, however, you can enable automatic rebuilding with the command:
Code:
diskutil ar update autorebuild 1 [raid volume]
 
Hi folks,

I may need to set up a RAID mirror using Terminal in El Capitan (never used Terminal before but it doesn't look too hard...). Anyway, in previous Disk Utilities, it let you select options for RAID Block Size (16K, 32K, 64K, 128K & 256K options) and to select "Automatically rebuild RAID mirror sets" if desired.

So, what are the default settings when running a basic Terminal command like:
diskutil appleRAID create mirror [RAIDname] JHFS+ disk2 disk3

And, if one wanted to alter these settings, how do you go about it?

Thank you
http://www.tekrevue.com/tip/create-raid-el-capitan/
 
  • Like
Reactions: satcomer
One more question...

If a drive in the mirror set were to fail, how would you via Terminal:

- Add a replacement drive to the set
- Rebuild the set so the data is on the new drive

Thank you
 
One more question...

If a drive in the mirror set were to fail, how would you via Terminal:

- Add a replacement drive to the set
- Rebuild the set so the data is on the new drive

Thank you

See the manual page I posted above. If you want to get comfortable with Terminal then you should get used to the built-in manuals of CLI programs, because they can be incredibly helpful.
Code:
diskutil ar remove [old device] [raid volume]
diskutil ar add member [new device] [raid volume]


This should take care of things automatically, including rebuilding. However, if this does not work then you need to enable auto-rebuilding as I posted above (this setting won't change when you add a new member), or manually invoke:
Code:
diskutil ar repairmirror [raid volume] [new device]


You can always find the device identifiers with:
Code:
diskutil list          #to find the identifier of the device that you want to add, like disk5
diskutil ar list       #to find the identifier of the raid volume and individual disks for removal
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.