Skip to content

Instantly share code, notes, and snippets.

@vermashi
Last active August 14, 2018 02:34
Show Gist options
  • Save vermashi/649b06089436a5212742e681632ef173 to your computer and use it in GitHub Desktop.
Save vermashi/649b06089436a5212742e681632ef173 to your computer and use it in GitHub Desktop.
Format the data disks in an azure linux VM
#!/usr/bin/env bash
set -x
if ! [ -x "$(command -v curl)" ]; then
echo 'Error: curl not installed, script cannot run' >&2
exit 1
fi
echo "y" | mkfs.ext4 /dev/disk/azure/scsi1/lun1
mkdir /data1
echo "/dev/disk/azure/scsi1/lun1 /data1 ext4 defaults,nofail 0 0" >>/etc/fstab
mount -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment