The $filenum is not equal to $found if stripe_count
more then 1.
The $filenum is not equal to $found if stripe_index
is not default.
Patch fixes the following:
We will counted files twice with dual striped
file as they will have objects on both stripes.
Remove dir's stripe-offset from stripes-offset's sum of
test dirs/files which get by getstripe -ir.
Author: Alyona Romanenko <alyona.romanenko@seagate.com>
Signed-off-by: Alyona Romanenko <alyona.romanenko@seagate.com>
Signed-off-by: Elena Gryaznova <c17455@cray.com>
Test-Parameters: trivial testlist=sanity envdefinitions=ONLY=56a
Cray-bug-id: MRP-2738
Reviewed-by: Andriy Skulysh <c17819@cray.com>
Reviewed-by: Parinay Kondekar <parinay.kondekar@seagate.com>
Change-Id: I911bf8b40b7688b4341f48409d9c5b57386cfe3d
Reviewed-on: https://review.whamcloud.com/31326
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
local ostidx=1
local obduuid=$(ostuuid_from_index $ostidx)
local found=$($LFS getstripe -r --obd $obduuid $dir |
local ostidx=1
local obduuid=$(ostuuid_from_index $ostidx)
local found=$($LFS getstripe -r --obd $obduuid $dir |
- egrep -c "obdidx|l_ost_idx")
+ grep 'lmm_stripe_offset:' | grep -c " $ostidx\$")
+
+ filenum=$($LFS getstripe -ir $dir | grep -c "^$ostidx\$")
+ [[ $($LFS getstripe -id $dir) -ne $ostidx ]] ||
+ ((filenum--))
+ [[ $($LFS getstripe -id $dir/dir) -ne $ostidx ]] ||
+ ((filenum--))
- filenum=$($LFS getstripe -ir $dir | grep "^$ostidx\$" | wc -l)
[[ $found -eq $filenum ]] ||
error "$LFS getstripe --obd: found $found expect $filenum"
[[ $($LFS getstripe -r -v --obd $obduuid $dir |
[[ $found -eq $filenum ]] ||
error "$LFS getstripe --obd: found $found expect $filenum"
[[ $($LFS getstripe -r -v --obd $obduuid $dir |