You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dmsetup does not discard blocks when removing a thin device. The unused blocks
are reused by the thin-pool, but will remain allocated in the underlying
device indefinitely. For loop device backed thin-pools, this results in
"lost" disk space in the underlying file system as the blocks remain allocated
in the loop device's backing file.
This change adds an option, discard_blocks, to the devmapper snapshotter which
causes the snapshotter to issue blkdiscard ioctls on the thin device before
removal. With this option enabled, loop device setups will see disk space
return to the underlying filesystem immediately on exiting a container.
Fixescontainerd#5691
Signed-off-by: Kern Walster <walster@amazon.com>
Copy file name to clipboardExpand all lines: snapshots/devmapper/README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,7 @@ The following configuration flags are supported:
26
26
should be the same as in `/dev/mapper/` directory
27
27
*`base_image_size` - defines how much space to allocate when creating the base device
28
28
*`async_remove` - flag to async remove device using snapshot GC's cleanup callback
29
+
*`discard_blocks` - whether to discard blocks when removing a device. This is especially useful for returning disk space to the filesystem when using loopback devices.
29
30
30
31
Pool name and base image size are required snapshotter parameters.
0 commit comments