In Microsoft Azure whenever a Virtual Machine is deployed it is attached with some sought of disk that is in the form of VHD associated with Virtual Machine.
There are number of Disk types available with Azure Virtual Machine, in which some disk are attached along with the Virtual Machine when it is created and some can be added or removed later as and when required.
Types of Disk available in Azure are;
There are number of Disk types available with Azure Virtual Machine, in which some disk are attached along with the Virtual Machine when it is created and some can be added or removed later as and when required.
Types of Disk available in Azure are;
- Operating System Disk
- Temporary Disk
- Data Disk
(Note: This article talks about types of disks and not types of storage i.e. standard vs. premium storage)
Let see all the types of disk one by one.
1. Operating System Disk
Operating System Disk is a VHD which is attached by default with the Virtual Machine and it is labeled as C: drive which is a SATA drive. Default caching policy on the operating system disk is Read/Write. For performance sensitive applications it is recommended to use Data Disk instead of Operating System Disk. Whenever you add new disk to the Virtual Machine, make sure that the default caching policy should be selected as None.
Note: Maximum capacity of this disk is 127 GB. Moreover, its three copies are created to provide availability and if it is configured with Geo-Replication then its copies can be replicated between multiple sites.
2. Temporary Disk
As the name explains itself what kind of disk it is, it is not permanent/persistent disk which is attached with the Virtual Machine whenever it is created. It takes the drive letter D: in the VM. We should not store any data which we will be referring in future as its data is going to be lost whenever the VM is restarted or when there is any failure in the datacenter where it is deployed meets up with some hardware failure. So the VM is recreated on new host using its disk but the Temporary disk is not retained.
Temporary Disk can be utilized by storing the temporary files such as tempdb and/or Buffer Pool Extensions with the D Series VM where SSD is provided as a temporary disk with these series of VM’s.
Note: On Linux VM, the disk is typically /dev/sdb and is formatted and mounted to /mnt/resource by the Azure Linux Agent.
3. Data Disk
A data disk is a VHD which is attached to Virtual Machine so as to save Application data or the data which you need to keep within VM. It is registered in VM as SCSI drive, which can be assigned any drive letter you want to keep. The number of Data disk that can be attached with the VM depends upon the tier/size of Virtual Machine you have deployed. Each Data disk has maximum capacity of 1 TB.
Note: To find more disk sizing and IOPS about the VM’s refer to this link https://msdn.microsoft.com/library/azure/dn197896.aspx
Types of Disk in Virtual Machine are demonstrated below:
I have deployed one test machine in Microsoft Azure named as “SQUONS-VM1” to carry out the demonstration.
The disk management console of my VM is depicted below, which has 127 GB Operating System Disk (C: drive) and 135 GB Temporary Disk (D: drive).
Same can be viewed on File Explorer.
Let’s begin with adding Data Disk into VM.
Following are steps to add Data Disk to VM:
1. Go to Virtual Machine console in Azure and select VM on which you need to attach Data Disk. Then on Command bar click on Attach and select Attach empty disk.
2. Then it will open a window, which contains your VM name and Storage Location & File Name. Storage Location & File Name are assigned automatically. Mention the Size of disk you want to attach to VM in GB and select “None” in Host Cache Preference.
3. Now it will start adding disk to your VM.
4. Now take the RDP of your VM and verify whether the disk has been attached to your VM or not under disk management.
You will find a raw disk (Disk 2) is attached to your VM which not initialized and Unallocated.
5. Next we will initialize the disk, make it online and allocate it with some drive letter.
Follow the below steps to initialize your disk and allocate drive letter to disk:
a. Right click on Disk 2 and select Initialize Disk.
b. Make sure the Disk 2 is checked and select the partition style.
Click OK.
c. Now Disk 2 becomes Online, Next step is to create a volume using the unallocated disk space.
Right click on unallocated disk space and select New Simple Volume.
d. Click Next.
e. Here, you need to specify the disk size to be created as Volume (Drive) in MB.
Click Next.
f. Assign the drive letter to the new Volume (Drive).
Click Next.
g. Now format the volume (Drive) with NTFS file system and provide the label name for your Volume (Drive).
Click Next.
h. Click Finish.
6. Now you can verify in disk management or file explorer whether the disk is Online and Allocated with drive letter or not.
Next moving further, let’s see how to detach Data Disk from VM.
Following are the steps to detach Data Disk from the VM:
1. Go to Virtual Machine console in Azure and select VM on which you need to detach Data Disk. Then on Command bar click on Detach Disk.
2. One window will open, wherein you need to select the disk name from the Attached Disks drop down menu which needs to be detached.
3. It will detach the Data Disk from the VM.
4. To verify the same, take the RDP of your VM from which you have detached the Data Disk and go to disk management or Windows explorer.
Note: In the process of attaching and detaching the Data Disk from Virtual Machine, your VM doesn’t restart.
No comments:
Post a Comment