Hi All , i am trying to use the FSTRIM and Snapsho...
# longhorn-storage
a
Hi All , i am trying to use the FSTRIM and Snapshot cleaning using the recurring job concept as given in documentation. I see that both the jobs run at regular configured interval , but dont trim the PV to reclaim the unused block and also user generated snapshots are also not cleaned up .. Is there any flag/setting that needs to be enabled for this feature to work .. I am sharing the job details i am running ..
Copy code
root@node1:/home/longhorn-pv-size# cat fstrim.yaml
apiVersion: <http://longhorn.io/v1beta2|longhorn.io/v1beta2>
kind: RecurringJob
metadata:
  name: fstrim-job
  namespace: longhorn-system
spec:
  cron: "*/5 * * * *"
  task: "filesystem-trim"
  retain: 1
  concurrency: 1

root@node1:/home/longhorn-pv-size# cat snapshot.yaml
apiVersion: <http://longhorn.io/v1beta2|longhorn.io/v1beta2>
kind: RecurringJob
metadata:
  name: snapshot-delete-job
  namespace: longhorn-system
spec:
  cron: "*/5 * * * *"
  task: "snapshot-cleanup"
  retain: 1
  concurrency: 1
@creamy-pencil-82913 can you help me with this query ?
c
Nope, not a LH dev, sorry.
a
@famous-shampoo-18483 can you help me with this query ?
@famous-journalist-11332 @famous-shampoo-18483 please help me with above query
f
I guess whether you encountered this issue https://github.com/longhorn/longhorn/issues/11670 If you don't care about the snapshots, you can try setting/volume option
Remove Snapshots During Filesystem Trim
: https://longhorn.io/docs/1.10.0/references/settings/#remove-snapshots-during-filesystem-trim