Some tests running "lfs rm_entry" will leave the FID in
.lustre/fid/ undeleted, which causes sanity-lipe-scan3
and sanity-lipe-find3 fail. Since it is not possible to
list the .lustre/fid/ directory, we have to run LFSCK to
link the FID back into .lustre/lost+found so as to
check if the file system needs to be reformatted.
Test-Parameters: trivial testlist=sanityn,sanity-lipe-scan3
Test-Parameters: trivial testlist=sanityn,sanity-lipe-find3
Fixes:
933691b3d7 ("EX-6692 tests: clean up test env in sanity-lipe-scan3.sh")
Fixes:
de1bb57641 ("EX-6170 tests: make sanity-lipe-scan3.sh support remote MDS")
Fixes:
8b572c4de0 ("EX-6169 lipe: sanity-lipe-find3 reformat to clean lost+found")
Change-Id: If23479fc222052e25a7f21bcb70003c5176247b6
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/49674
Reviewed-by: Alexandre Ioffe <aioffe@ddn.com>
Reviewed-by: Colin Faber <cfaber@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
which jq || skip_env "jq is not installed"
build_test_filter
+check_and_setup_lustre
+run_lfsck
+
if [ -d $MOUNT/.lustre/lost+found ] && [ "$(ls -A $MOUNT/.lustre/lost+found)" ]
then
echo "Reformat file system"
REFORMAT="yes" cleanup_and_setup_lustre
-else
- check_and_setup_lustre
fi
+
# Try to support running from the build directory.
if [[ "$mds_HOST" == "$HOSTNAME" ]]; then
# Fixup GUILE_LOAD_PATH to support running from the build directory.
declare -r ROOT_FID="[0x200000007:0x1:0x0]"
build_test_filter
+check_and_setup_lustre
+run_lfsck
+
if [ -d $MOUNT/.lustre/lost+found ] && [ "$(ls -A $MOUNT/.lustre/lost+found)" ]
then
echo "Reformat file system"
REFORMAT="yes" cleanup_and_setup_lustre
-else
- check_and_setup_lustre
fi
# choose a random MDS and return its facet