Skip to content

ext4 fs_options are ignored when using devmapper #9304

Answered by Kern--
ksyblast asked this question in Q&A
Discussion options

You must be logged in to vote

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 to mkfs, but not mount. In this case, discard means that mkfs 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-L529

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 discard_blocks which will perform a discard when the thin devices…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ksyblast
Comment options

Answer selected by ksyblast
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants