|
Harald Hoyer |
bb31e7 |
From 49c9d8174ff7c25158861872bc0ea04a8cf2d242 Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
bb31e7 |
From: Frederick Grose <fgrose@sugarlabs.org>
|
|
Harald Hoyer |
bb31e7 |
Date: Mon, 9 Nov 2015 10:46:27 -0800
|
|
Harald Hoyer |
bb31e7 |
Subject: [PATCH] dmsquash-live-root: Use non-persistent metadata snapshots.
|
|
Harald Hoyer |
bb31e7 |
|
|
Harald Hoyer |
bb31e7 |
Transient snapshots can take advantage of smaller,
|
|
Harald Hoyer |
bb31e7 |
non-persistent metadata structures.
|
|
Harald Hoyer |
bb31e7 |
Make the --readonly option explicit rather than inferred
|
|
Harald Hoyer |
bb31e7 |
for the readonly_overlay target.
|
|
Harald Hoyer |
bb31e7 |
Assure that the live-base target is on the BASE_LOOPDEV.
|
|
Harald Hoyer |
bb31e7 |
---
|
|
Harald Hoyer |
bb31e7 |
modules.d/90dmsquash-live/dmsquash-live-root.sh | 6 +++---
|
|
Harald Hoyer |
bb31e7 |
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
Harald Hoyer |
bb31e7 |
|
|
Harald Hoyer |
bb31e7 |
diff --git a/modules.d/90dmsquash-live/dmsquash-live-root.sh b/modules.d/90dmsquash-live/dmsquash-live-root.sh
|
|
Harald Hoyer |
bb31e7 |
index 531617e..caf473b 100755
|
|
Harald Hoyer |
bb31e7 |
--- a/modules.d/90dmsquash-live/dmsquash-live-root.sh
|
|
Harald Hoyer |
bb31e7 |
+++ b/modules.d/90dmsquash-live/dmsquash-live-root.sh
|
|
Harald Hoyer |
bb31e7 |
@@ -141,7 +141,7 @@ do_live_overlay() {
|
|
Harald Hoyer |
bb31e7 |
# set up the snapshot
|
|
Harald Hoyer |
bb31e7 |
sz=$(blockdev --getsz $BASE_LOOPDEV)
|
|
Harald Hoyer |
bb31e7 |
if [ -n "$readonly_overlay" ]; then
|
|
Harald Hoyer |
bb31e7 |
- echo 0 $sz snapshot $BASE_LOOPDEV $OVERLAY_LOOPDEV p 8 | dmsetup create $readonly_overlay live-ro
|
|
Harald Hoyer |
bb31e7 |
+ echo 0 $sz snapshot $BASE_LOOPDEV $OVERLAY_LOOPDEV N 8 | dmsetup create --readonly live-ro
|
|
Harald Hoyer |
bb31e7 |
base="/dev/mapper/live-ro"
|
|
Harald Hoyer |
bb31e7 |
over=$RO_OVERLAY_LOOPDEV
|
|
Harald Hoyer |
bb31e7 |
else
|
|
Harald Hoyer |
bb31e7 |
@@ -175,7 +175,7 @@ do_live_overlay() {
|
|
Harald Hoyer |
bb31e7 |
fi
|
|
Harald Hoyer |
bb31e7 |
|
|
Harald Hoyer |
bb31e7 |
# Create a device that always points to a ro base image
|
|
Harald Hoyer |
bb31e7 |
- echo 0 $sz linear $base 0 | dmsetup create --readonly live-base
|
|
Harald Hoyer |
bb31e7 |
+ echo 0 $sz linear $BASE_LOOPDEV 0 | dmsetup create --readonly live-base
|
|
Harald Hoyer |
bb31e7 |
}
|
|
Harald Hoyer |
bb31e7 |
|
|
Harald Hoyer |
bb31e7 |
# live cd helper function
|
|
Harald Hoyer |
bb31e7 |
@@ -259,7 +259,7 @@ fi
|
|
Harald Hoyer |
bb31e7 |
if [ -b "$OSMIN_LOOPDEV" ]; then
|
|
Harald Hoyer |
bb31e7 |
# set up the devicemapper snapshot device, which will merge
|
|
Harald Hoyer |
bb31e7 |
# the normal live fs image, and the delta, into a minimzied fs image
|
|
Harald Hoyer |
bb31e7 |
- echo "0 $( blockdev --getsz $BASE_LOOPDEV ) snapshot $BASE_LOOPDEV $OSMIN_LOOPDEV p 8" | dmsetup create --readonly live-osimg-min
|
|
Harald Hoyer |
bb31e7 |
+ echo "0 $( blockdev --getsz $BASE_LOOPDEV ) snapshot $BASE_LOOPDEV $OSMIN_LOOPDEV N 8" | dmsetup create --readonly live-osimg-min
|
|
Harald Hoyer |
bb31e7 |
fi
|
|
Harald Hoyer |
bb31e7 |
|
|
Harald Hoyer |
bb31e7 |
ROOTFLAGS="$(getarg rootflags)"
|