diff --git a/scripts/zpios-profile/zpios-profile-disk.sh b/scripts/zpios-profile/zpios-profile-disk.sh index 38607a5492..b56ee1ee40 100755 --- a/scripts/zpios-profile/zpios-profile-disk.sh +++ b/scripts/zpios-profile/zpios-profile-disk.sh @@ -1,5 +1,4 @@ #!/bin/bash -# profile-zpios-disk.sh # # /proc/diskinfo # Field 1 -- device name @@ -15,6 +14,8 @@ # Field 11 -- # of milliseconds spent doing I/Os # Field 12 -- weighted # of milliseconds spent doing I/Os +PROG=zpios-profile-disk.sh + RUN_PIDS=${0} RUN_LOG_DIR=${1} RUN_ID=${2} diff --git a/scripts/zpios-profile/zpios-profile-pids.sh b/scripts/zpios-profile/zpios-profile-pids.sh index 22779dc194..3514b38e2a 100755 --- a/scripts/zpios-profile/zpios-profile-pids.sh +++ b/scripts/zpios-profile/zpios-profile-pids.sh @@ -1,5 +1,6 @@ #!/bin/bash -# profile-zpios-pids.sh + +PROG=zpios-profile-pids.sh RUN_PIDS=${0} RUN_LOG_DIR=${1} diff --git a/scripts/zpios-profile/zpios-profile-post.sh b/scripts/zpios-profile/zpios-profile-post.sh index 8f770f3819..0f2d59b0bb 100755 --- a/scripts/zpios-profile/zpios-profile-post.sh +++ b/scripts/zpios-profile/zpios-profile-post.sh @@ -1,7 +1,7 @@ #!/bin/bash -prog=profile-zpios-post.sh . ../.script-config +PROG=zpios-profile-post.sh RUN_POST=${0} RUN_PHASE=${1} @@ -19,10 +19,10 @@ RUN_THREAD_DELAY=${12} RUN_FLAGS=${13} RUN_RESULT=${14} -PROFILE_ZPIOS_PIDS_BIN=${TOPDIR}/scripts/profile-zpios-pids.sh +PROFILE_ZPIOS_PIDS_BIN=${TOPDIR}/scripts/zpios-profile/zpios-profile-pids.sh PROFILE_ZPIOS_PIDS_LOG=${RUN_LOG_DIR}/${RUN_ID}/pids-summary.csv -PROFILE_ZPIOS_DISK_BIN=${TOPDIR}/scripts/profile-zpios-disk.sh +PROFILE_ZPIOS_DISK_BIN=${TOPDIR}/scripts/zpios-/profile/zpios-profile-disk.sh PROFILE_ZPIOS_DISK_LOG=${RUN_LOG_DIR}/${RUN_ID}/disk-summary.csv PROFILE_ZPIOS_ARC_LOG=${RUN_LOG_DIR}/${RUN_ID}/arcstats diff --git a/scripts/zpios-profile/zpios-profile-pre.sh b/scripts/zpios-profile/zpios-profile-pre.sh index 64801d3bf7..2d6d1be2dd 100755 --- a/scripts/zpios-profile/zpios-profile-pre.sh +++ b/scripts/zpios-profile/zpios-profile-pre.sh @@ -1,7 +1,7 @@ #!/bin/bash -prog=profile-zpios-pre.sh -. ../.script-config +. ../common.sh +PROG=zpios-profile-pre.sh trap "PROFILE_ZPIOS_READY=1" SIGHUP @@ -21,7 +21,7 @@ RUN_THREAD_DELAY=${12} RUN_FLAGS=${13} RUN_RESULT=${14} -PROFILE_ZPIOS_BIN=${IOPDIR}/scripts/profile-zpios.sh +PROFILE_ZPIOS_BIN=${IOPDIR}/scripts/zpios-profile/zpios-profile.sh PROFILE_ZPIOS_READY=0 OPROFILE_LOG=${RUN_LOG_DIR}/${RUN_ID}/oprofile.txt diff --git a/scripts/zpios-profile/zpios-profile.sh b/scripts/zpios-profile/zpios-profile.sh index fe4fc3cd35..d3ff779eac 100755 --- a/scripts/zpios-profile/zpios-profile.sh +++ b/scripts/zpios-profile/zpios-profile.sh @@ -1,5 +1,7 @@ #!/bin/bash -# profile-zpios.sh + + +PROG=zpios-profile.sh trap "RUN_DONE=1" SIGHUP diff --git a/scripts/zpios-test/small.cfg b/scripts/zpios-test/small.cfg index 3e2d0d8454..35dbf016df 100755 --- a/scripts/zpios-test/small.cfg +++ b/scripts/zpios-test/small.cfg @@ -47,4 +47,4 @@ ZPIOS_CMD="${CMDDIR}/zpios/zpios \ --cleanup \ --verbose \ --human-readable \ - ${ZPIOS_OPTIONS} + ${ZPIOS_OPTIONS}" diff --git a/scripts/zpios.sh b/scripts/zpios.sh index 57c90ba750..aca22026b8 100755 --- a/scripts/zpios.sh +++ b/scripts/zpios.sh @@ -6,8 +6,9 @@ . ./common.sh PROG=zpios.sh -PROFILE_ZPIOS_PRE=${TOPDIR}/scripts/profile-zpios-pre.sh -PROFILE_ZPIOS_POST=${TOPDIR}/scripts/profile-zpios-post.sh +PROFILE_ZPIOS_PRE=${TOPDIR}/scripts/zpios-profile/zpios-profile-pre.sh +PROFILE_ZPIOS_POST=${TOPDIR}/scripts/zpios-profile/zpios-profile-post.sh +PROFILE_ZPIOS_LOG=/tmp/ MODULES=( \ ${MODDIR}/zpios/zpios.ko \ @@ -25,7 +26,7 @@ OPTIONS: -h Show this message -v Verbose -p Enable profiling - -c Specify disk configuration + -c Zpool configuration EOF } @@ -153,7 +154,6 @@ if check_modules; then fi fi -msg "Waiting for /dev/zpios to come up..." while [ ! -c /dev/zpios ]; do sleep 1 done @@ -176,7 +176,7 @@ fi . ${ZPIOS_TEST} if [ $PROFILE ]; then - ZPIOS_CMD="${ZPIOS_CMD} --log=${PROFILE_ZPIOS_LOGS}" + ZPIOS_CMD="${ZPIOS_CMD} --log=${PROFILE_ZPIOS_LOG}" ZPIOS_CMD="${ZPIOS_CMD} --prerun=${PROFILE_ZPIOS_PRE}" ZPIOS_CMD="${ZPIOS_CMD} --postrun=${PROFILE_ZPIOS_POST}" fi diff --git a/scripts/zpool-config/hda-raid0.cfg b/scripts/zpool-config/hda-raid0.cfg new file mode 100644 index 0000000000..13a55e194c --- /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 ce011f0b34..f306d57e9f 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 d3faede9eb..05bbfdf77f 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 3a33952d1b..e46b02cdda 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