aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/zpool-config/scsi_debug-raidz2.sh
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2017-08-15 17:26:38 -0700
committerGitHub <[email protected]>2017-08-15 17:26:38 -0700
commitc8f9061fc714696a53cf4d14a4567f0a83dbf862 (patch)
tree42e8a39488899046384f9bb5e350032f438a3ae4 /scripts/zpool-config/scsi_debug-raidz2.sh
parent70322be8dc160f003fa95e034462ad625b325568 (diff)
Retire legacy test infrastructure
* Removed zpios kmod, utility, headers and man page. * Removed unused scripts zpios-profile/*, zpios-test/*, zpool-config/*, smb.sh, zpios-sanity.sh, zpios-survey.sh, zpios.sh, and zpool-create.sh. * Removed zfs-script-config.sh.in. When building 'make' generates a common.sh with in-tree path information from the common.sh.in template. This file and sourced by the test scripts and used for in-tree testing, it is not included in the packages. When building packages 'make install' uses the same template to create a new common.sh which is appropriate for the packaging. * Removed unused functions/variables from scripts/common.sh.in. Only minimal path information and configuration environment variables remain. * Removed unused scripts from scripts/ directory. * Remaining shell scripts in the scripts directory updated to cleanly pass shellcheck and added to checked scripts. * Renamed tests/test-runner/cmd/ to tests/test-runner/bin/ to match install location name. * Removed last traces of the --enable-debug-dmu-tx configure options which was retired some time ago. Reviewed-by: Giuseppe Di Natale <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #6509
Diffstat (limited to 'scripts/zpool-config/scsi_debug-raidz2.sh')
-rw-r--r--scripts/zpool-config/scsi_debug-raidz2.sh78
1 files changed, 0 insertions, 78 deletions
diff --git a/scripts/zpool-config/scsi_debug-raidz2.sh b/scripts/zpool-config/scsi_debug-raidz2.sh
deleted file mode 100644
index 67a6f243a..000000000
--- a/scripts/zpool-config/scsi_debug-raidz2.sh
+++ /dev/null
@@ -1,78 +0,0 @@
-#!/bin/bash
-#
-# 1 scsi_debug device for fault injection and 3 loopback devices
-# on top of which is layered raidz2.
-#
-
-SDSIZE=${SDSIZE:-256}
-SDHOSTS=${SDHOSTS:-1}
-SDTGTS=${SDTGTS:-1}
-SDLUNS=${SDLUNS:-1}
-LDMOD=/sbin/modprobe
-FILEDIR=${FILEDIR:-/var/tmp}
-FILES=${FILES:-"$FILEDIR/file-vdev0 $FILEDIR/file-vdev1 $FILEDIR/file-vdev2"}
-DEVICES=""
-
-zpool_create() {
- check_loop_utils
- check_sd_utils
-
- test `${LSMOD} | grep -c scsi_debug` -gt 0 && \
- (echo 0 >/sys/module/scsi_debug/parameters/every_nth && \
- ${RMMOD} scsi_debug || exit 1)
- udev_trigger
-
- msg "${LDMOD} scsi_debug dev_size_mb=${SDSIZE} " \
- "add_host=${SDHOSTS} num_tgts=${SDTGTS} " \
- "max_luns=${SDLUNS}"
- ${LDMOD} scsi_debug \
- dev_size_mb=${SDSIZE} \
- add_host=${SDHOSTS} \
- num_tgts=${SDTGTS} \
- max_luns=${SDLUNS} || \
- die "Error $? creating scsi_debug devices"
- udev_trigger
-
- SDDEVICE=`${LSSCSI} | ${AWK} '/scsi_debug/ { print $6; exit }'`
- msg "${PARTED} -s ${SDDEVICE} mklabel gpt"
- ${PARTED} -s ${SDDEVICE} mklabel gpt || \
- (${RMMOD} scsi_debug && die "Error $? creating gpt label")
-
- for FILE in ${FILES}; do
- LODEVICE=`unused_loop_device`
-
- rm -f ${FILE} || exit 1
- dd if=/dev/zero of=${FILE} bs=1024k count=0 seek=256 \
- &>/dev/null || (${RMMOD} scsi_debug && \
- die "Error $? creating ${FILE}")
-
- # Setup the loopback device on the file.
- msg "Creating ${LODEVICE} using ${FILE}"
- ${LOSETUP} ${LODEVICE} ${FILE} || (${RMMOD} scsi_debug \
- die "Error $? creating ${LODEVICE} using ${FILE}")
-
- DEVICES="${DEVICES} ${LODEVICE}"
- done
-
- DEVICES="${DEVICES} ${SDDEVICE}"
-
- msg "${ZPOOL} create ${ZPOOL_FLAGS} ${ZPOOL_NAME} raidz2 ${DEVICES}"
- ${ZPOOL} create ${ZPOOL_FLAGS} ${ZPOOL_NAME} raidz2 ${DEVICES} || \
- (${RMMOD} scsi_debug && exit 1)
-}
-
-zpool_destroy() {
- msg ${ZPOOL} destroy ${ZPOOL_NAME}
- ${ZPOOL} destroy ${ZPOOL_NAME}
-
- for FILE in ${FILES}; do
- LODEVICE=`${LOSETUP} -a | grep ${FILE} | head -n1|cut -f1 -d:`
- msg "Removing ${LODEVICE} using ${FILE}"
- ${LOSETUP} -d ${LODEVICE} ||
- die "Error $? destroying ${LODEVICE} using ${FILE}"
- rm -f ${FILE} || exit 1
- done
-
- msg "${RMMOD} scsi_debug"
- ${RMMOD} scsi_debug || die "Error $? removing scsi_debug devices"
-}