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

Preview
* Purpose of fstab Refer Here
* Add a data disk to the vm
Preview
* execute lsblk
Preview
* Create a filesystem
Preview
* Create a directory and mount the device on to this folder
Preview
* Now execute df -h
Preview
Preview
* 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
Preview

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 Reply

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

Please turn AdBlock off
Social Network Widget by Acurax Small Business Website Designers

Discover more from Direct DevOps from Quality Thought

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

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube