zpool-create.sh: allow features to be disabled

The zimport.sh script makes use of the zpool-create.sh script
to construct test pools for importing with older versions of
ZoL.  It is desirable to have a way to disable all the features
so new pools can be imported with older code.

The simplest and most flexible way to achieve this was to merge
the VERBOSE_FLAG and FORCE_FLAG in to a single ZPOOL_FLAGS
variable.  The contents of this variable will be used in the
'zpool create' allowing us to easily pass arbitrary flags.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Prakash Surya <surya1@llnl.gov>
Closes #2524
This commit is contained in:
Brian Behlendorf
2014-07-22 14:43:22 -07:00
parent 1139491da7
commit 093219a6b3
30 changed files with 66 additions and 60 deletions
+2 -2
View File
@@ -58,8 +58,8 @@ zpool_create() {
MDDEVICES="${MDDEVICES} ${MDDEVICE}"
done
msg ${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${MDDEVICES}
${ZPOOL} create ${FORCE_FLAG} ${ZPOOL_NAME} ${MDDEVICES} || \
msg ${ZPOOL} create ${ZPOOL_FLAGS} ${ZPOOL_NAME} ${MDDEVICES}
${ZPOOL} create ${ZPOOL_FLAGS} ${ZPOOL_NAME} ${MDDEVICES} || \
(destroy_md_devices "${MDDEVICES}" && \
destroy_loop_devices "${LODEVICES}" && exit 1)