The introduction of sanity 27M broke interop with 2.12 LTS since
over striping doesn't exist in that version. Adjust the test to
use over striping if the client supports it, otherwise just use
traditional striping.
Lustre-change: https://review.whamcloud.com/44340
Lustre-commit:
4e1f9c4bd1d96063a1fbb2dfaab41b15836167ab
Test-Parameters: trivial testlist=sanity env=ONLY=27M
Change-Id: I2d788a116cbb749a83d6cec36f97d06533b32421
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/44340
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/44354
Reviewed-by: James Nunez <jnunez@whamcloud.com>
test_mkdir $DIR/$tdir
# Set default striping on directory
test_mkdir $DIR/$tdir
# Set default striping on directory
- $LFS setstripe -C 4 $DIR/$tdir
+ local setcount=4
+ local stripe_opt
+
+ # if we run against a 2.12 server which lacks overstring support
+ # then the connect_flag will not report overstriping, even if client
+ # is 2.14+
+ if [[ $($LCTL get_param mdc.*.connect_flags) =~ overstriping ]]; then
+ stripe_opt="-C $setcount"
+ elif (( $OSTCOUNT >= $setcount )); then
+ stripe_opt="-c $setcount"
+ else
+ skip "server does not support overstriping"
+ fi
+ $LFS setstripe $stripe_opt $DIR/$tdir
echo 1 > $DIR/$tdir/${tfile}.1
local count=$($LFS getstripe -c $DIR/$tdir/${tfile}.1)
echo 1 > $DIR/$tdir/${tfile}.1
local count=$($LFS getstripe -c $DIR/$tdir/${tfile}.1)
[ $count -eq $setcount ] ||
error "(1) stripe count $count, should be $setcount"
[ $count -eq $setcount ] ||
error "(1) stripe count $count, should be $setcount"
# Clean up DOM layout
$LFS setstripe -d $DIR/$tdir
# Clean up DOM layout
$LFS setstripe -d $DIR/$tdir
+ save_layout_restore_at_exit $MOUNT
# Now test that append striping works when layout is from root
$LFS setstripe -c 2 $MOUNT
# Make a special directory for this
mkdir $DIR/${tdir}/${tdir}.2
# Now test that append striping works when layout is from root
$LFS setstripe -c 2 $MOUNT
# Make a special directory for this
mkdir $DIR/${tdir}/${tdir}.2
- stack_trap "$LFS setstripe -d $MOUNT" EXIT
# Verify for normal file
setcount=2
# Verify for normal file
setcount=2