Skip to content

Commit

Permalink
with thin provisioning, use the overlay size, not the base image size
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 Jan 9, 2024
1 parent 4980bad commit f84e63d
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 @@ -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
Expand Down

0 comments on commit f84e63d

Please sign in to comment.