Windows Server TechCenter > Windows Server Forums > Hyper-V > Problem with dynamic vhd size
Ask a questionAsk a question
 

QuestionProblem with dynamic vhd size

  • Saturday, June 27, 2009 1:32 PMOOSOO Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hello everybody, i have virtual machine with Exchange edge role installed. The dynamic vhd was used, now the used space is about 20 GB, but real size on host file system is 95 GB. This is really inconceivable.

    Has anyone same experience ?

    Its possible to solve the problem somehow? There is no snapshot

    Thanks

All Replies

  • Saturday, June 27, 2009 1:47 PMJohn Paul CookMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
  • Saturday, June 27, 2009 3:23 PMBrianEhMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Dynamic VHDs only grow as they need to, they do not shrink ( sucah as a page file does).

    I am guessing that at some point int time the VHD needed to grow and no longer needs that extra space.

    Also, dynamic VHD grows in block sized chunks, so it will always be larger than what is actually used.
    Brian Ehlert (hopefully you have found this useful)
  • Monday, June 29, 2009 7:21 AMVincent HuMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi,

     

    I agree with John and BrianEh. You only mentioned that now the used space is about 20GB, you never told us whether you have ever used the disk space for more than 20GB(such as 50GB,80GB), the disk will not compact the free space after you delete the useless files.

     

     

    Best regards,

    Vincent Hu

     

  • Wednesday, July 01, 2009 9:32 AMOOSOO Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi, I think that used space was never bigger than actual used size equals 20 GB
  • Wednesday, July 01, 2009 9:42 AMVincent HuMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi,

     

    Have you convert the disk type to dynamic disk(the one opposite to basic disk, not the one in this post subject)?

     

    The following post discussed the similar issue to yours, you can refer to:

     

    dynamically expanding disk increases

    http://social.technet.microsoft.com/Forums/en-US/winserverhyperv/thread/bc6366e7-378b-4ded-9240-036f749e5a87

     

     

    Best regards,

    Vincent Hu

     

  • Wednesday, July 01, 2009 10:35 AMOOSOO Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi, that post is'nt help in my case, disk is basic from begining not converted
  • Wednesday, July 01, 2009 3:10 PMBrianEhMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    The only thing that I can think of is that at some point either the memory page file of the VM grew and then shrank, or a mail DB grew and then shrank - mail purge possibly.

    If the volume in question only houses the OS of the Exchange server, all that should be there that will dynamically change are the in and out boxes and paging.

    And depending on email rules, if a large email is sent outward to many recipients, then this could cause extra growth.  But it is one of those one time event types of things.  In fact, when it comes to an issue this this, it is generally a moment in time that causes it, but the result we have to live with for a considerably longer time.

    the only other thing I can think of is a service pack install or an upgrade - something that uses a great deal of space and then cleans up after itself.

    Speakaing of that (this thought just came to my while typing) - what about backups?  And possibly backup agent or VSS snapshot cache?
    The volume would need to be grown to handle this, it would be a periodic need to more disk that should clean itself up, and you would most likely not see the additional space demand during the business day (after hours event)...

    Just thinking outloud...

    Brian Ehlert (hopefully you have found this useful)
  • Wednesday, July 01, 2009 11:59 PMJohn Paul CookMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Shadow copies could do this.

    I saw a Vista machine using 30 GB consume 90 GB because of shadow copies.