X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fsanity-pfl.sh;h=e83a9fe04ec6cc8dec737ce28fe0e95e5bc378de;hb=5f579b16ada4df756e50109004def3c594c0b1a2;hp=8e1882ba347c6cb5b664b8f14de74caa33d83cea;hpb=57675557e148ed55db9db875af247ef025932eeb;p=fs%2Flustre-release.git diff --git a/lustre/tests/sanity-pfl.sh b/lustre/tests/sanity-pfl.sh index 8e1882b..e83a9fe 100644 --- a/lustre/tests/sanity-pfl.sh +++ b/lustre/tests/sanity-pfl.sh @@ -851,6 +851,37 @@ test_16b() { } run_test 16b "Verify setstripe/getstripe with YAML config file + overstriping" +test_16c() { + [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" + + local file=$DIR/$tdir/$tfile + local dir=$DIR/$tdir/dir + local temp=$DIR/$tdir/template + rm -rf $DIR/$tdir + test_mkdir $DIR/$tdir + + ##################################################################### + # 1. SEL file + # set stripe for source file + $LFS setstripe -E256M -S 1M -c2 -o0,1 -z 64M -E-1 -o1,0 -z 128M \ + $file || error "Create $file failed" + + echo "1. SEL file" + verify_yaml_layout $file $file.copy $temp "1. PFL file" + + ##################################################################### + # 2. SEL dir + # set stripe for source dir + test_mkdir $dir + $LFS setstripe -E256M -S 1M -c2 -z 64M -E-1 -z 128M \ + $dir || error "setstripe $dir failed" + + test_mkdir $dir.copy + echo "2. SEL template on dir" + verify_yaml_layout $dir $dir.copy $temp.dir "2. PFL dir" +} +run_test 16c "Verify setstripe/getstripe for SEL layout with YAML config file" + test_17() { [ $OSTCOUNT -lt 2 ] && skip "needs >= 2 OSTs" local file=$DIR/$tdir/$tfile @@ -1374,7 +1405,7 @@ test_20a() { wait_mds_ost_sync # First component is on OST0 - $LFS setstripe -E 256M -i 0 -z 64M -E -1 -z 1G $comp_file || + $LFS setstripe -E 256M -i 0 -z 64M -E -1 -z 128M $comp_file || error "Create $comp_file failed" # write past end of first component, so it is extended @@ -1398,12 +1429,12 @@ test_20a() { $LFS getstripe $comp_file flg_opts="--comp-flags init" - found=$($LFS find --comp-start 128M -E 1152M $flg_opts $comp_file | \ + found=$($LFS find --comp-start 128M -E 256M $flg_opts $comp_file | \ wc -l) [ $found -eq 1 ] || error "Write: third component not found" flg_opts="--comp-flags extension" - found=$($LFS find --comp-start 1152M -E EOF $flg_opts $comp_file |wc -l) + found=$($LFS find --comp-start 256M -E EOF $flg_opts $comp_file |wc -l) [ $found -eq 1 ] || error "Write: fourth extension component not found" sel_layout_sanity $comp_file 3 @@ -1427,7 +1458,7 @@ test_20b() { # normal component to 10M, extendable component to 1G # further extendable to EOF - $LFS setstripe -E 10M -E 1G -p $TESTNAME -z 64M -E -1 -p "" -z 512M \ + $LFS setstripe -E 10M -E 1G -p $TESTNAME -z 64M -E -1 -p "" -z 128M \ $comp_file || error "Create $comp_file failed" replay_barrier $SINGLEMDS @@ -1452,11 +1483,11 @@ test_20b() { [ $found -eq 0 ] || error "Write: zero length component still present" flg_opts="--comp-flags init" - found=$($LFS find --comp-start 10M -E 522M $flg_opts $comp_file | wc -l) + found=$($LFS find --comp-start 10M -E 138M $flg_opts $comp_file | wc -l) [ $found -eq 1 ] || error "Write: second component not found" flg_opts="--comp-flags extension" - found=$($LFS find --comp-start 522M -E EOF $flg_opts $comp_file | wc -l) + found=$($LFS find --comp-start 138M -E EOF $flg_opts $comp_file | wc -l) [ $found -eq 1 ] || error "Write: third component not found" fail $SINGLEMDS @@ -1465,11 +1496,11 @@ test_20b() { [ $found -eq 0 ] || error "Failover: 0-length component still present" flg_opts="--comp-flags init" - found=$($LFS find --comp-start 10M -E 522M $flg_opts $comp_file | wc -l) + found=$($LFS find --comp-start 10M -E 138M $flg_opts $comp_file | wc -l) [ $found -eq 1 ] || error "Failover: second component not found" flg_opts="--comp-flags extension" - found=$($LFS find --comp-start 522M -E EOF $flg_opts $comp_file | wc -l) + found=$($LFS find --comp-start 138M -E EOF $flg_opts $comp_file | wc -l) [ $found -eq 1 ] || error "Failover: third component not found" sel_layout_sanity $comp_file 3 @@ -1656,7 +1687,7 @@ test_21b() { test_mkdir -p $DIR/$tdir # DoM, extendable component, further extendable component - $LFS setstripe -E 1M -L mdt -E 256M -i 0 -z 64M -E -1 -z 1G \ + $LFS setstripe -E 1M -L mdt -E 256M -i 0 -z 64M -E -1 -z 128M \ $comp_file || error "Create $comp_file failed" found=$($LFS find --comp-start 1M -E 1M $flg_opts $comp_file | wc -l) @@ -1680,11 +1711,11 @@ test_21b() { [ $found -eq 0 ] || error "Write: Zero length component still present" flg_opts="--comp-flags init" - found=$($LFS find --comp-start 1M -E 1025M $flg_opts $comp_file | wc -l) + found=$($LFS find --comp-start 1M -E 129M $flg_opts $comp_file | wc -l) [ $found -eq 1 ] || error "Write: extended component not found" flg_opts="--comp-flags extension" - found=$($LFS find --comp-start 1025M -E EOF $flg_opts $comp_file |wc -l) + found=$($LFS find --comp-start 129M -E EOF $flg_opts $comp_file |wc -l) [ $found -eq 1 ] || error "Write: extension component not found" sel_layout_sanity $comp_file 3