From 206ec4819d575e601a857f05e9a420ecc5eb2840 Mon Sep 17 00:00:00 2001 From: alfi0812 <43101280+alfi0812@users.noreply.github.com> Date: Sat, 28 Dec 2024 15:35:29 +0100 Subject: [PATCH] Add longhorn trim info (#30402) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** ⚒️ Fixes # **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 Refactor of current code **🧪 How Has This Been Tested?** **📃 Notes:** **✔️ Checklist:** - [ ] ⚖️ My code follows the style guidelines of this project - [ ] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [ ] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [ ] ⬆️ I increased versions for any altered app according to semantic versioning - [ ] I made sure the title starts with `feat(chart-name):`, `fix(chart-name):` or `chore(chart-name):` **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ --- .../content/docs/clustertool/csi/longhorn.md | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/website/src/content/docs/clustertool/csi/longhorn.md b/website/src/content/docs/clustertool/csi/longhorn.md index 9925c6c5a02..2c2031a72bc 100644 --- a/website/src/content/docs/clustertool/csi/longhorn.md +++ b/website/src/content/docs/clustertool/csi/longhorn.md @@ -19,6 +19,31 @@ Their Helm-Chart is available at: Longhorn is included with ClusterTool. It rolls out a, default, storageClass named longhorn, that saves its data on the systemdisk. +## Issues with Longhorn and Volsync + +Volsync creates backup each day and uses snapshots to do so. This leads to a lot of snapshot creations which will be deleted after the backup is done. + +Longhorn wont free/trim the space gained by the deletion of the snapshots and will keep it as used. This can lead to a no-disk-space error after some time depending on the amount of volsync backups and their size. +This can be prevented by adding the following `ReccuringTask` to Longhorn: + +```yaml + +apiVersion: longhorn.io/v1beta2 +kind: RecurringJob +metadata: + name: trim + namespace: longhorn-system +spec: + concurrency: 1 + cron: 0 0 * * * + groups: + - default + name: trim + retain: 0 + task: filesystem-trim + +``` +This runs a filesystem trim on midnight cet. To free the "used" space. ## Other references