From 4ed955e28085422cd6eca69e9956ae5067199229 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 13 Oct 2017 12:39:39 -0700 Subject: [PATCH] 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 Reviewed-by: George Melikov Reviewed-by: Giuseppe Di Natale Signed-off-by: Brian Behlendorf Closes #6758 --- scripts/zloop.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/zloop.sh b/scripts/zloop.sh index 3a6db40cf..854c2048a 100755 --- a/scripts/zloop.sh +++ b/scripts/zloop.sh @@ -37,7 +37,7 @@ DEFAULTCOREDIR=/var/tmp/zloop function usage { - echo -e "\n$0 [-t ] [-c ]" \ + echo -e "\n$0 [-t ] [ -s ] [-c ]" \ "[ -- [extra ztest parameters]]\n" \ "\n" \ " This script runs ztest repeatedly with randomized arguments.\n" \ @@ -49,6 +49,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" \ @@ -151,9 +152,11 @@ function store_core coredir=$DEFAULTCOREDIR workdir=$DEFAULTWORKDIR 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 ]] && workdir=$(readlink -f "$OPTARG") ;; h ) usage @@ -214,7 +217,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" -- 2.40.0