Last active
October 16, 2018 16:11
-
-
Save dgadiraju/55d5c81b319748502bfcfab78f3602d5 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
#Do not run this script unless you understand what it is doing | |
#Do not run this script more than once | |
echo -e "o\nn\np\n1\n\n\nw" | sudo fdisk /dev/sdb | |
sudo mkfs.ext4 -F /dev/sdb | |
sudo mkdir /data1 | |
sudo sh -c "echo -e \"/dev/sdb /data1 ext4 defaults 0 0\" >> /etc/fstab" | |
sudo mount -a |
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
# Make sure contents of format_disk.sh is copied into a file called format_disk.sh | |
# Run these commands via ssh | |
# Do not run these commands on same node more than once | |
ansible all \ | |
-i hosts \ | |
-m script \ | |
-a "scripts/format_disk.sh" \ | |
--private-key=~/.ssh/google_compute_engine \ | |
--become | |
ansible all \ | |
-i hosts \ | |
-a "df -h" \ | |
--private-key=~/.ssh/google_compute_engine |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment