[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Fedora-livecd-list] [PATCH] rebootless installer / live migration support for mayflower



In the name of release-early-release-often, here is an untested patch to livecd-tools mayflower script, which I believe adds support for rebootless installation.

A proof of concept rebootless installer should hopefully be forthcoming in a day or so, and an anaconda based one in a week or so.

Note, that the prior patch I had, was actually missing a --force flag on the mdadm build command. But don't worry, mdadm is out of the picture since it's --grow feature wouldn't work for me. This patch is far superior, and is a successful implementation of the theoretical workaround #4.

I leave it as an excercise for the reader how to perform a rebootless installation manually ;)

-dmc
--- mayflower.orig	2007-07-12 04:08:00.000000000 +0000
+++ mayflower.lms	2007-07-12 07:35:10.000000000 +0000
@@ -4,6 +4,8 @@
 #
 # Copyright 2006 David Zeuthen <davidz redhat com>
 #
+# live_migrate_support by Douglas McClendon <douglas mcclendon org>
+#
 # Licensed under the GPLv2. See the file COPYING for details. 
 # Inspired by similar programs from a bunch of other distributions.
 #
@@ -236,6 +238,7 @@
 quiet=0
 shell=0
 eshell=0
+live_migrate_support=0
 live_ram=0
 check_iso=0
 live_locale=""
@@ -262,6 +265,9 @@
     eshell)
         eshell=1
         ;;
+    live_migrate_support)
+        live_migrate_support=1
+        ;;
     live_ram)
         live_ram=1
         ;;
@@ -325,6 +331,7 @@
     echo "rootfstype=\$rootfstype"
     echo "root_ro=\$root_ro"
     echo "root_rw=\$root_rw"
+    echo "live_migrate_support=\$live_migrate_support"
 fi
 
 waitforsymlink=0
@@ -561,7 +568,13 @@
     losetup /dev/loop119 /overlay
 
     # set up the snapshot
-    echo 0 \`blockdev --getsize /dev/loop121\` snapshot /dev/loop121 /dev/loop119 p 8 | dmsetup create live-rw
+    if [ "x\$live_migrate_support" == "x1" ] ; then
+        echo  0 \`blockdev --getsize /dev/loop119\` linear /dev/loop119 0 | dmsetup create live-overlay
+        echo 0 \`blockdev --getsize /dev/mapper/loop121\` snapshot /dev/loop121 /dev/mapper/live-overlay p 8 | dmsetup create live-rw-sub
+        echo  0 \`blockdev --getsize /dev/mapper/live-rw-sub\` linear /dev/mapper/live-rw-sub 0 | dmsetup create live-rw
+    else
+        echo 0 \`blockdev --getsize /dev/loop121\` snapshot /dev/loop121 /dev/loop119 p 8 | dmsetup create live-rw
+    fi
 
     # set up new /dev/root symlink
     rm -f /dev/root

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]