Replies: 10 comments
-
fstrim fixed the filesystem size. But pool usage only got fixed after creating and deleting a snapshot. |
Beta Was this translation helpful? Give feedback.
-
Should stratisd depend on fstrim.timer? |
Beta Was this translation helpful? Give feedback.
-
I'd have to dig into this again but we've seen some issues where if the extents freed by fstrim still leave some of the thin pool blocks partially used, pool usage won't be affected by fstrim. @bmr-cymru Do you have any thoughts on why this might be happening only in the creating and deleting snapshot case? I'm going to look into this at the code level too to try to see if I can figure out what's going on.
We have a discussion about adding support and we are looking to eventually support it in Stratis. In the meantime, you should feel free to use fstrim on the filesystems however works for your particular set up. If fstrim.timer works for you, that shouldn't cause any problems with stratisd. |
Beta Was this translation helpful? Give feedback.
-
One follow up question on this. How long did you wait for the pool usage to update? Was it more than 10 seconds? Theoretically, the usage should update every 10 seconds unless something else is going on. |
Beta Was this translation helpful? Give feedback.
-
Long time. Some hours. I haven't seen any evidence about usage dropping without running fstrim on filesystem. |
Beta Was this translation helpful? Give feedback.
-
How long did you wait after running fstrim is more what I'm asking. Was this also hours? |
Beta Was this translation helpful? Give feedback.
-
After fstrim it was fixed in few seconds. |
Beta Was this translation helpful? Give feedback.
-
Okay great! This is the expected behavior. I think the larger question that we want to address is how to integrate fstrim into stratisd then. It appears there's no issue with the thin pool usage updating after fstrim. Please share your feedback on how you'd like to see fstrim integrated in the discussion I linked above. We have debated whether it makes more sense to put it on a timer or expose a D-Bus/CLI command to run it on a given filesystem. |
Beta Was this translation helpful? Give feedback.
-
@kimheino @bleve One more thing that you can try in the meantime is mounting with the |
Beta Was this translation helpful? Give feedback.
-
I added discard to some systems - xfs documentation doesn't recommend enabling discard because of big performance penalty. |
Beta Was this translation helpful? Give feedback.
-
From @bleve:
Hi! Have you tried using fstrim? We have an issue to incorporate fstrim into stratisd but for now, you'd have to run it manually. Does that resolve your issue?
Beta Was this translation helpful? Give feedback.
All reactions