In racer file_create.sh, it was generating a random multiple of 64KB
in [64K..1024K] for the stripe_size, but using a fixed 1MB component
end. However, the component end must be a multiple of stripe_size,
or an error will be returned by "lfs setstripe":
Invalid layout: component end must be aligned by the stripe size
Generate the component_end argument as a random multiple [1..8] of
the stripe size for PFL, DoM, and FLR files.
Fixes:
0b66b11523cb ("LU-3285 tests: add dom into racer test suite")
Test-Parameters: trivial testlist=racer
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: Ib79131fc71d0eaa4a398cd8c8adf6e53473ebbe5
Reviewed-on: https://review.whamcloud.com/36174
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
[ $stripecount -gt 0 ] && {
stripesize=$(((RANDOM % 16 + 1) * 64))K
+ comp_end=$((${stripesize%K} * (RANDOM % 8 + 1)))K
pattern=${layout[$RANDOM % ${#layout[*]}]}
case $pattern in
dom) opt="setstripe -E $stripesize -L mdt -E eof -c $stripecount -S 1M" ;;
- pfl) opt="setstripe -E 1M -S $stripesize -E eof -c $stripecount -S 2M" ;;
- flr) opt="mirror create -N2 -E 1M -S $stripesize -E eof -c $stripecount -S 2M" ;;
+ pfl) opt="setstripe -E $comp_end -S $stripesize -E eof -c $stripecount -S 2M" ;;
+ flr) opt="mirror create -N2 -E $comp_end -S $stripesize -E eof -c $stripecount -S 2M" ;;
raid0) opt="setstripe -S $stripesize -c $stripecount" ;;
esac