Created
January 9, 2012 01:15
-
-
Save acidprime/1580401 to your computer and use it in GitHub Desktop.
Create Software RAID
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
declare -x MIRROR_VOL="Server HD" | |
declare -x RAID_VOL="/Volumes/Server HD" | |
declare -x RAID_VOL2="/Volumes/Server HD 2" | |
declare -x diskutil="/usr/sbin/diskutil" | |
# Name as MirroredVolume for Novice users in disk utility | |
$diskutil createRAID mirror "ServerRAID" JHFS+ "$RAID_VOL" "$RAID_VOL2" | |
# Rename to HD Name | |
$diskutil renameVolume /Volumes/ServerRAID "$MIRROR_VOL" | |
# Set AutoRebuild | |
$diskutil appleRAID update AutoRebuild 1 "/Volumes/$MIRROR_VOL" | |
$diskutil enableJournal "/Volumes/$MIRROR_VOL" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment