Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run fstrim weekly in the container. #159

Open
Boran opened this issue Nov 26, 2019 · 0 comments
Open

Run fstrim weekly in the container. #159

Boran opened this issue Nov 26, 2019 · 0 comments

Comments

@Boran
Copy link

Boran commented Nov 26, 2019

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant