Azure Classroomnotes 07/Apr/2023

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

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
Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a ReplyCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Animated Social Media Icons by Acurax Responsive Web Designing Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Exit mobile version
%%footer%%