Skip to content

Instantly share code, notes, and snippets.

@kofj
Created June 20, 2015 13:13
Show Gist options
  • Save kofj/21266ed3250abb17a2d3 to your computer and use it in GitHub Desktop.
Save kofj/21266ed3250abb17a2d3 to your computer and use it in GitHub Desktop.
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