Azure Classroom Series – 09/Nov/2021

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. Preview
  • 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 Preview
  • 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
    
    Preview Preview
    • Lets add one data disk Preview Preview Preview
    • Now execute sudo lsblk Preview
    • 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
    
    Preview
    • Now execute the following commands
    sudo blkid
    sudo nano /etc/fstab
    
    Preview Preview
    • 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
    
    Preview
    • Stop the VM Preview
    • Wait for the vm to be stopped and start again and try to verify the contents
      • Data in temp disk will be lost Preview
      • Data in os & data disk will be persistent Preview

Leave a 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

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube