Limited VHD compaction on UFS FreeBSD VM RRS feed

  • Question

  • I have a FreeBSD 10.2 virtual machine running on Windows 10 Client Hyper-V that has seen much use as a development machine. It uses a 64 GB, dynamically expanding VHD file for its disk and the current size of the VHD is 37 GB. However, looking at the VM's filesystem, only 13 GB are in use by the OS and the swap partition is 3 GB, so the total size of the OS should be around 16 GB. But I cannot compact the VHD any smaller than 37 GB. Is there any way to further compact this VHD and why would I not be allowed to compact it any more than it already is?
    Sunday, April 17, 2016 10:50 PM

All replies

  • You can run TRIM to compact the VHD but TRIM function will be available from upcoming FreeBSD release (11.1). 

    TRIM support TRIM hints notify the drive that certain sectors that were previously allocated are no longer required by the app and can be purged. This process is typically used when an app makes large space allocations via a file and then self-manages the allocations to the file, for example, to virtual hard disk files.

    Wednesday, March 29, 2017 1:11 AM