Skip to content

Commit

Permalink
fix(dmsquash-live): use the overlay size with thin provisioning
Browse files Browse the repository at this point in the history
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`).
  • Loading branch information
gregory-lee-bartholomew authored and Conan-Kudo committed Apr 1, 2024
1 parent 71109ae commit f35ad9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules.d/90dmsquash-live/dmsquash-live-root.sh
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,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
Expand Down

0 comments on commit f35ad9e

Please sign in to comment.