简体   繁体   中英

How do I increase the size of an Azure CloudDrive?

I have an existing Azure CloudDrive that I want to make bigger. The simplist way I can think of is to creating a new drive and copying everything over. I cannot see anyway to just increase the size of the vhd. Is there a way?

Since an Azure drive is essentially a page blob, you can resize it. You'll find this blog post by Windows Azure Storage team useful regarding that: http://blogs.msdn.com/b/windowsazurestorage/archive/2010/04/11/using-windows-azure-page-blobs-and-how-to-efficiently-upload-and-download-page-blobs.aspx . Please read the section titled "Advanced Functionality – Clearing Pages and Changing Page Blob Size" for sample code.

yes you can,

please i know this program, is ver easy for use, you can connect with you VHD and create new, upload VHD and connect with azure, upload to download files intro VHD http://azuredriveexplorer.codeplex.com/

I have found these methods so far:

  • “the soft way”: increase the size of the page blob and fix the VHD data structure (the last 512 bytes). Theoretically this creates unpartitioned disk space after the current partition. But if the partition table also expects metadata at the end of the disk (GPT? or Dynamic disks), that should be fixed as well.
    I'm aware of only one tool that can do this in-place modification. Unfortunately this tool is not much more than a one-weekend hack (at the time of this writing) and thus it is fragile. (See the disclaimer of the author.) But fast.
    Please notify me (or edit this post) if this tool gets improved significantly.
  • create a larger disk and copy everything over, as you've suggested. This may be enough if you don't need to preserve NTFS features like junctions, soft/hard links etc.
  • plan for the potential expansion and start with a huge (say 1TB) dynamic VHD, comprised of a small partition and lots of unpartitioned (reserved) space. Windows Disk Manager will see the unpartitioned space in the VHD, and can expand the partition to it whenever you want -- an in-place operation. The subtle point is that the unpartitioned area, as long as unparitioned, won't be billed, because isn't written to. (Note that either formatting or defragmenting does allocate the area and causes billing.) However it'll count against the quota of your Azure Subscription (100TB).
  • “the hard way”: download the VHD file, use a VHD-resizer program to insert unpartitioned disk space, mount the VHD locally, extend the partition to the unpartitioned space, unmount, upload. This preserves everything, even works for an OS partition, but is very slow due to the download/upload and software installations involved.
  • same as above but performed on a secondary VM in Azure. This speeds up downloading/uploading a lot. Step-by-step instructions are available here .

Unfortunately all these techniques require unmounting the drive for quite a lot of time, ie cannot be performed in high-available manner.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM