Hopefully there is a simple answer to this but its something I dont understand right now.

5 days ago I colocated a windows server 2008 r2.

It has running on it a Hyper-v with pretty much only IIS7 and filezilla server.

The last 4 days I have spent migrating websites over. The wwwroot directory size is 150mb.

No databases are stored on this server.

However, in 5 days the size of the vhd has expanded from 10gb to well over 70gb!

The only change pretty much is the setup of these websites. How can I find out what's happened or where the space has gone?

  • I thought I would also add that the c:\ on the hyper v is also reporting around 11gb of space used. – asn187 Jan 15 '10 at 7:01
  • Could it be the blank space that has remained after copying data off the disk? Actually, I think this is the issue and I probably just need to compact the disk. – asn187 Jan 15 '10 at 9:21
  • 1
    sadev.co.za/content/hyper-v-shrinking-vhd For anyone interested, question answered i guess. – asn187 Jan 15 '10 at 9:26

Any block that the filesystem has touched will expand the VHD file. Just as the commenter has suggested, this is a result of files that have been copied onto the volume and then been deleted.

You can compact the VHD file, but this involves unmounting it. (Hyper-V will then mount the VHD in the management OS to get the filesystem metadata and then delete the redundant blocks.)

The good news (if you feel charitable) is that you now have lots of spare blocks in the VHD file and new temporary files won't frequently suffer the momentary perforance hit of extending the file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.