ONLY=${ONLY:-"$*"}
-# bug number for skipped test: LU-2828
-ALWAYS_EXCEPT="$CONF_SANITY_EXCEPT 59 64"
+# bug number for skipped test:
+ALWAYS_EXCEPT="$CONF_SANITY_EXCEPT"
# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
is_sles11() # LU-2181
MDSSIZE=200000
OSTSIZE=200000
+fs2mds_HOST=$mds_HOST
+fs2ost_HOST=$ost_HOST
+fs3ost_HOST=$ost_HOST
+
+MDSDEV1_2=$fs2mds_DEV
+OSTDEV1_2=$fs2ost_DEV
+OSTDEV2_2=$fs3ost_DEV
+
if ! combined_mgs_mds; then
# bug number for skipped test: 23954
ALWAYS_EXCEPT="$ALWAYS_EXCEPT 24b"
cleanup_nocli || return $?
}
+cleanup_fs2() {
+ trap 0
+ echo "umount $MOUNT2 ..."
+ umount $MOUNT2 || true
+ echo "stopping fs2mds ..."
+ stop fs2mds -f || true
+ echo "stopping fs2ost ..."
+ stop fs2ost -f || true
+}
+
check_mount() {
do_facet client "cp /etc/passwd $DIR/a" || return 71
do_facet client "rm $DIR/a" || return 72
}
run_test 21d "start mgs then ost and then mds"
+cleanup_21e() {
+ MGSNID="$saved_mgsnid"
+ cleanup_fs2
+ echo "stopping fs2mgs ..."
+ stop $fs2mgs -f || true
+}
+
+test_21e() { # LU-5863
+ if [[ -z "$fs3ost_DEV" || -z "$fs2ost_DEV" || -z "$fs2mds_DEV" ]]; then
+ is_blkdev $SINGLEMDS $(mdsdevname ${SINGLEMDS//mds/}) &&
+ skip_env "mixed loopback and real device not working" && return
+ fi
+
+ local fs2mdsdev=$(mdsdevname 1_2)
+ local fs2ostdev=$(ostdevname 1_2)
+ local fs3ostdev=$(ostdevname 2_2)
+
+ local fs2mdsvdev=$(mdsvdevname 1_2)
+ local fs2ostvdev=$(ostvdevname 1_2)
+ local fs3ostvdev=$(ostvdevname 2_2)
+
+ # temporarily use fs3ost as fs2mgs
+ local fs2mgs=fs3ost
+ local fs2mgsdev=$fs3ostdev
+ local fs2mgsvdev=$fs3ostvdev
+
+ local fsname=test1234
+
+ add $fs2mgs $(mkfs_opts mgs $fs2mgsdev) --fsname=$fsname \
+ --reformat $fs2mgsdev $fs2mgsvdev || error "add fs2mgs failed"
+ start $fs2mgs $fs2mgsdev $MGS_MOUNT_OPTS && trap cleanup_21e EXIT INT ||
+ error "start fs2mgs failed"
+
+ local saved_mgsnid="$MGSNID"
+ MGSNID=$(do_facet $fs2mgs $LCTL list_nids | xargs | tr ' ' ,)
+
+ add fs2mds $(mkfs_opts mds1 $fs2mdsdev $fsname) \
+ --reformat $fs2mdsdev $fs2mdsvdev || error "add fs2mds failed"
+ add fs2ost $(mkfs_opts ost1 $fs2ostdev $fsname) \
+ --reformat $fs2ostdev $fs2ostvdev || error "add fs2ost failed"
+
+ start fs2ost $fs2ostdev $OST_MOUNT_OPTS || error "start fs2ost failed"
+ start fs2mds $fs2mdsdev $MDS_MOUNT_OPTS || error "start fs2mds failed"
+
+ mkdir -p $MOUNT2 || error "mkdir $MOUNT2 failed"
+ $MOUNT_CMD $MGSNID:/$fsname $MOUNT2 || error "mount $MOUNT2 failed"
+ DIR=$MOUNT2 MOUNT=$MOUNT2 check_mount || error "check $MOUNT2 failed"
+
+ cleanup_21e
+}
+run_test 21e "separate MGS and MDS"
+
test_22() {
start_mds || error "MDS start failed"
}
run_test 23b "Simulate -EINTR during mount"
-fs2mds_HOST=$mds_HOST
-fs2ost_HOST=$ost_HOST
-
-MDSDEV1_2=$fs2mds_DEV
-OSTDEV1_2=$fs2ost_DEV
-OSTDEV2_2=$fs3ost_DEV
-
-cleanup_fs2() {
- trap 0
- echo "umount $MOUNT2 ..."
- umount $MOUNT2 || true
- echo "stopping fs2mds ..."
- stop fs2mds -f || true
- echo "stopping fs2ost ..."
- stop fs2ost -f || true
-}
-
test_24a() {
local MDSDEV=$(mdsdevname ${SINGLEMDS//mds/})
# Check 3.
# prepare a non-symlink parameter in the OSD
- name="lma_self_repair"
+ name="auto_scrub"
param="$device.osd.$name"
cmd="$LCTL get_param -n osd-*.$device.$name"
error_noexit "Setting \"lov.stripesize\""
return 1
}
+ $r $LCTL conf_param $fsname-MDT0000.mdd.atime_diff=70 || {
+ error_noexit "Setting \"mdd.atime_diff\""
+ return 1
+ }
if [ "$ff_convert" != "no" -a $(facet_fstype ost1) == "ldiskfs" ]; then
$r $LCTL lfsck_start -M $fsname-OST0000 || {
local rc=0
local FSNAME2=test1234
- local fs3ost_HOST=$ost_HOST
local MDSDEV=$(mdsdevname ${SINGLEMDS//mds/})
[ -n "$ost1_HOST" ] && fs2ost_HOST=$ost1_HOST && fs3ost_HOST=$ost1_HOST
run_test 55 "check lov_objid size"
test_56() {
+ local server_version=$(lustre_version_code $SINGLEMDS)
local mds_journal_size_orig=$MDSJOURNALSIZE
local n
mount_client $MOUNT || error "Unable to mount client"
echo ok
$LFS osts
- wait_osc_import_state mds ost1 FULL
- wait_osc_import_state mds ost2 FULL
- $SETSTRIPE --stripe-count=-1 $DIR/$tfile ||
- error "Unable to setstripe $DIR/$tfile"
- n=$($LFS getstripe --stripe-count $DIR/$tfile)
- [ "$n" -eq 2 ] || error "Stripe count not two: $n"
- rm $DIR/$tfile
+
+ if [[ $server_version -ge $(version_code 2.6.54) ]] ||
+ [[ $server_version -ge $(version_code 2.5.4) &&
+ $server_version -lt $(version_code 2.5.11) ]]; then
+ wait_osc_import_state mds ost1 FULL
+ wait_osc_import_state mds ost2 FULL
+ $SETSTRIPE --stripe-count=-1 $DIR/$tfile ||
+ error "Unable to setstripe $DIR/$tfile"
+ n=$($LFS getstripe --stripe-count $DIR/$tfile)
+ [ "$n" -eq 2 ] || error "Stripe count not two: $n"
+ rm $DIR/$tfile
+ fi
+
stopall
MDSJOURNALSIZE=$mds_journal_size_orig
reformat
local time_min=$(recovery_time_min)
local recovery_duration
local completed_clients
+ local wrap_up=5
- echo "start mds service on `facet_active_host $facet`"
+ echo "start mds service on $(facet_active_host $facet)"
start $facet ${dev} $MDS_MOUNT_OPTS \
- "-o recovery_time_hard=$time_min,recovery_time_soft=$time_min"\
- $@ || return 94
+ "-o recovery_time_hard=$time_min,recovery_time_soft=$time_min" $@ ||
+ error "start MDS failed"
start_ost
start_ost2
- echo "recovery_time_hard $time_min, recovery_time_soft $time_min, \
- timeout $TIMEOUT"
+ echo "recovery_time=$time_min, timeout=$TIMEOUT, wrap_up=$wrap_up"
mount_client $MOUNT1 || error "mount failed"
mount_client $MOUNT2 || error "mount failed"
# We need to catch the end of recovery window to extend it.
# Skip 5 requests and add delay to request handling.
#define OBD_FAIL_TGT_REPLAY_DELAY 0x709 | FAIL_SKIP
- do_facet $SINGLEMDS "lctl set_param fail_loc=0x20000709"
- do_facet $SINGLEMDS "lctl set_param fail_val=5"
+ do_facet $SINGLEMDS "lctl set_param fail_loc=0x20000709 fail_val=5"
facet_failover $SINGLEMDS || error "failover: $?"
client_up
echo "recovery status"
- do_facet $SINGLEMDS "$LCTL get_param -n \
- mdt.$FSNAME-MDT0000.recovery_status"
-
- recovery_duration=$(do_facet $SINGLEMDS "$LCTL get_param -n \
- mdt.$FSNAME-MDT0000.recovery_status" | \
- grep recovery_duration |awk '{print $2}')
- (($recovery_duration>$time_min)) && \
- error "recovery_duration > recovery_time_hard"
- completed_clients=$(do_facet $SINGLEMDS "$LCTL get_param -n \
- mdt.$FSNAME-MDT0000.recovery_status" | \
- grep completed_clients |awk '{print $2}')
- [ "$completed_clients" = "1/2" ] || \
- error "completed_clients != 1/2: "$completed_clients
+ do_facet $SINGLEMDS \
+ "$LCTL get_param -n mdt.$FSNAME-MDT0000.recovery_status"
+
+ recovery_duration=$(do_facet $SINGLEMDS \
+ "$LCTL get_param -n mdt.$FSNAME-MDT0000.recovery_status" |
+ awk '/recovery_duration/ { print $2 }')
+ (( $recovery_duration > $time_min + $wrap_up )) &&
+ error "recovery_duration > recovery_time_hard + wrap up"
+ completed_clients=$(do_facet $SINGLEMDS \
+ "$LCTL get_param -n mdt.$FSNAME-MDT0000.recovery_status" |
+ awk '/completed_clients/ { print $2 }')
+ [ "$completed_clients" = "1/2" ] ||
+ error "completed_clients != 1/2: $completed_clients"
do_facet $SINGLEMDS "lctl set_param fail_loc=0"
umount_client $MOUNT1