Created
June 20, 2015 13:13
-
-
Save kofj/21266ed3250abb17a2d3 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
for i in a b c d e f g h i j k l | |
do | |
sudo parted -s /dev/sd${i} mklabel gpt | |
sudo parted -s /dev/sd${i} mkpart sd${i} 0% 100% | |
sudo parted -s /dev/sd${i} print | |
sudo mkfs.xfs -f /dev/sd${i}1 | |
UUID=$(blkid /dev/sd${i}1 -o value -s UUID) | |
FS=$(blkid /dev/sd${i}1 -o value -s TYPE) | |
sudo mkdir /mnt/sd${i} | |
FSTAB="UUID=$UUID /mnt/sd${i} ${FS} defaults,noatime,nodiratime 0 0" | |
echo $FSTAB >> /etc/fstab | |
echo "======================" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment