Last active
October 13, 2016 09:48
-
-
Save roboyoshi/7d52fbc46b38ac5ed2de0c5c465b4be2 to your computer and use it in GitHub Desktop.
This file contains 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
# Single Disk Setup ! | |
# OpenZFS on OSX Version 1.30 | |
# Download: https://openzfsonosx.org/wiki/Downloads | |
# ------------------------------------------------- | |
# Sources: | |
# https://openzfsonosx.org/wiki/zpool | |
# ------------------------------------------------- | |
diskutil list | |
echo "Disk = disk#" | |
read -p "Disk = " disk | |
diskutil unmount /dev/${disk} | |
diskutil unmountDisk /dev/${disk} | |
sudo diskutil partitiondisk /dev/${disk} GPTFormat ZFS %noformat% 100% | |
echo "--------------------" | |
echo "Name your zpool!" | |
read -p "Name = " name | |
sudo zpool create -f \ | |
-o ashift=12 \ | |
-O compression=lz4 \ | |
-O casesensitivity=mixed \ | |
-O atime=off \ | |
-O normalization=formD \ | |
${name} /dev/${disk}s2 | |
sleep 2 | |
zfs set compression=on ${name} | |
zfs set mountpoint=/Volumes/${name} | |
sleep 2 | |
sudo chown -R root:staff /Volumes/${name} | |
sudo chmod -R 775 /Volumes/${name} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment