summaryrefslogtreecommitdiffstats
path: root/scripts/zpool-config/scsi_debug-raid0.sh
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2014-02-04 16:09:55 -0800
committerBrian Behlendorf <[email protected]>2014-02-12 09:37:46 -0800
commit99d3ece84797086407fbb4d94d3817f2dc891af0 (patch)
treea57d55eb41b30f48bb0648f2b4abb2d3ca308d2c /scripts/zpool-config/scsi_debug-raid0.sh
parentf12971e6f5cf0e84e385eb9636fbe2ae313ab257 (diff)
Add default FILEDIR path to zpool-config scripts
Allow the caller of the zpool-create.sh script to override the default path where file vdevs are created. This allows for greated flexibilty when scripting. Additionally, update the default path from /tmp/ to /var/tmp/ because these days /tmp/ is likely a ramdisk. Even though these files are sparse they may grow large in which case they should be backed by a physical device. Signed-off-by: Richard Yao <[email protected]> Signed-off-by: Tim Chase <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #2120
Diffstat (limited to 'scripts/zpool-config/scsi_debug-raid0.sh')
-rw-r--r--scripts/zpool-config/scsi_debug-raid0.sh5
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/zpool-config/scsi_debug-raid0.sh b/scripts/zpool-config/scsi_debug-raid0.sh
index 797ea8019..fc0979817 100644
--- a/scripts/zpool-config/scsi_debug-raid0.sh
+++ b/scripts/zpool-config/scsi_debug-raid0.sh
@@ -9,9 +9,8 @@ SDHOSTS=${SDHOSTS:-1}
SDTGTS=${SDTGTS:-1}
SDLUNS=${SDLUNS:-1}
LDMOD=/sbin/modprobe
-FILES="/tmp/zpool-vdev0 \
- /tmp/zpool-vdev1 \
- /tmp/zpool-vdev2"
+FILEDIR=${FILEDIR:-/var/tmp}
+FILES=${FILES:-"$FILEDIR/file-vdev0 $FILEDIR/file-vdev1 $FILEDIR/file-vdev2"}
DEVICES=""
zpool_create() {