X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fost-pools.sh;h=bb0e6a241b7cca90c5039ab655e88395bada69b0;hb=b2287531b63ac56692746a67ea17f576a6d2ab81;hp=4036e5fe1a42cbca320e3573b3c6b2cefa2fa2b8;hpb=eea698c944283b755882d8f504d2fcc8ea371bd8;p=fs%2Flustre-release.git diff --git a/lustre/tests/ost-pools.sh b/lustre/tests/ost-pools.sh index 4036e5f..bb0e6a2 100644 --- a/lustre/tests/ost-pools.sh +++ b/lustre/tests/ost-pools.sh @@ -1,6 +1,6 @@ #!/bin/bash # -*- mode: Bash; tab-width: 4; indent-tabs-mode: t; -*- -# vim:autoindent:shiftwidth=4:tabstop=4: +# vim:shiftwidth=4:softtabstop=4:tabstop=4: # # Run select tests by setting ONLY, or as arguments to the script. # Skip specific tests by setting EXCEPT. @@ -29,14 +29,13 @@ init_logging check_and_setup_lustre +[ "$SLOW" = "no" ] && EXCEPT_SLOW="23b" + DIR=${DIR:-$MOUNT} assert_DIR build_test_filter -SETSTRIPE=${SETSTRIPE:-"$LFS setstripe"} -GETSTRIPE=${GETSTRIPE:-"$LFS getstripe"} - MAXFREE=${MAXFREE:-$((2000000 * OSTCOUNT))} # OST pools tests @@ -66,8 +65,8 @@ create_dir() { local idx=$4 mkdir -p $dir - if [[ -n $4 ]]; then - $SETSTRIPE -c $count -p $pool $dir -o $idx + if [[ -n $idx ]]; then + $SETSTRIPE -c $count -p $pool -i $idx $dir else $SETSTRIPE -c $count -p $pool $dir fi @@ -81,7 +80,7 @@ create_file() { local count=${3:-"-1"} local index=${4:-"-1"} rm -f $file - $SETSTRIPE -o $index -c $count -p $pool $file + $SETSTRIPE -i $index -c $count -p $pool $file [[ $? -eq 0 ]] || error "$SETSTRIPE -p $pool $file failed." } @@ -626,7 +625,7 @@ test_6() { # pool is specified. create_pool_nofail $POOL2 add_pool $POOL2 "OST0000" "$FSNAME-OST0000_UUID " - $SETSTRIPE -o 1 -p $POOL2 $ROOT_POOL/$tfile 2>/dev/null + $SETSTRIPE -i 1 -p $POOL2 $ROOT_POOL/$tfile 2>/dev/null [[ $? -ne 0 ]] || error "$SETSTRIPE with start index outside the pool did not fail." @@ -1190,7 +1189,7 @@ test_23a() { sleep 3 $LFS quota -v -u $RUNAS_ID $dir - $LFS setstripe $file -c 1 -p $POOL + $SETSTRIPE -c 1 -p $POOL $file chown $RUNAS_ID.$RUNAS_GID $file ls -l $file @@ -1245,7 +1244,9 @@ test_23b() { AVAIL=$($LFS df -p $POOL $dir | awk '/summary/ { print $4 }') [ $AVAIL -gt $MAXFREE ] && skip_env "Filesystem space $AVAIL is larger than $MAXFREE limit" && - return 0 + return 0 + log "OSTCOUNT=$OSTCOUNT, OSTSIZE=$OSTSIZE" + log "MAXFREE=$MAXFREE, AVAIL=$AVAIL, SLOW=$SLOW" $LFS quotaoff -ug $MOUNT chown $RUNAS_ID.$RUNAS_ID $dir @@ -1258,10 +1259,10 @@ test_23b() { RC=$? echo "$i: $stat" if [ $RC -eq 1 ]; then - echo $stat | grep "Disk quota exceeded" + echo $stat | grep -q "Disk quota exceeded" [[ $? -eq 0 ]] && error "dd failed with EDQUOT with quota off" - echo $stat | grep "No space left on device" + echo $stat | grep -q "No space left on device" [[ $? -ne 0 ]] && error "dd did not fail with ENOSPC" fi @@ -1291,11 +1292,11 @@ test_24() { create_dir $POOL_ROOT/dir1 $POOL $OSTCOUNT mkdir $POOL_ROOT/dir2 - $SETSTRIPE $POOL_ROOT/dir2 -p $POOL -s 65536 -i 0 -c 1 || + $SETSTRIPE -p $POOL -S 65536 -i 0 -c 1 $POOL_ROOT/dir2 || error "$SETSTRIPE $POOL_ROOT/dir2 failed" mkdir $POOL_ROOT/dir3 - $SETSTRIPE $POOL_ROOT/dir3 -s 65536 -i 0 -c 1 || + $SETSTRIPE -S 65536 -i 0 -c 1 $POOL_ROOT/dir3 || error "$SETSTRIPE $POOL_ROOT/dir3 failed" mkdir $POOL_ROOT/dir4 @@ -1375,7 +1376,7 @@ test_25() { df $POOL_ROOT > /dev/null sleep 5 # Make sure OST0 can be striped on - $SETSTRIPE -o 0 -c 1 $POOL_ROOT/$tfile + $SETSTRIPE -i 0 -c 1 $POOL_ROOT/$tfile STR=$($GETSTRIPE $POOL_ROOT/$tfile | grep 0x | cut -f2 | tr -d " ") rm $POOL_ROOT/$tfile if [[ "$STR" == "0" ]]; then