Skip to content
This repository was archived by the owner on Apr 24, 2026. It is now read-only.
This repository was archived by the owner on Apr 24, 2026. It is now read-only.

Run fstrim weekly in the container. #159

@Boran

Description

@Boran

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions