diff options
author | Brian Behlendorf <[email protected]> | 2014-02-04 16:09:55 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2014-02-12 09:37:46 -0800 |
commit | 99d3ece84797086407fbb4d94d3817f2dc891af0 (patch) | |
tree | a57d55eb41b30f48bb0648f2b4abb2d3ca308d2c /scripts/zpool-config/lo-faulty-raid0.sh | |
parent | f12971e6f5cf0e84e385eb9636fbe2ae313ab257 (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/lo-faulty-raid0.sh')
-rw-r--r-- | scripts/zpool-config/lo-faulty-raid0.sh | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/zpool-config/lo-faulty-raid0.sh b/scripts/zpool-config/lo-faulty-raid0.sh index 10b8f88bc..bf057bba1 100644 --- a/scripts/zpool-config/lo-faulty-raid0.sh +++ b/scripts/zpool-config/lo-faulty-raid0.sh @@ -9,10 +9,9 @@ # <--------------------- raid0 zpool ---------------------> # -FILES="/tmp/zpool-vdev0 \ - /tmp/zpool-vdev1 \ - /tmp/zpool-vdev2 \ - /tmp/zpool-vdev3" +FILEDIR=${FILEDIR:-/var/tmp} +FILES=${FILES:-"$FILEDIR/file-vdev0 $FILEDIR/file-vdev1 \ + $FILEDIR/file-vdev2 $FILEDIR/file-vdev3"} LODEVICES="" MDDEVICES="" |