Whamcloud - gitweb
LU-7782 scrub: handle slave obj of striped directory
[fs/lustre-release.git] / lustre / tests / sanity-scrub.sh
index 9e3e216..a137f87 100644 (file)
@@ -461,6 +461,10 @@ test_4b() {
        for n in $(seq $MDSCOUNT); do
                updated0[$n]=$(scrub_status $n |
                               awk '/^prior_updated/ { print $2 }')
+
+               echo "OI scrub on MDS$n status for the 1st time:"
+               do_facet mds$n $LCTL get_param -n \
+                       osd-ldiskfs.$(facet_svc mds$n).oi_scrub
        done
 
        scrub_check_data2 sanity-scrub.sh 9
@@ -473,6 +477,11 @@ test_4b() {
        for n in $(seq $MDSCOUNT); do
                updated1[$n]=$(scrub_status $n |
                               awk '/^prior_updated/ { print $2 }')
+
+               echo "OI scrub on MDS$n status for the 2nd time:"
+               do_facet mds$n $LCTL get_param -n \
+                       osd-ldiskfs.$(facet_svc mds$n).oi_scrub
+
                [ ${updated0[$n]} -lt ${updated1[$n]} ] ||
                        error "(12) Auto trigger full scrub unexpectedly"
        done
@@ -489,6 +498,11 @@ test_4b() {
        for n in $(seq $MDSCOUNT); do
                updated0[$n]=$(scrub_status $n |
                               awk '/^prior_updated/ { print $2 }')
+
+               echo "OI scrub on MDS$n status for the 3rd time:"
+               do_facet mds$n $LCTL get_param -n \
+                       osd-ldiskfs.$(facet_svc mds$n).oi_scrub
+
                [ ${updated0[$n]} -gt ${updated1[$n]} ] ||
                        error "(16) Auto trigger full scrub unexpectedly"
        done
@@ -501,8 +515,13 @@ test_4b() {
        for n in $(seq $MDSCOUNT); do
                updated1[$n]=$(scrub_status $n |
                               awk '/^prior_updated/ { print $2 }')
-               [ ${updated0[$n]} -eq ${updated1[$n]} ] ||
+               [ ${updated0[$n]} -eq ${updated1[$n]} ] || {
+                       echo "OI scrub on MDS$n status for the 4th time:"
+                       do_facet mds$n $LCTL get_param -n \
+                               osd-ldiskfs.$(facet_svc mds$n).oi_scrub
+
                        error "(18) NOT auto trigger full scrub as expected"
+               }
        done
 }
 run_test 4b "Auto trigger OI scrub if bad OI mapping was found (2)"
@@ -527,6 +546,10 @@ test_4c() {
        for n in $(seq $MDSCOUNT); do
                updated0[$n]=$(scrub_status $n |
                               awk '/^prior_updated/ { print $2 }')
+
+               echo "OI scrub on MDS$n status for the 1st time:"
+               do_facet mds$n $LCTL get_param -n \
+                       osd-ldiskfs.$(facet_svc mds$n).oi_scrub
        done
 
        scrub_check_data2 sanity-scrub.sh 9
@@ -539,6 +562,11 @@ test_4c() {
        for n in $(seq $MDSCOUNT); do
                updated1[$n]=$(scrub_status $n |
                               awk '/^prior_updated/ { print $2 }')
+
+               echo "OI scrub on MDS$n status for the 2nd time:"
+               do_facet mds$n $LCTL get_param -n \
+                       osd-ldiskfs.$(facet_svc mds$n).oi_scrub
+
                [ ${updated0[$n]} -lt ${updated1[$n]} ] ||
                        error "(12) Auto trigger full scrub unexpectedly"
        done
@@ -555,6 +583,11 @@ test_4c() {
        for n in $(seq $MDSCOUNT); do
                updated0[$n]=$(scrub_status $n |
                               awk '/^prior_updated/ { print $2 }')
+
+               echo "OI scrub on MDS$n status for the 3rd time:"
+               do_facet mds$n $LCTL get_param -n \
+                       osd-ldiskfs.$(facet_svc mds$n).oi_scrub
+
                [ ${updated0[$n]} -gt ${updated1[$n]} ] ||
                        error "(16) Auto trigger full scrub unexpectedly"
        done
@@ -567,8 +600,13 @@ test_4c() {
        for n in $(seq $MDSCOUNT); do
                updated1[$n]=$(scrub_status $n |
                               awk '/^prior_updated/ { print $2 }')
-               [ ${updated0[$n]} -eq ${updated1[$n]} ] ||
+               [ ${updated0[$n]} -eq ${updated1[$n]} ] || {
+                       echo "OI scrub on MDS$n status for the 4th time:"
+                       do_facet mds$n $LCTL get_param -n \
+                               osd-ldiskfs.$(facet_svc mds$n).oi_scrub
+
                        error "(18) NOT auto trigger full scrub as expected"
+               }
        done
 }
 run_test 4c "Auto trigger OI scrub if bad OI mapping was found (3)"