Hmm, maybe first I will discuss the size of the vdi/vhd disk and the actual size in the BSD system (df -h)
To begin with, each virtual machine in metina is made dynamic and this has its advantages and disadvantages.
Dynamic - the size of the .vdi, .vhd, etc. file increases with demand - recommended for someone who does not care about the allocated virtual and physical space, i.e. on the machine we can have, for example, 6 GB of occupied space, but the virtual disk may have 30 GB because that in the past, for example, files were unpacked and then backups were made, then compilations etc. and the space demand has almost doubled (usually it increases by 51% of a given virtual disk occupancy) and after deleting this data, the virtual size of such a disk will not decrease, unfortunately
Fixed size - this is one that does not change and there is a constant disk size .vdi, .vhd - the preferred output when we do not want our virtual machine to have e.g. 60 GB of virtual disk and the actual value inside would be 5 GB, then it is worth considering this option and then, after using the df -h command, it will be as much as it should be and will not exceed, e.g. 30gb if we set a fixed size of 30gb (you can always increase such a disk or add another virtual dynamic or fixed disk as an additional partition on e.g. for metin file, etc.)
If you want to see which folder weighs a lot, I recommend running the command:
du -sh /*
If you want to save results to txt, I recommend:
du -sh /* >> /check_disk.txt
If you want to check which folder weighs a lot inside, e.g. all the files:
du -sh /*/*
If you want to see how much /usr weighs:
du -sh /usr
If you want to see which folders in usr weigh a lot:
du -sh /usr/*
Etc., I recommend this option, of course there are other methods, but this method is universal and transparent, I think.
And finally, to change the dynamic disk (its physical value on a computer weighing e.g. 80 GB), it is best to migrate such a machine to a newer one with the setting to a permanent disk and then it will not exceed the physical space. There is also a method of compacting VDI VHD disks, but I do not recommend it because I don't know, maybe the compact will reduce the occupied virtual disk of the physical scale by 20%, so it is more profitable to migrate to a permanent disk with a size of e.g. 20 GB and if there is a greater demand for the disk, simply add another one. partition and mount another partition and add it to boot in fstab, mounting a partition on ufs is trivial, example the name of partition no. 4 to be mounted to the /mnt folder:
mount -t ufs /dev/ada0p4s /mnt
or:
mount /dev/ada0p4s /mnt
unmount:
umount /mnt
I didn't want to write down the topology of the dynamic disk because I would have to write it down in size letter A4 XD and I wrote a lot so I apologize for it and for my bad English.