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 and dracutng[bot] committed Apr 1, 2024
1 parent cffcbf2 commit 9887632
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 9887632

Please sign in to comment.