Hi all,
I have a very odd issue with hyper-v.
I have a hyper-v host with two local direct attached disks. One C drive and one E drive. The E drive used for VHDs and the associated VMs, snapshots etc.
I also have a VM which is a DC called DC1. DC1 has two VHDs attached. One for the C drive and one for the D drive used for data, files shares etc.
The C drive on DC1 is provisioned as a dynamically expanding disk: 120GB.
The D drive on DC1 is provisioned as a fixed disk: 900GB
The issue is, the E drive on the hyper-v host is tight for space, the disk is 1.3TB in total. So 900GB is being taken by the fixed disk (drive D on DC1) and 20GB is being taken by the dynamically expanding disk (C drive on DC1) if the space on this C drive
expands too much we have a real issue of course.
My concern is that someone has way over provisioned the D drive on DC1, it should not have been allocated 900GB as there is only 342GB being used on the disk. But as its a fixed disk it is taking a massive 900GB of space from the E drive on the hyper-v host.
Now then.. what makes this interesting is... on my initial inspection of the issue, I seen the 900GB drive as a dynamically expanding disk and I seen the C drive as a fixed disk. So I though ok great, I can simply compact the dynamically expanding disk after
moving some old data of the D drive on DC1 and pull a big chunk of data back. This was not the case, this was my error, in actual fact it is the other way round, the 900GB drive is fixed and the 120GB C drive is dynamic. So anyway... I then did a
compact on the C drive (at this time still thinking I was actually compacting the 900GB D drive) which then reclaimed a huge chunk of data from the E drive on the hyper-v host.
Now I have 240GB of free space on the E drive of the hyper-v host (after deleting old unwanted data from the D drive of DC1) AND compacting the C drive of DC1. This entire issues is an issue and is under investigation as I received an automated
alert telling me the E drive on the hyper-v host had 0.4% disk space. This obviously needed action taking as the DC was going into a paused state.
One of my colleagues say this is just sheer coincidence that the C drive compact happened to need compacting therefore a large chunk of space was freed up on the E drive of the hyper-v host. I really hope this is the case otherwise I feel all my knowledge
of hyper-v and storage is a total waste of time.
My next question is.. how is best to reduce the size of the D drive on DC1? I have tried to shrink the volume from windows on DC1 however the shrink volume wizard only allows me to shrink by 89GB, which isn't any good really. I assume there are some file
locks slap bang in the middle of the disk therefore cannot reclaim the space. Could I use hyper-v to shrink the disk maybe? It is a live production environment so I need to be very careful.
Thanks in advance and any help would be greatly appreciated.
Thanks