Search This Blog

Tuesday, September 29, 2015

Extend Azure Data Disk

Well, come in time we would be running out of hard disk space on Azure Data Disk. Probably we allocate 50GB data disk size and database grew till occupy most of the space and you would like to extend the size. In Azure, you can extend the data disk up to 1TB.

But the question, where can we extend the disk? Too bad, we cannot find the option on Azure Management Portal and Azure Preview Portal.

You only can attach or detach disk

resize0

The only way is using Azure Powershell in order to extend the data disk.

But before that, you need to make sure VM is power off and in deallocated state.

Once you VM is deallocated, execute the following command:

# Get the data disk name for the particular VM
Get-AzureVM –ServiceName (VM Service Name) –Name (VMName) | Get-AzureDataDisk

# Resize the dataDisk to 100GB
Update-AzureDisk –DiskName (diskname)-201505110718430497 -Label ResizeDataDisk -ResizedSizeInGB 100

Screenshot: Get data disk name

resize- new1

Screenshot: Resize data Disk

resize new2

Once done, you can power on the virtual machine and use disk management snap-in to extend your disk.

8 comments: