Azure Disks
Persisting Mounts in Azure Linux VM
- Azure is responsible for providing disks to OS, formatting and extending the disk spaces is the responsibility of OS
- In Linux mounts are not persisted across restarts, for that we need to add entry to fstab
- In the same way, partitions are created by OS not Azure Managed disk
- Create a ubuntu vm with size standard_b1s
- Login into the vm and execute the following commands
sudo lsblk

* Purpose of fstab Refer Here
* Add a data disk to the vm

* execute lsblk

* Create a filesystem

* Create a directory and mount the device on to this folder

* Now execute df -h


* Add the line UUID=<uuid of disk> /projects xfs defaults,nofail 0 1 to the /etc/fstab
* Now restart the vm and ensure the mount is persisted

- Refer Here for microsoft azure article
Resizing the Disk
- Now lets resize the disk attached to projects from 4 GB to 8 GB
- Azure allows to change disk sizes only when vm is dealloacted(stopped)
- Stop the vm and change the disk size
- Now start the vm
- Try detecting the changes Refer Here
- Refer Here for microsoft official docs on expanding disks
- Or try
resize xfs filesystem ubuntu
