Azure Managed Disks
- Azure managed disks are block-level storage volumes that are managed by Azure & used with Azure VMs
- The types of managed disks are
- ultra disks
- Premium state SSD (Solid State Disks)
- Standard SSD
- Standard Hard disk Drives
- Refer Here for the disk type comparison and also refer each disk type for the IOPS as per the size.
- In Azure, when we create a VM, a physical server is allocated on which vm is created
- OS Disk will be created but from a different physical server
- Data Disk Can be optionally added but it will also be from a differnt physical server
- Temp Disk of a certain size would be created from the same physical server as VM.

- Impact of This:
- When you stop the vm (the resources of the vm) from the physical server gets deallocated so VM & temp disk will be deallocated & when you start the vm again, vm will be allocated on a certain physical server with a new temp disk. Where as OS Disk & Data Disk will not have any impact.
- Number of Data disks and size of temp disk is dependent on VM Size

- Activity:
- Create a Linux VM with Size Standard_B1s in a resource group (new => exploring)
- Navigate to the resource groups and check for the disks created
- SSH into the linux machine and execute the following commands and take screen shots
sudo lsblk sudo df -h
- Lets add one data disk

- Now execute
sudo lsblk
- Lets try to mount this disk on folder tools
sudo mkfs -t ext4 /dev/sdc sudo mkdir /tools sudo mount /dev/sdc /tools sudo df -h
- Now execute the following commands
sudo blkid sudo nano /etc/fstab
- Now lets add some content to os disk, data disk and temp disk
# os disk sudo mkdir /dummy sudo touch /dummy/{1..100}.txt # data disk sudo mkdir /tools/dummy sudo touch /tools/dummy/{1..100}.txt # temp disk sudo mkdir /mnt/dummy sudo touch /mnt/dummy/{1..100}.txt
- Stop the VM

- Wait for the vm to be stopped and start again and try to verify the contents
- Data in temp disk will be lost

- Data in os & data disk will be persistent

- Data in temp disk will be lost
