locked
Re-sizing Azure data disk RRS feed

  • Question

  • Hi,

    I'm sorry to ask this but I have searched there doesn't seem to be a straight answer. I want to know if I attach, say a 250GB VHD data disk to a VM, can I dynamically expand it later to 500GB or what ever size I need. So far the solutions seems to be to create a new disk and run a copy operation or download the VHD, re-size and upload it again. I also read some blogs on modifying the BLOB storage but I'm not comfortable with anything other than Microsoft supported methods to achieve this. So far all of these suggestions are not practical for a production system with critical data.

    Thanks

    Thursday, June 6, 2013 8:04 PM

Answers

All replies

  • Take a look at this blog post: http://blog.maartenballiauw.be/post/2013/01/07/Tales-from-the-trenches-resizing-a-Windows-Azure-virtual-disk-the-smooth-way.aspx

    Also since data disks are essentially page blobs and page blobs are charged based on the bytes occupied and not the total size, you may be better off specifying a larger size page blob (1 TB) so that you don't have to resize those disks.

    Hope this helps.

    Friday, June 7, 2013 3:37 AM
  • Just remember to only do a quick format - and not a full format - on these disks. A full format will lead to your being billed for all the 0s written to the disk.
    Friday, June 7, 2013 6:47 AM
  • Thanks! That's a very useful tip
    Friday, June 7, 2013 7:49 AM
  • Take a look at this blog post: http://blog.maartenballiauw.be/post/2013/01/07/Tales-from-the-trenches-resizing-a-Windows-Azure-virtual-disk-the-smooth-way.aspx

    Also since data disks are essentially page blobs and page blobs are charged based on the bytes occupied and not the total size, you may be better off specifying a larger size page blob (1 TB) so that you don't have to resize those disks.

    Hope this helps.

    Thanks, yes I've read this blog. My only reservation is that its not a Microsoft supported solution, so not entirely confident in using it on production data.

    I guess the answer is there is no Microsoft supported way of resizing disks at this time. Would anyone know if this will be added in the future?

    • Edited by PMLIO Friday, June 7, 2013 7:51 AM
    Friday, June 7, 2013 7:50 AM
  • There is no need to resize a data disk to expand a disk volume. Instead add a new empty disk to the VM in Azure, then go to Disk Management in your Windows Server VM, right-click the volume you want to expand and select Extend Volume. Then expand it using the new empty disk.

    Likewise, with Shrink Volume you may shrink the volume to free the extra disk later (as long as there is no data on it), and then detach it and delete it.

    With a Linux VM something similar can be done.


    Peter :-)


    Monday, June 24, 2013 9:21 AM
  • How about below  rough approach , a little long winded but i reckon i can knock up some powershell to do it . Advantage is that download / upload will be really quick / reliable on an Azure VM v your own connection . Also allows you to keep your VHD size sensible , cos if 1TB and you have to download it from Azure to say your laptop , dont u need the actual size (1TB) available  ?

    -

    a)Detaching the Disk in Azure from the original VM

    b) building New temp Azure VM

    c) Adding your Azure Subscription to Temp Azure VM to it so can access Blob Storage

    d) download VHD from blob storage, increase size using Diskpart or whatever

    e) Upload back to blob storage

    f) Reattach to original vm  

    g) delete temp azure vm

    Monday, June 24, 2013 1:19 PM
  • Sometimes there is still a need to resize an individual data disk. Azure limits the number of data disks, all depending on the virtual machine size. E.g., an ExtraSmall instance is limited to 1 data disk.

    See: Virtual Machine and Cloud Service Sizes for Windows Azure

    Wednesday, August 14, 2013 10:33 AM
  • Hi LeonM

    But now with the new ish per minute billing you can quickly upsize the VM to say Medium / Large , do your thing and shrink back down to Extra Small

    Not perfect I know

    cheers,

    Andy.

    Wednesday, August 14, 2013 1:32 PM
  • Hi Andy,

    Are you saying that that's a trick to have more than 1 data disk on an ExtraSmall VM ?

    Regards,

    Leon 

    Wednesday, August 14, 2013 3:26 PM
  • Sorry typed reply too quick . I guess what I was thinking was

    - Expand to Small VM 

    - Add new Data Disk / Volume format it

    - Copy content from old to new Data Disk / Volume (make sure copy permissions , ie if using XCOPY use /O param)

    - Detach old Data Disk

    - Change New volume to original drive letter

    - Change to Extra Small VM

    - (some point later when confident), delete original Data Disk from storage



    • Edited by Andy Ball Wednesday, August 14, 2013 3:40 PM
    Wednesday, August 14, 2013 3:36 PM
  • CloudXplorer 2.18 added the ability to Expand Virtual Disk.

    http://clumsyleaf.com/products/cloudxplorer/history

    This allows you to increase the VHD size in-place in Azure. But you must first remove the VM and the disks, choosing the option to Retain the associated VHD. That is under Virtual Machines, under the Disks section at the top. Then go into CloudXplorer and right-click the VHD and select Expand Virtual Disk.

    For a data disk, you wouldn't have to remove the VM, you can just detach the data disk, remove the disk (specifying Retain the associated VHD), expand it with CloudXplorer, then add it back as a disk, then add it as a data disk to the VM again.

    Thanks,
    Craig

    Wednesday, October 16, 2013 10:24 PM