Created
April 5, 2015 12:16
-
-
Save wakwanza/19c695ccf2360e4a9550 to your computer and use it in GitHub Desktop.
Mount and format disk on Google Compute Engine
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
#!/bin/bash | |
# Mount and format the disks | |
sudo mkdir -p /data | |
sudo yum install xfsprogs -y | |
sudo /usr/share/google/safe_format_and_mount -m "mkfs.xfs -isize=512" /dev/sdb /data | |
sudo echo "Mount persists" | |
sudo sh -c "echo \"/dev/sdb /data xfs noatime,data=writeback,errors=remount-ro 0 1\" >> /etc/fstab" | |
sudo echo "fstab done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment