Page 1 of 1

CompactVD - reduce size of dynamic disk images

Posted: 2. Nov 2016, 21:31
by Rui Baptista
https://github.com/eternalbits/compactVD

CompactVD is a utility to optimize the size of dynamic disk images, based on the bitmap allocation tables of known file systems.

Supported file systems:
* Hierarchical File System (HFS), used in masOS computers
* Extended File System (EXT), used in most linux desktops

Last release has a simple implementation of Logical Volume Manager to reach file systems inside linear Logical Volumes with one Physical Volume. Although not interesting from a LVM point of view, many Linux servers start with a configuration like that.

Re: CompactVD - reduce size of dynamic disk images

Posted: 2. Nov 2016, 23:51
by socratis
So, from reading the description at the GitHub, I get the idea that it sorts of combines the "zerofree"/"sdelete" with the "--compact" built-in option of VBoxManage, for EXT/HFS filesystems. Would that be my correct understanding?

Re: CompactVD - reduce size of dynamic disk images

Posted: 3. Nov 2016, 03:02
by Rui Baptista
Yes, the result is analogous. Of course, zeros aren't actually written and I don't know what compact does internally... but that's it.

Re: CompactVD - reduce size of dynamic disk images

Posted: 3. Nov 2016, 04:45
by socratis
OK, I'll give it a shot.

On a backup. It's a first release after all... ;)

Re: CompactVD - reduce size of dynamic disk images

Posted: 3. Nov 2016, 11:38
by mpack
Interesting. Of course CloneVDI has had this exact compaction feature for 7 years - is there any source code in common? (translated from C to Java) ?

Though this does fill some interesting gaps: CloneVDI does support compaction of EXTx, but not HFS. And CloneVDI doesn't support LVM. In place editing is disallowed in CloneVDI as a matter of policy as it has obvious data safety implications.

Re: CompactVD - reduce size of dynamic disk images

Posted: 3. Nov 2016, 17:56
by Rui Baptista
Hi, mpack, thank you for your interest.

This thing has evolved from a personal need for a HFS solution (as most of the open source), and therefore has no common parts with CloneVDI.

About editing in place, it is a convenient solution for less experienced users. For the conscientious ones there is a copy option :)

Re: CompactVD - reduce size of dynamic disk images

Posted: 3. Nov 2016, 18:09
by mpack
Rui Baptista wrote:About editing in place, it is a convenient solution for less experienced users. For the conscientious ones there is a copy option :)
Well, of course it's precisely the less experienced users who will not understand the wisdom of making a backup copy.

VBoxManage also does e.g. resizing in place. I had these same comments back then, but I was a lone voice. And, just as I suspected, there have been several disasters where inexperienced uses have destroyed their virtual drives because of a host glitch that happened while resizing, or who simply got the resize command arguments wrong. Of course compaction shouldn't have the room for user error that resizing does.

Re: CompactVD - reduce size of dynamic disk images

Posted: 30. Sep 2022, 23:50
by Rui Baptista
https://github.com/eternalbits/compactV ... ster/share

Supported file systems:
* New Technology File System (NTFS), for Windows computers
* Extended File System (EXT), used in most linux desktops
* Hierarchical File System (HFS only), for macOS

Re: CompactVD - reduce size of dynamic disk images

Posted: 24. Jan 2023, 17:09
by Rui Baptista
https://github.com/eternalbits/compactV ... /compactVD

The app has translations in
* Chinese
* English
* French
* German
* Italian
* Japanese
* Portuguese
* Russian
* Spanish
* Turkish

Apart from French and Portuguese, the rest of the translations are based on Google Translate

Re: CompactVD - reduce size of dynamic disk images

Posted: 29. May 2023, 01:22
by Rui Baptista
https://github.com/eternalbits/compactV ... s/tag/v2.6

Added support for APFS (Apple File System)

Writes are only done in copy-on-write: file copies are made only when changes need to be written. Overhead can quickly reach 40% as all changes are rewritten.

Special care must be taken when copying a file, in which case the .nvram must also be copied.

Re: CompactVD - reduce size of dynamic disk images

Posted: 4. Jan 2024, 12:40
by Rui Baptista
https://github.com/eternalbits/compactVD/releases

· Try to copy the .nvram from the original file
· Uses one of two methods (FileDialog vs JFileChooser) in the open dialog
· In JFileChooser, when it finds an error, it immediately gives a message
· Change of setupToolBar from pack() to validate()
· Linux: Lvm is handled both in "Linux Lvm" and in "Linux data"
· FileDialog: brings the directory in addition to the file (2.6 regression)
· What a gross mistake in VHD. The blockTable must be different from -1!
· VHD include extra bitmap blocks with length 4096 in addition to 512
· Command line interface changed from 1.5 to 1.6
· In rare cases getImageBlockSize is less than 4096 bytes
· Treats pre-allocated full-size name as being "raw"
· HFS also reads the HFSX format in addition to the HFS+