Share via


VM hard drives detected as Thin Provisioned Drive

Question

Friday, October 2, 2015 10:14 AM

Hi,

We have some VM that we cannot defrag because their virtual hard drives are detected as "Thin Provisioned Drive". When we setup this drives, we used a Dynamic VHDX, but due to fragmentation on the host disk, we converted all VHDX to Fixed.

It seems that the guess OS is still detecting the virtual disks as thin provisioned, so we cannot defrag them unless we use the command line tool defrag.exe.

Is there any solution?

Thanks,

Enric

All replies (3)

Friday, October 2, 2015 2:35 PM ✅Answered

I'm guessing you have rebooted since changing them to fixed and powering on last?

As a side note, typically with VMs you don't defrag them. This is because the underlying storage knows better how the blocks should reside. Thing about how the SAN might be creating sub blocks of data. Also might be tiering data. Did you verify with your SAN vendor if that is a good thing to do? Also if your using things that track block changes, those things are like SAN snapshots and change block tracking in many popular back software's your going to balloon your storage and or backups. It could also potentially eat all of your tier-1 storage with fluff if you have an auto tiering SAN. Hyper-V replica might get very large replicas every time defrag runs. The reason why you couldn't or shouldn't defrag a thin provisioned VHDX is because you would cancel the benefit of using a thin volume. That is because it would touch every block in the thin provisioned volume giving you a fixed sized volume. Also if the underlying storage is SSD you will add more write wear to them.

Adam


Friday, October 2, 2015 3:50 PM ✅Answered | 1 vote

The first thing to determine is if you really need to perform defragmentation in the first place.  Yes, I understand what defragmentation does, but its value with modern disks has become marginal, in my opinion.  When disks were slow in seek time, it made all the sense in the world to try to make files on disk as contiguous as possible.  Over the years seek time has been significantly reduced.  First reason I see less value in defragmentation.

Then, your VHD is actually sitting on physical storage of some sort.  So, do you also defrag the physical volume as well?  If you believe in defrag, then the answer would be yes.  But, if the VHD is residing on a SAN, that means the VHD is already spread across multiple spindles, and the SAN's hardware takes care of retrieving the content of the VHD.  Most SAN vendors I have talked to discourage defrag as it just causes the disks to thrash a lot and does absolutely nothing for performance.  In fact, one could say that it hurts performance because the SAN is required to handle all those IOs for defrag that could be better served as IOs for production.  Second reason I see less value in defragmentation.

But, there is definitely the logic that defrag will reorder the files on the drive to make them more contiguous.  So I won't write it off entirely.  But my rule of thumb has become - test in your specific environment.  Perform a benchmark of the application before and after defrag.  Is there enough of a difference in the IO and wait times that it warrants defragmentation?  Then do it.  But I am pretty sure that the greatest majority of your applications will see no to very small (insignificant) changes that would not warrant the overhead of defrag.

Just my opinion.

. : | : . : | : . tim


Friday, October 2, 2015 12:39 PM

If you open disk management how those disks are shown?

Jeff (Netwrix)