Increase Data Disk Size In Azure

INTRODUCTION

Retaining data in the same VM requires us to increase the disk space when the utilization of allocated space is full. Increasing the disk space in Azure is quite easy with a few clicks.

There may be some challenges faced by the administrators if the desired details are not provided. For example, the VM owner would need to increase the size of the data disk, but not be aware about the details which need to be provided or how these can be gathered. So the request would be “Increase the E drive space with 500 GB.” This creates a difficult situation for the Azure administrators, as they must find out the exact disk when the VM has multiple data disks.

There are 2 phases involved in increasing the disk space.

  • Identifying the Disk
  • Increasing the Disk Space

INDENTIFYING THE DISK

Step 1

Azure

  • Login to the Azure VM.
  • Open the “Device Manager” and expand ‘Disk drives’.

2 types of disk drives will be displayed.

“Virtual HD ATA Device” – These are the OS drives and the temporary drives.

“Msft Virtual Disk SCSI Disk Device” – These are the Data disk drives.

  • Right click on the “Data Disk Drives” and open properties.

Step 2 - Note LUN Value

Azure

In ‘General’ Tab of the disk property, note the Location (Specifically LUN value)

Step 3 - Note Volume Label (Drive Name)

Azure

  • Select the ‘Volumes’ tab.
  • Initially the values for each volume will be empty. Click Populate to see the Volume details of the selected drive.

    Azure
  • Note the Volume Label (drive name) from the displayed result.

Once the LUN value and the Volume Label (Drive name) is noted, shut down the virtual machine.

From the above steps we understand the ‘E Drive’ is associated with the Data disk with the LUN value ‘0’.

The Drive Label will not be available in the Azure portal. Hence the disk identification will be through the LUN value.

INCREASING THE DISK SPACE

Azure

  • Login to Azure Portal.
  • Navigate to the Virtual Machines page in Azure Portal.

Here we can see that the VM is in Stopped state, which means that the VM is turned off through the Power Option available in the VM.

Azure

Increasing the Disk space requires the VM to be in a “deallocated” state. Shutting down the VM through the VM’s power option will put the VM in the Stopped state. In order to deallocate the VM, ‘Stop’ the VM from the Azure portal.

Azure

  • Select “Stop” from the VM’s Overview pane.
  • Confirm the VM stop by selecting ‘Yes’.

    Azure

    Azure
  • Once the stop request is successfully completed, we can see the VM status as “Stopped (deallocated)”.

    Azure
  • Select “Disks” from the VM settings.
  • Click on the Data disk which has the LUN value as “0”.

    Azure
  • Specify the total size (Existing + additional) in GB
  • Click “Save”

    Azure
  • Azure Portal will notify the status of the request.

    Azure
  • Once the successful notification is displayed, we shall check the increased size in the Disk tab of the VM Settings.

    Azure
  • Start the VM from the Azure Portal.

    Azure
  • Login to the VM and navigate to Disk Management.
  • Here we shall see the new added space in the respective disk.
  • Right click on the Disk and select “Extend Volume”.

    Azure

  • Click ‘Next’ in the Welcome window of the Extend Volume Wizard

    Azure

  • By default the allocated space on the disk will be selected.

Modify the value of “Select the amount on space in MB” if you wish to have some allocated space to be utilized in the future.

Azure

  • Click Finish on the Completion Window of the Extend Volume Wizard.

    Azure
  • The newly increased space is allocated with the existing disk space.

SUMMARY

In this article, I have explained about increasing the disk space through the Azure Portal.

Below are the highlights which need to be considered while increasing the Disk space.

  1. The Virtual Machine should be in a “deallocated” state.
  2. Increased space should be included to the primary partition by extending the volume on the respective disk.
  3. The Disk shouldn’t be detached during this process, as detaching the disk might result in formatting the disk which in turn leads to data loss.


Similar Articles