--- etc/default/lu.orig Fri Nov 21 19:05:32 2008 +++ etc/default/lu Fri Jan 2 13:57:12 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 Fri Nov 21 19:06:50 2008 +++ usr/lib/lu/lulib Fri Jan 2 14:57:57 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 @@ -202,6 +203,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 Fri Nov 21 19:06:49 2008 +++ usr/lib/lu/ludefine Fri Jan 2 15:00:03 2009 @@ -382,7 +382,7 @@ fi # 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 Sep 25 01:58:58 2008 +++ usr/lib/lu/lumk_iconf Fri Jan 2 15:24:55 2009 @@ -726,9 +726,8 @@ done >> "$TMP_RESULTS" # Make sure that the ICF file is sorted -sort -u $TMP_RESULTS | - /usr/bin/awk -F: '{print length($2) "\t" $0}' | - /usr/bin/sort -n | /usr/bin/cut -f2- > $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 Thu Sep 25 01:58:56 2008 +++ usr/lib/lu/luclonefs Thu Jan 1 20:57:30 2009 @@ -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