In sanity-lfsck test_8, the old script may over wrote the fail_loc
before the recovery completed, that will cause the paused LFSCK to
be restarted automatically, then the subsequent manual command for
starting the LFSCK will get -EALREADY. That is unexpected.
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I8500ecdccf354e83ec70be8dea88943cafa47d81
Reviewed-on: http://review.whamcloud.com/11288
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
start $SINGLEMDS $MDT_DEVNAME $MOUNT_OPTS_SCRUB > /dev/null ||
error "(14) Fail to start MDS!"
start $SINGLEMDS $MDT_DEVNAME $MOUNT_OPTS_SCRUB > /dev/null ||
error "(14) Fail to start MDS!"
+ local timeout=$(max_recovery_time)
+ local timer=0
+
+ while [ $timer -lt $timeout ]; do
+ STATUS=$(do_facet $SINGLEMDS "$LCTL get_param -n \
+ mdt.${MDT_DEV}.recovery_status |
+ awk '/^status/ { print \\\$2 }'")
+ [ "$STATUS" != "RECOVERING" ] && break;
+ sleep 1
+ timer=$((timer + 1))
+ done
+
+ [ $timer != $timeout ] ||
+ error "(14.1) recovery timeout"
+
STATUS=$($SHOW_NAMESPACE | awk '/^status/ { print $2 }')
[ "$STATUS" == "crashed" ] ||
error "(15) Expect 'crashed', but got '$STATUS'"
STATUS=$($SHOW_NAMESPACE | awk '/^status/ { print $2 }')
[ "$STATUS" == "crashed" ] ||
error "(15) Expect 'crashed', but got '$STATUS'"
start $SINGLEMDS $MDT_DEVNAME $MOUNT_OPTS_SCRUB > /dev/null ||
error "(19) Fail to start MDS!"
start $SINGLEMDS $MDT_DEVNAME $MOUNT_OPTS_SCRUB > /dev/null ||
error "(19) Fail to start MDS!"
+ timer=0
+ while [ $timer -lt $timeout ]; do
+ STATUS=$(do_facet $SINGLEMDS "$LCTL get_param -n \
+ mdt.${MDT_DEV}.recovery_status |
+ awk '/^status/ { print \\\$2 }'")
+ [ "$STATUS" != "RECOVERING" ] && break;
+ sleep 1
+ timer=$((timer + 1))
+ done
+
+ [ $timer != $timeout ] ||
+ error "(19.1) recovery timeout"
+
STATUS=$($SHOW_NAMESPACE | awk '/^status/ { print $2 }')
[ "$STATUS" == "paused" ] ||
error "(20) Expect 'paused', but got '$STATUS'"
STATUS=$($SHOW_NAMESPACE | awk '/^status/ { print $2 }')
[ "$STATUS" == "paused" ] ||
error "(20) Expect 'paused', but got '$STATUS'"