Given a block device with an ext4 filesystem and a mountpoint in a container I am unable to run fstrim to reclaim discarded blocks from ‘inside’ the container
fstrim: /var/lib/docker: FITRIM ioctl failed: Operation not permitted
This is understandable, however I am unable to find a way to perform the operation on the host
My searching found the following directory that allows rootfs access from the host
However, the mountpoint for the block device is empty.
What I’m looking to achieve is either from the host or the container to run fstrim without having to shut down the container, mount the block device to the host, run fstrim, unmount, then restart the container.