In sanity-scrub test_11, there may be new files created between two
cycles OI scrub. The test scripts cannot distinguish whether the OI
scrub skipped objects are new created or caused by OI scrub issues.
So we umount the clients after the test environment preparation to
prevent new files to be created from client during OI scrub.
On the other hand, enable full debug to check whether some internal
files creating during the OI scrub.
Test-Parameters: testlist=sanity-scrub,sanity-lfsck
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: Ie1bdebd12ea456bab07bd4c3a55776fa9451144e
Reviewed-on: http://review.whamcloud.com/6485
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
MDSSIZE=100000
OSTSIZE=100000
MDSSIZE=100000
OSTSIZE=100000
check_and_setup_lustre
[ $(facet_fstype $SINGLEMDS) != ldiskfs ] &&
check_and_setup_lustre
[ $(facet_fstype $SINGLEMDS) != ldiskfs ] &&
createmany -o $MOUNT/$tname/f $CREATED || error "(2) Fail to create!"
createmany -o $MOUNT/$tname/f $CREATED || error "(2) Fail to create!"
+ cleanup_mount $MOUNT
+ do_facet $SINGLEMDS $LCTL clear
+ start_full_debug_logging
# reset OI scrub start point by force
$START_SCRUB -r || error "(3) Fail to start OI scrub!"
sleep 3
# reset OI scrub start point by force
$START_SCRUB -r || error "(3) Fail to start OI scrub!"
sleep 3
[ $SKIPPED -eq 0 ] ||
error "(8) Expect 0 objects skipped, but got $SKIPPED"
[ $SKIPPED -eq 0 ] ||
error "(8) Expect 0 objects skipped, but got $SKIPPED"
+ stop_full_debug_logging
+ restore_mount $MOUNT || error "(9) Fail to start client!"
rm -rf $MOUNT/$tname > /dev/null
}
run_test 11 "OI scrub skips the new created objects only once"
rm -rf $MOUNT/$tname > /dev/null
}
run_test 11 "OI scrub skips the new created objects only once"