gluster-containers icon indicating copy to clipboard operation
gluster-containers copied to clipboard

Run fstrim weekly in the container.

Open Boran opened this issue 5 years ago • 0 comments

I had an issue where PVs had space when mounted via glusterFS df /var/lib/heketi/mounts/vg_XXXX/brick_YYY/brick), but 'lvs' should the volumes as being full.

The tool fstrim came to the rescue, running "fstrim -av" freed up the space. "The TRIM command is an operation that allows the operating system to propagate information down to the SSD about which blocks of data are no longer in use.... ". https://www.digitalocean.com/community/tutorials/how-to-configure-periodic-trim-for-ssd-storage-on-linux-servers

For a definite solution, this needs to be automated inside the pod, there is already a service available:

systemctl enable fstrim.timer
Created symlink from /etc/systemd/system/multi-user.target.wants/fstrim.timer to /usr/lib/systemd/system/fstrim.timer.
systemctl start fstrim.timer

Could you consider adding this to the bottom of your Dockerfile please, for example?

Boran avatar Nov 26 '19 15:11 Boran