Whamcloud - gitweb
EX-6169 lipe: sanity-lipe-find3 reformat to clean lost+found
authorAlexandre Ioffe <aioffe@ddn.com>
Tue, 13 Dec 2022 06:20:33 +0000 (22:20 -0800)
committerAndreas Dilger <adilger@whamcloud.com>
Sat, 24 Dec 2022 01:23:31 +0000 (01:23 +0000)
Reformat file system when .lustre/lost+found/ has garbage

Test-Parameters: trivial testlist=sanity-lipe-find3
Signed-off-by: Alexandre Ioffe <aioffe@ddn.com>
Change-Id: Ib78b06e685aaeabb8356662747285ed7a27dde15
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/49385
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/tests/sanity-lipe-find3.sh

index 2009e80..cebfb0e 100644 (file)
@@ -31,8 +31,13 @@ done
 which jq || skip_env "jq is not installed"
 
 build_test_filter
-check_and_setup_lustre
-
+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.