From f84e63dbdbfe53e2fb9dfb2192c6e6f85ff5ace8 Mon Sep 17 00:00:00 2001 From: gregory-lee-bartholomew Date: Tue, 9 Jan 2024 18:16:53 +0000 Subject: [PATCH] with thin provisioning, use the overlay size, not the base image size Using the overlay size in the device mapper table allows the filesystem in the base image to be extended if the overlay is larger than the base image (e.g. `resize2fs /dev/mapper/live-rw`). --- modules.d/90dmsquash-live/dmsquash-live-root.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh index e80833948a..d2293590e7 100755 --- a/modules.d/90dmsquash-live/dmsquash-live-root.sh +++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh @@ -296,7 +296,7 @@ do_live_overlay() { dmsetup message /dev/mapper/live-overlay-pool 0 "create_thin 0" # Create a snapshot of the base image - echo 0 "$sz" thin /dev/mapper/live-overlay-pool 0 "$base" | dmsetup create live-rw + echo 0 "$thin_data_sz" thin /dev/mapper/live-overlay-pool 0 "$base" | dmsetup create live-rw elif [ -z "$overlayfs" ]; then echo 0 "$sz" snapshot "$base" "$over" PO 8 | dmsetup create live-rw fi