summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2017-10-13 12:39:39 -0700
committerGitHub <[email protected]>2017-10-13 12:39:39 -0700
commitaea899a6fabbd8d0daf25a23ba114804b022529b (patch)
tree2ccf10f5f6ba51bd7a4e77e204a3fed56db3d56f /scripts
parent21a932b83c3e0c6fe5f42f874fd3664e67f374c7 (diff)
Increase default zloop.sh vdev size
The default 128M vdev size used by zloop.sh isn't always large enough and can result in ENOSPC failures which suspend the pool. Increase the default size to 512M and provide a -s option which can be used to specify an alternate size. This does increase the free space requirements to run zloop.sh. However, since the vdevs are sparse 4x the space is not required. Reviewed-by: Don Brady <[email protected]> Reviewed-by: George Melikov <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #6758
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/zloop.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/zloop.sh b/scripts/zloop.sh
index 3139bd42b..a45c45024 100755
--- a/scripts/zloop.sh
+++ b/scripts/zloop.sh
@@ -36,7 +36,7 @@ DEFAULTCOREDIR=/var/tmp/zloop
function usage
{
- echo -e "\n$0 [-t <timeout>] [-c <dump directory>]" \
+ echo -e "\n$0 [-t <timeout>] [ -s <vdev size> ] [-c <dump directory>]" \
"[ -- [extra ztest parameters]]\n" \
"\n" \
" This script runs ztest repeatedly with randomized arguments.\n" \
@@ -48,6 +48,7 @@ function usage
" Options:\n" \
" -t Total time to loop for, in seconds. If not provided,\n" \
" zloop runs forever.\n" \
+ " -s Size of vdev devices.\n" \
" -f Specify working directory for ztest vdev files.\n" \
" -c Specify a core dump directory to use.\n" \
" -h Print this help message.\n" \
@@ -161,9 +162,11 @@ coredir=$DEFAULTCOREDIR
basedir=$DEFAULTWORKDIR
rundir="zloop-run"
timeout=0
-while getopts ":ht:c:f:" opt; do
+size="512m"
+while getopts ":ht:s:c:f:" opt; do
case $opt in
t ) [[ $OPTARG -gt 0 ]] && timeout=$OPTARG ;;
+ s ) [[ $OPTARG ]] && size=$OPTARG ;;
c ) [[ $OPTARG ]] && coredir=$OPTARG ;;
f ) [[ $OPTARG ]] && basedir=$(readlink -f "$OPTARG") ;;
h ) usage
@@ -232,7 +235,6 @@ while [[ $timeout -eq 0 ]] || [[ $curtime -le $((starttime + timeout)) ]]; do
align=$(((RANDOM % 2) * 3 + 9))
runtime=$((RANDOM % 100))
passtime=$((RANDOM % (runtime / 3 + 1) + 10))
- size=128m
zopt="$zopt -m $mirrors"
zopt="$zopt -r $raidz"