bin/149599: pc-sysinstall patch for zpool vdevs
John Hixson
john at ixsystems.com
Thu Aug 12 22:30:02 UTC 2010
>Number: 149599
>Category: bin
>Synopsis: pc-sysinstall patch for zpool vdevs
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Thu Aug 12 22:30:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: John Hixson
>Release: 9.0-CURRENT
>Organization:
iXsystems
>Environment:
FreeBSD thinkbsd 9.0-CURRENT FreeBSD 9.0-CURRENT #0: Tue Jul 13 09:31:39 PDT 2010 john at thinkbsd:/usr/src/sys/amd64/compile/THINKBSD amd64
>Description:
Simple patch to add support zpool virtual devices that are not currently supported.
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
diff -urN usr.sbin/pc-sysinstall.orig/backend/functions-bsdlabel.sh usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh
--- usr.sbin/pc-sysinstall.orig/backend/functions-bsdlabel.sh 2010-06-27 09:46:11.000000000 -0700
+++ usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh 2010-08-12 15:24:12.000000000 -0700
@@ -58,20 +58,13 @@
echo $LINE | grep '^ZFS' >/dev/null 2>/dev/null
if [ "$?" = "0" ] ; then
ZTYPE="NONE"
- ZFSVARS="`echo $LINE | cut -d '(' -f 2- | cut -d ')' -f 1`"
+ ZFSVARS="`echo $LINE | cut -d '(' -f 2- | cut -d ')' -f 1 | xargs`"
- # Check if we are doing raidz setup
- echo $ZFSVARS | grep "^raidz:" >/dev/null 2>/dev/null
- if [ "$?" = "0" ] ; then
- ZTYPE="raidz"
- ZFSVARS="`echo $ZFSVARS | sed 's|raidz: ||g' | sed 's|raidz:||g'`"
- fi
-
- echo $ZFSVARS | grep "^mirror:" >/dev/null 2>/dev/null
- if [ "$?" = "0" ] ; then
- ZTYPE="mirror"
- ZFSVARS="`echo $ZFSVARS | sed 's|mirror: ||g' | sed 's|mirror:||g'`"
- fi
+ echo $ZFSVARS | grep -E "^(disk|file|mirror|raidz(1|2)?|spare|log|cache):" >/dev/null 2>/dev/null
+ if [ "$?" = "0" ] ; then
+ ZTYPE=`echo $ZFSVARS | cut -f1 -d:`
+ ZFSVARS=`echo $ZFSVARS | sed "s|$ZTYPE: ||g" | sed "s|$ZTYPE:||g"`
+ fi
# Return the ZFS options
if [ "${ZTYPE}" = "NONE" ] ; then
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list