Whamcloud - gitweb
LU-10465 test: fix interop test for 4M default stripe size 51/54851/5
authorAndreas Dilger <adilger@whamcloud.com>
Thu, 23 Jan 2020 20:15:10 +0000 (20:15 +0000)
committerOleg Drokin <green@whamcloud.com>
Thu, 20 Jun 2024 21:34:34 +0000 (21:34 +0000)
New servers could use 4MiB default stripe size, so some of
the tests need to use bigger component extent or specify stripe size
explicitly to accommodate enough stripe count.

Patch includes several test fixes:
- sanity-flr: use bigger component size and amount of data to
              saturate all stripes as expected by test
- sanity-lfsck: 36[a-c] to use 1M stripe as expected by calcs
- sanity: 130g to use 1M stripe prior FIEMAP calcs

This change for test scripts comes from:

Lustre-change: https://review.whamcloud.com/37318
Lustre-commit: ea18d7da59d369f093e340e150544f51b2f229a1

Test-Parameters: trivial
Test-Parameters: testlist=sanity-flr serverjob=lustre-master serverbuildno=4540 env=ONLY="0 208"
Test-Parameters: testlist=sanity-lfsck serverjob=lustre-master serverbuildno=4540 env=ONLY="36"
Test-Parameters: testlist=sanity serverjob=lustre-master serverbuildno=4540 env=ONLY="130"
Fixes: ee7dfc5ad1 ("LU-17025 llapi: Verify stripe pool name")
Fixes: 0396310692 ("LU-15727 lod: honor append_pool with default composite layouts")
Fixes: b384ea39e5 ("LU-14480 pool: wrong usage with ost list")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I3cef8805247fc5253e0a0ac05157b9d609054df9
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54851
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/tests/sanity-flr.sh
lustre/tests/sanity-lfsck.sh
lustre/tests/sanity.sh

