--- etc/default/lu.orig Sun Dec 14 20:58:04 2008 +++ etc/default/lu Sat Jan 3 22:21:46 2009 @@ -42,6 +42,18 @@ LU_SYNC_FILES=YES export LU_SYNC_FILES +# If this file exists, it contains one regular expression per line to filter +# out those filesystems, which should be ignored by lumount and friends - +# see egrep(1). +# Usually it is used like 'mount -p | /usr/bin/egrep -v -f $LU_FS2IGNORE' or +# 'zfs list | /usr/bin/egrep -v -f $LU_FS2IGNORE'. Especially for servers +# with a lot of filesystems, which have usually no meaning for the LiveUpgrade +# process itself (e.g. /export/home), this speeds up LU tremendously. However, +# if not used with care, it may also prevent LU from working properly and +# may damage the system!!! +LU_FS2IGNORE=/etc/lu/fs2ignore.regex +export LU_FS2IGNORE + # The LU_DEBUG option sets the debug level for Live Upgrade. If set to 0, # no debug output is produced. If set to a value from 1 to 10, various levels of # debug information is output to standard error. The higher the level, the --- usr/lib/lu/lulib.orig Thu Nov 13 17:49:35 2008 +++ usr/lib/lu/lulib Sat Jan 3 22:21:46 2009 @@ -117,6 +117,7 @@ LU_SYNCLIST="${LU_SYNCLIST:=/etc/lu/synclist}" ; export LU_SYNCLIST LU_SYNC_LOG_FILE="${LU_SYNC_LOG_FILE:=/etc/lu/sync.log}" ; export LU_SYNC_LOG_FILE SYNCKEY="${SYNCKEY:=/etc/lu/.SYNCKEY}" +LU_FS2IGNORE="${LU_FS2IGNORE:=/etc/lu/fs2ignore.regex}" # # variables used for Newboot aka GRUB boot @@ -205,6 +206,24 @@ fi ################################################################################ +# Name: lulib_get_fs2ignore +# Description: Check, whether LU_FS2IGNORE exists. If not, it creates one so +# that it can be used safely. +# Arguments: none +# Returns: +# The filename with one egrep(1) regex per line to be used. +################################################################################ +lulib_get_fs2ignore() { + if [ -s ${LU_FS2IGNORE} ]; then + echo ${LU_FS2IGNORE} + return + fi + RE_TMP=/tmp/.lulib.refsi.$$ + echo '^#' >$RE_TMP + echo $RE_TMP +} + +################################################################################ # This is used to loop over the list of devices in a zpool, using the # output of the 'zpool status' command # ARGS --- usr/lib/lu/ludefine.orig Thu Nov 13 17:49:34 2008 +++ usr/lib/lu/ludefine Sat Jan 3 22:21:46 2009 @@ -340,7 +340,7 @@ zoneadm -R "$BE_ROOT" list -cp | grep -v :global: | awk -F: '{print $4}' > /tmp/.ludef.excl.$$ # Capture the root zfs file system information. -mount -p | +mount -p | /usr/bin/egrep -v -f `lulib_get_fs2ignore` | /bin/nawk -v R="^$BE_ROOT" '$3 ~ R { if ($4 == "zfs") { print } }' | while read line do --- usr/lib/lu/lumk_iconf.orig Thu Nov 13 17:49:35 2008 +++ usr/lib/lu/lumk_iconf Sat Jan 3 22:24:19 2009 @@ -726,7 +726,8 @@ done >> "$TMP_RESULTS" # Make sure that the ICF file is sorted -sort -u $TMP_RESULTS > $TMP_SORTED_RESULTS +/usr/bin/egrep -v -f `lulib_get_fs2ignore` $TMP_RESULTS | sort -u -k 2,2 -t: \ + > $TMP_SORTED_RESULTS # Update the checksums of the ICF file and update the ICF file # ifself if the -F flag was specified. --- usr/lib/lu/luclonefs.orig Wed Sep 3 11:19:13 2008 +++ usr/lib/lu/luclonefs Fri Dec 12 20:33:18 2008 @@ -360,6 +360,7 @@ /sbin/zfs set zpdata:zn="$zonename" "$abe_zset" /sbin/zfs set canmount=noauto "$abe_zset" newpath=`/sbin/zfs get -Ho value mountpoint "$pbe_zset"` + newpath=`dirname $newpath`/`basename $abe_zset` if [ "$pbe_mntpt" = "/" ]; then newpath="$abe_mntpt$newpath" else