To guarantee the right FID seq to be checked.
Other scripts improvement for error handling.
Try to collect more logs.
Signed-off-by: Fan Yong <fan.yong@intel.com>
Change-Id: I51cb75c15cc7421721ea0bc149fc2a5a72c13cc6
Reviewed-on: http://review.whamcloud.com/10276
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
echo "set fail_loc=0x160d to skip the updating LAST_ID on-disk"
#define OBD_FAIL_LFSCK_SKIP_LASTID 0x160d
do_facet ost1 $LCTL set_param fail_loc=0x160d
echo "set fail_loc=0x160d to skip the updating LAST_ID on-disk"
#define OBD_FAIL_LFSCK_SKIP_LASTID 0x160d
do_facet ost1 $LCTL set_param fail_loc=0x160d
- createmany -o $DIR/$tdir/f 64
+
+ local count=$(precreated_ost_obj_count 0 0)
+
+ createmany -o $DIR/$tdir/f $((count + 32))
+
+ local proc_path="${FSNAME}-OST0000-osc-MDT0000"
+ local seq=$(do_facet mds1 $LCTL get_param -n \
+ osp.${proc_path}.prealloc_last_seq)
local lastid1=$(do_facet ost1 "lctl get_param -n \
local lastid1=$(do_facet ost1 "lctl get_param -n \
- obdfilter.${ost1_svc}.last_id" | grep 0x100000000 |
+ obdfilter.${ost1_svc}.last_id" | grep $seq |
awk -F: '{ print $2 }')
umount_client $MOUNT
awk -F: '{ print $2 }')
umount_client $MOUNT
for ((i = 0; i < 60; i++)); do
lastid2=$(do_facet ost1 "lctl get_param -n \
for ((i = 0; i < 60; i++)); do
lastid2=$(do_facet ost1 "lctl get_param -n \
- obdfilter.${ost1_svc}.last_id" | grep 0x100000000 |
+ obdfilter.${ost1_svc}.last_id" | grep $seq |
awk -F: '{ print $2 }')
[ ! -z $lastid2 ] && break;
sleep 1
awk -F: '{ print $2 }')
[ ! -z $lastid2 ] && break;
sleep 1
echo "the on-disk LAST_ID should have been rebuilt"
wait_update_facet ost1 "$LCTL get_param -n \
echo "the on-disk LAST_ID should have been rebuilt"
wait_update_facet ost1 "$LCTL get_param -n \
- obdfilter.${ost1_svc}.last_id | grep 0x100000000 |
+ obdfilter.${ost1_svc}.last_id | grep $seq |
awk -F: '{ print \\\$2 }'" "$lastid1" 60 || {
awk -F: '{ print \\\$2 }'" "$lastid1" 60 || {
- $LCTL get_param -n obdfilter.${ost1_svc}.last_id
- error "(9) expect lastid1 0x100000000:$lastid1"
+ do_facet ost1 $LCTL get_param -n \
+ obdfilter.${ost1_svc}.last_id
+ error "(9) expect lastid1 $seq:$lastid1"
}
do_facet ost1 $LCTL set_param fail_loc=0
}
do_facet ost1 $LCTL set_param fail_loc=0
error "(7) MDS${k} is not the expected 'completed'"
done
error "(7) MDS${k} is not the expected 'completed'"
done
+ start_full_debug_logging
+
echo "Start layout LFSCK on all targets by single command (-s 1)."
do_facet mds1 $LCTL lfsck_start -M ${FSNAME}-MDT0000 -t layout -A \
-s 1 -r || error "(8) Fail to start LFSCK on all devices!"
echo "Start layout LFSCK on all targets by single command (-s 1)."
do_facet mds1 $LCTL lfsck_start -M ${FSNAME}-MDT0000 -t layout -A \
-s 1 -r || error "(8) Fail to start LFSCK on all devices!"
awk '/^status/ { print \\\$2 }'" "completed" 32 ||
error "(14) MDS${k} is not the expected 'completed'"
done
awk '/^status/ { print \\\$2 }'" "completed" 32 ||
error "(14) MDS${k} is not the expected 'completed'"
done
+
+ stop_full_debug_logging
}
run_test 12 "single command to trigger LFSCK on all devices"
}
run_test 12 "single command to trigger LFSCK on all devices"