Monday, February 22, 2021

mount a new data disk on an Azure Linux VM

https://blog.e-zest.com/how-to-create-attach-and-mount-a-disk-to-linux-vm-microsoft-azure

Basically create the disk from the Azure portal, then

  • find the name of the device using dmesg - for eg. /dev/sdc
  • sudo fdisk /dev/sdc
  • sudo mkfs -t ext4 /dev/sdc1
  • sudo mkdir DriveFolder; sudo mount /dev/sdc1 DriveFolder
  • append to /etc/fstab using sudo blkid to find the UUID of the disk. Eg. 
    UUID=33333333-3b3b-3c3c-3d3d-3e3e3e3e3e3e   /datadrive   ext4   defaults,nofail   1   2

No comments:

Post a Comment