diff options
author | Brian Behlendorf <[email protected]> | 2009-01-16 13:57:12 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2009-01-16 13:57:12 -0800 |
commit | 7b5ceef9df956a682c03704d6ac89da3dc6f5251 (patch) | |
tree | caedf3c670f0706f8352be3b4e65c79f31bfbc4a /scripts | |
parent | 89ed0482307c45312542377ebbcf34159833b0ce (diff) |
Minor fixes
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/zpool-config/hda-raid0.cfg | 8 | ||||
-rw-r--r-- | scripts/zpool-config/lo-raid0.cfg | 6 | ||||
-rw-r--r-- | scripts/zpool-config/x4550-raid0.cfg | 2 | ||||
-rwxr-xr-x | scripts/zpool-create.sh | 6 |
4 files changed, 14 insertions, 8 deletions
diff --git a/scripts/zpool-config/hda-raid0.cfg b/scripts/zpool-config/hda-raid0.cfg new file mode 100644 index 000000000..13a55e194 --- /dev/null +++ b/scripts/zpool-config/hda-raid0.cfg @@ -0,0 +1,8 @@ +#!/bin/bash +# +# Single disk /dev/hda Raid-0 Configuration +# + +DEVICES="/dev/hda" + +${CMDDIR}/zpool/zpool create -f ${ZPOOL_NAME} ${DEVICES} || exit 1 diff --git a/scripts/zpool-config/lo-raid0.cfg b/scripts/zpool-config/lo-raid0.cfg index ce011f0b3..f306d57e9 100644 --- a/scripts/zpool-config/lo-raid0.cfg +++ b/scripts/zpool-config/lo-raid0.cfg @@ -10,12 +10,10 @@ DEVICES="/tmp/zpool-vdev0 \ /tmp/zpool-vdev4" for DEV in ${DEVICES}; do - local DEV_LO=`/sbin/losetup -f` - rm -f ${DEV} || exit 1 dd if=/dev/zero of=${DEV} bs=1024k count=512 || exit 1 - losetup ${DEV_LO} ${DEV} || exit 1 + losetup `/sbin/losetup -f` ${DEV} || exit 1 done -${CMDDIR}/zpool/zpool create ${ZPOOL_NAME} ${DEVICES} || exit 1 +${CMDDIR}/zpool/zpool create -f ${ZPOOL_NAME} ${DEVICES} || exit 1 diff --git a/scripts/zpool-config/x4550-raid0.cfg b/scripts/zpool-config/x4550-raid0.cfg index d3faede9e..05bbfdf77 100644 --- a/scripts/zpool-config/x4550-raid0.cfg +++ b/scripts/zpool-config/x4550-raid0.cfg @@ -12,4 +12,4 @@ DEVICES="/dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf \ /dev/sdak /dev/sdal /dev/sdam /dev/sdan /dev/sdao /dev/sdap \ /dev/sdaq /dev/sdar /dev/sdas /dev/sdat /dev/sdau /dev/sdav" -${CMDDIR}/zpool/zpool create ${ZPOOL_NAME} ${DEVICES} || exit 1 +${CMDDIR}/zpool/zpool create -f ${ZPOOL_NAME} ${DEVICES} || exit 1 diff --git a/scripts/zpool-create.sh b/scripts/zpool-create.sh index 3a33952d1..e46b02cdd 100755 --- a/scripts/zpool-create.sh +++ b/scripts/zpool-create.sh @@ -1,7 +1,7 @@ #!/bin/bash . ./common.sh -PROG=create-zpool.sh +PROG=zpool-create.sh usage() { cat << EOF @@ -50,7 +50,7 @@ while getopts 'hvc:p:' OPTION; do VERBOSE=1 ;; c) - ZPOOL_CONFIG=${TOPDIR}/scripts/zpool-config/${OPTARG} + ZPOOL_CONFIG=${TOPDIR}/scripts/zpool-config/${OPTARG}.cfg ;; p) ZPOOL_NAME=${OPTARG} @@ -73,6 +73,6 @@ if [ ${VERBOSE} ]; then echo echo "zpool status ${ZPOOL_NAME}" ${CMDDIR}/zpool/zpool status ${ZPOOL_NAME} || exit 1 -} +fi exit 0 |