diff --git a/website/src/content/docs/clustertool/csi/longhorn.md b/website/src/content/docs/clustertool/csi/longhorn.md index 72e5b5c64e2..81cda18fd0d 100644 --- a/website/src/content/docs/clustertool/csi/longhorn.md +++ b/website/src/content/docs/clustertool/csi/longhorn.md @@ -27,7 +27,6 @@ Longhorn wont free/trim the space gained by the deletion of the snapshots and wi This can be prevented by adding the following `ReccuringTask` to Longhorn: ```yaml - apiVersion: longhorn.io/v1beta2 kind: RecurringJob metadata: @@ -41,11 +40,54 @@ spec: name: trim retain: 0 task: filesystem-trim - ``` -This runs a filesystem trim on midnight cet. To free the "used" space. +This runs a filesystem trim at midnight UTC. To free the "used" space. + +In addition to trim, it is possible to delete and cleanup all snapshots by adding tasks for snapshot-delete and snapshot-cleanup. + +:::caution + +This tasks should only be used with caution, as they will delete manually created snapshots too. + +::: + + +```yaml +apiVersion: longhorn.io/v1beta2 +kind: RecurringJob +metadata: + name: delete + namespace: longhorn-system +spec: + concurrency: 1 + cron: 00 22 * * * + groups: + - default + name: delete + retain: 0 + task: snapshot-delete +``` +This runs a snapshot delete task at 22:00 UTC. + +```yaml +apiVersion: longhorn.io/v1beta2 +kind: RecurringJob +metadata: + name: cleanup + namespace: longhorn-system +spec: + concurrency: 1 + cron: 30 22 * * * + groups: + - default + name: cleanup + retain: 0 + task: snapshot-cleanup +``` +This runs a snapshot cleanup task at 22:30 UTC. ## Other references - - + \ + \ +