[PC-BSD Commits] r9834 - pcbsd/current/build-files/src-patches
svn at pcbsd.org
svn at pcbsd.org
Wed Mar 30 12:17:45 PDT 2011
Author: kris
Date: 2011-03-30 12:17:45 -0700 (Wed, 30 Mar 2011)
New Revision: 9834
Modified:
pcbsd/current/build-files/src-patches/patch-gmirror-fixes
Log:
Updated gmirror patch, fixes using gmirror on regular UFS file systems, and fixed some issues
with ZFS on gmirror as well
Modified: pcbsd/current/build-files/src-patches/patch-gmirror-fixes
===================================================================
--- pcbsd/current/build-files/src-patches/patch-gmirror-fixes 2011-03-29 18:22:55 UTC (rev 9833)
+++ pcbsd/current/build-files/src-patches/patch-gmirror-fixes 2011-03-30 19:17:45 UTC (rev 9834)
@@ -1,7 +1,21 @@
diff -ruN usr.sbin/pc-sysinstall/backend/functions-cleanup.sh usr.sbin/pc-sysinstall/backend/functions-cleanup.sh
---- usr.sbin/pc-sysinstall/backend/functions-cleanup.sh 2011-03-22 12:05:24.887128625 -0400
-+++ usr.sbin/pc-sysinstall/backend/functions-cleanup.sh 2011-03-22 12:50:57.000000000 -0400
-@@ -144,6 +144,7 @@
+--- usr.sbin/pc-sysinstall/backend/functions-cleanup.sh 2011-03-30 13:47:24.793804684 -0400
++++ usr.sbin/pc-sysinstall/backend/functions-cleanup.sh 2011-03-30 15:09:53.558134990 -0400
+@@ -89,6 +89,13 @@
+
+ if [ "$PARTFS" = "ZFS" ]
+ then
++
++ # Create a list of zpool names we can export
++ echo $ZPOOLEXPORTS | grep -q "$ZPOOLNAME "
++ if [ $? -ne 0 ] ; then
++ export ZPOOLEXPORTS="$ZPOOLNAME $ZPOOLEXPORTS"
++ fi
++
+ # Check if we have multiple zfs mounts specified
+ for ZMNT in `echo ${PARTMNT} | sed 's|,| |g'`
+ do
+@@ -144,6 +151,7 @@
# Loop through the partitions, and start creating /etc/fstab
for PART in `ls ${PARTDIR}`
do
@@ -9,7 +23,7 @@
PARTFS="`cat ${PARTDIR}/${PART} | cut -d ':' -f 1`"
PARTMNT="`cat ${PARTDIR}/${PART} | cut -d ':' -f 2`"
PARTENC="`cat ${PARTDIR}/${PART} | cut -d ':' -f 3`"
-@@ -212,7 +213,7 @@
+@@ -212,7 +220,7 @@
# Save the BOOTFS for call at the end
if [ "${PARTMNT}" = "/boot" ] ; then
@@ -18,7 +32,7 @@
BOOTMNT="${BOOT_PART_MOUNT}"
PARTMNT="${BOOTMNT}"
fi
-@@ -254,7 +255,7 @@
+@@ -254,7 +262,7 @@
MIRRORBAL="`cat ${DISK} | cut -d ':' -f 2`"
# Create this mirror device
@@ -28,9 +42,9 @@
sleep 3
diff -ruN usr.sbin/pc-sysinstall/backend/functions-disk.sh usr.sbin/pc-sysinstall/backend/functions-disk.sh
---- usr.sbin/pc-sysinstall/backend/functions-disk.sh 2011-03-22 12:05:24.889130485 -0400
-+++ usr.sbin/pc-sysinstall/backend/functions-disk.sh 2011-03-22 12:34:47.000000000 -0400
-@@ -246,10 +246,9 @@
+--- usr.sbin/pc-sysinstall/backend/functions-disk.sh 2011-03-30 13:47:24.793804684 -0400
++++ usr.sbin/pc-sysinstall/backend/functions-disk.sh 2011-03-30 13:48:07.918768470 -0400
+@@ -241,10 +241,9 @@
local DISK="$1"
# Check for any swaps to stop
@@ -43,10 +57,60 @@
done
# Delete the gparts now
+diff -ruN usr.sbin/pc-sysinstall/backend/functions-unmount.sh usr.sbin/pc-sysinstall/backend/functions-unmount.sh
+--- usr.sbin/pc-sysinstall/backend/functions-unmount.sh 2011-03-30 14:10:41.675822162 -0400
++++ usr.sbin/pc-sysinstall/backend/functions-unmount.sh 2011-03-30 14:56:05.577867860 -0400
+@@ -42,7 +42,15 @@
+ start_gmirror_sync()
+ {
+
+- cd ${MIRRORCFGDIR}
++ # Export any zmirrors
++ if [ -n "${ZPOOLEXPORTS}" ] ; then
++ for _zPool in $ZPOOLEXPORTS
++ do
++ rc_halt "zpool export $_zPool"
++ done
++ fi
++
++ cd ${MIRRORCFGDIR}
+ for DISK in `ls *`
+ do
+ MIRRORDISK="`cat ${DISK} | cut -d ':' -f 1`"
+@@ -55,6 +63,14 @@
+
+ done
+
++ # Import any zmirrors
++ if [ -n "${ZPOOLEXPORTS}" ] ; then
++ for _zPool in $ZPOOLEXPORTS
++ do
++ rc_halt "zpool import $_zPool"
++ done
++ fi
++
+ };
+
+ # Unmounts all our mounted file-systems
+@@ -84,10 +100,10 @@
+ EXT=""
+ fi
+
+- #if [ "${PARTFS}" = "SWAP" ]
+- #then
+- # rc_nohalt "swapoff /dev/${PART}${EXT}"
+- #fi
++ if [ "${PARTFS}" = "SWAP" ]
++ then
++ rc_nohalt "swapoff /dev/${PART}${EXT}"
++ fi
+
+ # Check if we've found "/", and unmount that last
+ if [ "$PARTMNT" != "/" -a "${PARTMNT}" != "none" -a "${PARTFS}" != "ZFS" ]
diff -ruN usr.sbin/pc-sysinstall/backend/functions.sh usr.sbin/pc-sysinstall/backend/functions.sh
---- usr.sbin/pc-sysinstall/backend/functions.sh 2011-03-22 12:05:24.889130485 -0400
-+++ usr.sbin/pc-sysinstall/backend/functions.sh 2011-03-22 12:11:03.969081340 -0400
-@@ -278,6 +278,7 @@
+--- usr.sbin/pc-sysinstall/backend/functions.sh 2011-03-30 13:47:24.792804033 -0400
++++ usr.sbin/pc-sysinstall/backend/functions.sh 2011-03-30 13:48:07.918768470 -0400
+@@ -277,6 +277,7 @@
# Need to generate a zpool name for this device
NUM=`ls ${TMPDIR}/.zpools/ | wc -l | sed 's| ||g'`
NEWNAME="${BASENAME}${NUM}"
More information about the Commits
mailing list