summaryrefslogtreecommitdiffstats
path: root/scripts/zpool-config/file-raid10.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/file-raid10.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/file-raid10.sh')
-rw-r--r--scripts/zpool-config/file-raid10.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/zpool-config/file-raid10.sh b/scripts/zpool-config/file-raid10.sh
index ae7f0ae07..fa297b424 100644
--- a/scripts/zpool-config/file-raid10.sh
+++ b/scripts/zpool-config/file-raid10.sh
@@ -3,10 +3,9 @@
# 4 File Raid-10 Configuration
#
-FILES_M1="/tmp/zpool-vdev0 \
- /tmp/zpool-vdev1"
-FILES_M2="/tmp/zpool-vdev2 \
- /tmp/zpool-vdev3"
+FILEDIR=${FILEDIR:-/var/tmp}
+FILES_M1=${FILES_M1:-"$FILEDIR/file-vdev0 $FILEDIR/file-vdev1"}
+FILES_M2=${FILES_M2:-"$FILEDIR/file-vdev2 $FILEDIR/file-vdev3"}
FILES="${FILES_M1} ${FILES_M2}"
zpool_create() {