-
Hello! I am testing devmapper with K8s, containerd version v1.7.7. I would like to mount the filesystem with a discard option however it does not work. That's the output depicting the problem:
Any help is appreciated |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This was discussed on slack (https://cloud-native.slack.com/archives/C4RJZ9Z6Y/p1698388757748389), but I want to add it here too in case anyone else runs into this.
Adding mount options is possible, but would require changes to the snapshotter. This would give you the ability to reclaim some disk space while containers are running. There is also |
Beta Was this translation helpful? Give feedback.
This was discussed on slack (https://cloud-native.slack.com/archives/C4RJZ9Z6Y/p1698388757748389), but I want to add it here too in case anyone else runs into this.
fs_options
are passed tomkfs
, but notmount
. In this case,discard
means thatmkfs
should discard blocks as it's formatting the thin device. See here for the mount options that are used: https://github.com/containerd/containerd/blob/main/snapshots/devmapper/snapshotter.go#L510-L529Adding mount options is possible, but would require changes to the snapshotter. This would give you the ability to reclaim some disk space while containers are running.
There is also
discard_blocks
which will perform a discard when the thin devices…