Created
December 27, 2017 06:01
-
-
Save judexzhu/2ccf29980a46a5efeb2f3b055a90e013 to your computer and use it in GitHub Desktop.
Format disk, only run once
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 | |
lsblk | |
echo -n "Enter disk name and press [ENTER]: " | |
read disk | |
echo -e "o\nn\np\n1\n\n\nw" | fdisk /dev/$disk | |
mkfs.xfs -f /dev/$disk | |
mkdir /data | |
echo "/dev/$disk /data xfs defaults 0 0" >> /etc/fstab | |
mount -a | |
df -h |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment