Hello,
My Workstation’s virtual disk size balloons out due to the regular updates and usage. I am trying to shrink the size of the virtual disk by enabling trim support on the VirtualBox.
Since Whonix is based on the Debian, I followed the steps for enabling trim support on Debian, sadly it didn’t work on Whonix.
Here is what I did:
I modified Workstation.vbox
file to enable SSD and TRIM support:
<AttachedDevice discard="true" nonrotational="true" type="HardDisk" port="0" device="0">
Then I booted the Workstation to and used the following command to verify TRIM support is enabled:
sudo hdparm -I /dev/sda | grep TRIM
On Debian this outputs:
* Data Set Management TRIM supported
but nothing happens on Whonix Workstation, in fact hdparm does not return any information at all.
I modified /etc/fstab
to enable trim support anyway, like this:
sudo nano /etc/fstab
then I modified this line from this:
/dev/disk/by-uuid/3d1fc014-57d8-4eaf-95ef-8de97ee9cb61 / auto defaults,errors=remount-ro 0 1
to this:
/dev/disk/by-uuid/3d1fc014-57d8-4eaf-95ef-8de97ee9cb61 / auto discard,noatime,defaults,errors=remount-ro 0 1
I rebooted the system and tried to run a trim operation:
sudo fstrim -av
fstrim: /: the discard operation is not supported
It doesn’t work. Any suggestions?