index 6151928..eab11e7 100644 (file)
@@ -367,6 +367,9 @@ test_0b() {
        $LFS setstripe -S 8M -c -1 -p $pool_name $td ||
                error "$LFS setstripe $td failed"
 
+       create_pool $FSNAME.flash || error "create OST pool flash failed"
+       create_pool $FSNAME.archive || error "create OST pool archive failed"
+
        # create a mirrored file with plain layout mirrors
        $mirror_cmd -N -N -S 4M -c 2 -p flash -i 2 -o 2,3 \
                    -N -S 16M -N -c -1 -N -p archive -N -p none $tf ||
@@ -442,8 +445,13 @@ test_0c() {
        $LFS setstripe -E 32M -S 8M -c -1 -p $pool_name -E eof -S 16M $td ||
                error "$LFS setstripe $td failed"
 
+       create_pool $FSNAME.flash ||
+               error "create OST pool flash failed"
+       create_pool $FSNAME.archive ||
+               error "create OST pool archive failed"
+
        # create a mirrored file with composite layout mirrors
-       $mirror_cmd -N2 -E 4M -c 2 -p flash -i 1 -o 1,3 -E eof -S 4M \
+       $mirror_cmd -N2 -E 8M -c 2 -p flash -i 1 -o 1,3 -E eof -S 4M \
                    -N -c 4 -p none \
                    -N3 -E 512M -S 16M -p archive -E -1 -i -1 -c -1 $tf ||
                error "create mirrored file $tf failed"
@@ -455,7 +463,7 @@ test_0c() {
                verify_comp_attr_with_default stripe-size $tf ${ids[$i]}
                verify_comp_attr stripe-count $tf ${ids[$i]} 2
                verify_comp_attr stripe-index $tf ${ids[$i]} 1
-               verify_comp_extent $tf ${ids[$i]} 0 4194304
+               verify_comp_extent $tf ${ids[$i]} 0 8388608
        done
 
        # verify components ${ids[1]} and ${ids[3]}
@@ -463,7 +471,7 @@ test_0c() {
                verify_comp_attr stripe-size $tf ${ids[$i]} 4194304
                verify_comp_attr stripe-count $tf ${ids[$i]} 2
                verify_comp_attr pool $tf ${ids[$i]} flash
-               verify_comp_extent $tf ${ids[$i]} 4194304 EOF
+               verify_comp_extent $tf ${ids[$i]} 8388608 EOF
        done
 
        # verify component ${ids[4]}
@@ -555,10 +563,18 @@ test_0e() {
        # create parent directory
        mkdir $td || error "mkdir $td failed"
 
+       create_pool $FSNAME.ssd ||
+               error "create OST pool ssd failed"
+
        # create a mirrored file with plain layout mirrors
        $LFS mirror create -N -S 32M -c 3 -p ssd -i 1 -o 1,2,3 $tf ||
                error "create mirrored file $tf failed"
 
+       create_pool $FSNAME.flash ||
+               error "create OST pool flash failed"
+       create_pool $FSNAME.archive ||
+               error "create OST pool archive failed"
+
        # extend the mirrored file with plain layout mirrors
        $mirror_cmd -N -S 4M -c 2 -p flash -i 2 -o 2,3 \
                    -N -S 16M -N -c -1 -N -p archive -N -p none $tf ||
@@ -613,13 +629,21 @@ test_0f() {
        # create parent directory
        mkdir $td || error "mkdir $td failed"
 
+       create_pool $FSNAME.ssd ||
+               error "create OST pool ssd failed"
+
        # create a mirrored file with composite layout mirror
        $LFS mirror create -N -E 32M -S 16M -p ssd -E eof -S 32M $tf ||
                error "create mirrored file $tf failed"
 
+       create_pool $FSNAME.flash ||
+               error "create OST pool flash failed"
+       create_pool $FSNAME.archive ||
+               error "create OST pool archive failed"
+
        # extend the mirrored file with composite layout mirrors
        $mirror_cmd -N -p archive \
-                   -N2 -E 4M -c 2 -p flash -i 1 -o 1,3 -E eof -S 4M \
+                   -N2 -E 8M -c 2 -p flash -i 1 -o 1,3 -E eof -S 4M \
                    -N -c -1 -p none \
                    -N3 -E 512M -S 16M -p archive -E -1 -i -1 -c -1 $tf ||
                error "extend mirrored file $tf failed"
@@ -649,7 +673,7 @@ test_0f() {
                verify_comp_attr_with_default stripe-size $tf ${ids[$i]}
                verify_comp_attr stripe-count $tf ${ids[$i]} 2
                verify_comp_attr stripe-index $tf ${ids[$i]} 1
-               verify_comp_extent $tf ${ids[$i]} 0 4194304
+               verify_comp_extent $tf ${ids[$i]} 0 8388608
        done
 
        # verify components ${ids[4]} and ${ids[6]}
@@ -657,7 +681,7 @@ test_0f() {
                verify_comp_attr stripe-size $tf ${ids[$i]} 4194304
                verify_comp_attr stripe-count $tf ${ids[$i]} 2
                verify_comp_attr pool $tf ${ids[$i]} flash
-               verify_comp_extent $tf ${ids[$i]} 4194304 EOF
+               verify_comp_extent $tf ${ids[$i]} 8388608 EOF
        done
 
        # verify component ${ids[7]}
@@ -3798,7 +3822,7 @@ function check_ost_used() {
        else
                error "unknown type $io"
        fi
-       dd $ddarg bs=2M count=1 || error "can't $io $file"
+       dd $ddarg bs=8M count=1 || error "can't $io $file"
        cancel_lru_locks osc
 
        # check only specified OSTs got reads
@@ -3830,7 +3854,7 @@ test_208a() {
 
        stack_trap "rm -f $tf"
        $LFS setstripe -i0 -c1 $tf || error "can't setstripe"
-       dd if=/dev/zero of=$tf bs=2M count=1 || error "can't dd (1)"
+       dd if=/dev/zero of=$tf bs=8M count=1 || error "can't dd (1)"
        $LFS mirror extend -N -c1 -o1 $tf || error "can't create mirror"
        $LFS mirror extend -N -c2 -o 2,3 $tf || error "can't create mirror"
        $LFS mirror resync $tf || error "can't resync"
@@ -3868,8 +3892,8 @@ test_208b() {
        stack_trap "restore_lustre_params < $p; rm -f $p"
 
        stack_trap "rm -f $tf"
-       $LFS setstripe -i0 -c1 $tf || error "can't setstripe"
-       dd if=/dev/zero of=$tf bs=2M count=1 || error "can't dd (1)"
+       $LFS setstripe -i0 -c1 -S1M $tf || error "can't setstripe"
+       dd if=/dev/zero of=$tf bs=8M count=1 || error "can't dd (1)"
        $LFS mirror extend -N -c1 -o1 $tf || error "can't create mirror"
        $LFS mirror extend -N -c2 -o 2,3 $tf || error "can't create mirror"
        $LFS mirror resync $tf || error "can't resync"
index 181ba01..49adb26 100644 (file)
@@ -5481,13 +5481,16 @@ test_36a() {
        lctl get_param osc.*.*grant*
        stack_trap "lfs df $DIR; lfs df -i $DIR; lctl get_param osc.*.*grant*"
 
-       $LFS setstripe -N -E 2M -o 0,1 -E -1 -o 2 -N -E 2M -o 1,2 -E -1 -o 0 \
+       $LFS setstripe -N -E 2M -S1M -o 0,1 -E -1 -o 2 \
+               -N -E 2M -S1M -o 1,2 -E -1 -o 0 \
                -N -E 3M -o 2,0 -E -1 -o 1 $DIR/$tdir/f0 ||
                error "(0) Fail to create mirror file $DIR/$tdir/f0"
-       $LFS setstripe -N -E 2M -o 0,1 -E -1 -o 2 -N -E 2M -o 1,2 -E -1 -o 0 \
+       $LFS setstripe -N -E 2M -S1M -o 0,1 -E -1 -o 2 \
+               -N -E 2M -S1M -o 1,2 -E -1 -o 0 \
                -N -E 3M -o 2,0 -E -1 -o 1 $DIR/$tdir/f1 ||
                error "(1) Fail to create mirror file $DIR/$tdir/f1"
-       $LFS setstripe -N -E 2M -o 0,1 -E -1 -o 2 -N -E 2M -o 1,2 -E -1 -o 0 \
+       $LFS setstripe -N -E 2M -S1M -o 0,1 -E -1 -o 2 \
+               -N -E 2M -S1M -o 1,2 -E -1 -o 0 \
                -N -E 3M -o 2,0 -E -1 -o 1 $DIR/$tdir/f2 ||
                error "(2) Fail to create mirror file $DIR/$tdir/f2"
 
@@ -5609,7 +5612,8 @@ test_36b() {
 
        check_mount_and_prep
 
-       $LFS setstripe -N -E 2M -o 0,1 -E -1 -o 2 -N -E 2M -o 1,2 -E -1 -o 0 \
+       $LFS setstripe -N -E 2M -S1M -o 0,1 -E -1 -o 2 \
+               -N -E 2M -S1M -o 1,2 -E -1 -o 0 \
                -N -E 3M -o 2,0 -E -1 -o 1 $DIR/$tdir/f0 ||
                error "(0) Fail to create mirror file $DIR/$tdir/f0"
 
@@ -5698,8 +5702,8 @@ test_36c() {
 
        check_mount_and_prep
 
-       $LFS setstripe -N -E 2M -o 0,1 -E -1 -o 2 -N -E 2M -o 1,2 -E -1 -o 0 \
-               $DIR/$tdir/f0 ||
+       $LFS setstripe -N -E 2M -S1M -o 0,1 -E -1 -o 2 \
+               -N -E 2M -S1M -o 1,2 -E -1 -o 0 $DIR/$tdir/f0 ||
                error "(0) Fail to create mirror file $DIR/$tdir/f0"
 
        local fid=$($LFS path2fid $DIR/$tdir/f0)
@@ -5757,7 +5761,7 @@ test_36c() {
        local count=$(do_facet mds1 $LCTL get_param -n \
                      mdd.$(facet_svc mds1).lfsck_layout |
                      awk '/^repaired_orphan/ { print $2 }')
-       [ $count -eq 6 ] || error "(7) Expect 9 fixed on mds1, but got: $count"
+       [ $count -eq 6 ] || error "(7) Expect 6 fixed on mds1, but got: $count"
 
        local name=$MOUNT/.lustre/lost+found/MDT0000/${fid}-R-0
        count=$($LFS getstripe --mirror-count $name)
index 0dc4e62..cc5af5c 100755 (executable)
@@ -14091,7 +14091,8 @@ test_130g() {
        local file=$DIR/$tfile
        local nr=$((OSTCOUNT * 100))
 
-       $LFS setstripe -C $nr $file || error "failed to setstripe -C $nr $file"
+       $LFS setstripe -C $nr -S1M $file ||
+               error "failed to setstripe -C $nr $file"
 
        stack_trap "rm -f $file"
        dd if=/dev/zero of=$file count=$nr bs=1M