Use mds1 rather than mds to operate on MDT0000, fixed following cases:
conf-sanity.sh: test_43, test_58, test_62
sanityn.sh: test_54, test_55.
Test-Parameters: testlist=conf-sanity
Test-Parameters: testlist=sanityn
Change-Id: Ibe0b419f837e4478610d61b8efb54af93662a45e
Signed-off-by: Gu Zheng <gzheng@ddn.com>
Reviewed-on: http://review.whamcloud.com/22147
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
setup
chmod ugo+x $DIR || error "chmod 0 failed"
setup
chmod ugo+x $DIR || error "chmod 0 failed"
- set_conf_param_and_check mds \
+ set_conf_param_and_check mds1 \
"$LCTL get_param -n mdt.$FSNAME-MDT0000.root_squash" \
"$FSNAME.mdt.root_squash" \
"0:0"
"$LCTL get_param -n mdt.$FSNAME-MDT0000.root_squash" \
"$FSNAME.mdt.root_squash" \
"0:0"
"$LCTL get_param -n llite.${FSNAME}*.root_squash" \
"0:0" ||
error "check llite root_squash failed!"
"$LCTL get_param -n llite.${FSNAME}*.root_squash" \
"0:0" ||
error "check llite root_squash failed!"
- set_conf_param_and_check mds \
+ set_conf_param_and_check mds1 \
"$LCTL get_param -n mdt.$FSNAME-MDT0000.nosquash_nids" \
"$FSNAME.mdt.nosquash_nids" \
"NONE"
"$LCTL get_param -n mdt.$FSNAME-MDT0000.nosquash_nids" \
"$FSNAME.mdt.nosquash_nids" \
"NONE"
# set root squash UID:GID to RUNAS_ID
# root should be able to access only files owned by RUNAS_ID
#
# set root squash UID:GID to RUNAS_ID
# root should be able to access only files owned by RUNAS_ID
#
- set_conf_param_and_check mds \
+ set_conf_param_and_check mds1 \
"$LCTL get_param -n mdt.$FSNAME-MDT0000.root_squash" \
"$FSNAME.mdt.root_squash" \
"$RUNAS_ID:$RUNAS_ID"
"$LCTL get_param -n mdt.$FSNAME-MDT0000.root_squash" \
"$FSNAME.mdt.root_squash" \
"$RUNAS_ID:$RUNAS_ID"
local NIDLIST=$($LCTL list_nids all | tr '\n' ' ')
NIDLIST="2@gni $NIDLIST 192.168.0.[2,10]@tcp"
NIDLIST=$(echo $NIDLIST | tr -s ' ' ' ')
local NIDLIST=$($LCTL list_nids all | tr '\n' ' ')
NIDLIST="2@gni $NIDLIST 192.168.0.[2,10]@tcp"
NIDLIST=$(echo $NIDLIST | tr -s ' ' ' ')
- set_conf_param_and_check mds \
+ set_conf_param_and_check mds1 \
"$LCTL get_param -n mdt.$FSNAME-MDT0000.nosquash_nids" \
"$FSNAME-MDTall.mdt.nosquash_nids" \
"$NIDLIST"
"$LCTL get_param -n mdt.$FSNAME-MDT0000.nosquash_nids" \
"$FSNAME-MDTall.mdt.nosquash_nids" \
"$NIDLIST"
unmount_fstype $SINGLEMDS
# restart MDS with missing llog files
start_mds || error "unable to start MDS"
unmount_fstype $SINGLEMDS
# restart MDS with missing llog files
start_mds || error "unable to start MDS"
- do_facet mds "$LCTL set_param fail_loc=0"
+ do_facet $SINGLEMDS "$LCTL set_param fail_loc=0"
reformat
}
run_test 58 "missing llog files must not prevent MDT from mounting"
reformat
}
run_test 58 "missing llog files must not prevent MDT from mounting"
{ skip "Need MDS version at least 2.2.51"; return 0; }
echo "disable journal for mds"
{ skip "Need MDS version at least 2.2.51"; return 0; }
echo "disable journal for mds"
- do_facet mds $TUNE2FS -O ^has_journal $mdsdev || error "tune2fs failed"
+ do_facet mds1 $TUNE2FS -O ^has_journal $mdsdev || error "tune2fs failed"
start_mds && error "MDT start should fail"
echo "disable journal for ost"
do_facet ost1 $TUNE2FS -O ^has_journal $ostdev || error "tune2fs failed"
start_mds && error "MDT start should fail"
echo "disable journal for ost"
do_facet ost1 $TUNE2FS -O ^has_journal $ostdev || error "tune2fs failed"
echo "==> rename vs getattr vs setxattr should not deadlock"
mkdir -p $DIR/d1/d2/d3 || error "(1) mkdir failed"
echo "==> rename vs getattr vs setxattr should not deadlock"
mkdir -p $DIR/d1/d2/d3 || error "(1) mkdir failed"
- do_facet mds $LCTL set_param fail_loc=$1
+ do_facet mds1 $LCTL set_param fail_loc=$1
mv -T $DIR/d1/d2/d3 $DIR/d1/d3 &
PID1=$!
mv -T $DIR/d1/d2/d3 $DIR/d1/d3 &
PID1=$!
echo "==> rename vs getattr vs open vs getattr should not deadlock"
mkdir -p $DIR/d1/d2/d3 || error "(1) mkdir failed"
echo "==> rename vs getattr vs open vs getattr should not deadlock"
mkdir -p $DIR/d1/d2/d3 || error "(1) mkdir failed"
- do_facet mds $LCTL set_param fail_loc=$1
+ do_facet mds1 $LCTL set_param fail_loc=$1
mv -T $DIR/d1/d2/d3 $DIR/d1/d3 &
PID1=$!
mv -T $DIR/d1/d2/d3 $DIR/d1/d3 &
PID1=$!
mkdir -p $DIR/d1/d2 $DIR/d3 || error "(1) mkdir failed"
#define OBD_FAIL_MDS_RENAME4 0x156
mkdir -p $DIR/d1/d2 $DIR/d3 || error "(1) mkdir failed"
#define OBD_FAIL_MDS_RENAME4 0x156
- do_facet mds $LCTL set_param fail_loc=0x80000156
+ do_facet mds1 $LCTL set_param fail_loc=0x80000156
mv -T $DIR/d1/d2 $DIR/d3/d2 &
PID1=$!
mv -T $DIR/d1/d2 $DIR/d3/d2 &
PID1=$!
mkdir -p $DIR/d1/d2 $DIR/d3 || error "(1) mkdir failed"
#define OBD_FAIL_MDS_RENAME4 0x156
mkdir -p $DIR/d1/d2 $DIR/d3 || error "(1) mkdir failed"
#define OBD_FAIL_MDS_RENAME4 0x156
- do_facet mds $LCTL set_param fail_loc=0x80000156
+ do_facet mds1 $LCTL set_param fail_loc=0x80000156
mv -T $DIR/d1/d2 $DIR/d3/d2 &
PID1=$!
mv -T $DIR/d1/d2 $DIR/d3/d2 &
PID1=$!
mkdir -p $DIR/d1/d2 $DIR/d3 || error "(1) mkdir failed"
#define OBD_FAIL_MDS_RENAME4 0x156
mkdir -p $DIR/d1/d2 $DIR/d3 || error "(1) mkdir failed"
#define OBD_FAIL_MDS_RENAME4 0x156
- do_facet mds $LCTL set_param fail_loc=0x156
+ do_facet mds1 $LCTL set_param fail_loc=0x156
mv -T $DIR/d1/d2 $DIR/d3/d2 &
PID1=$!
mv -T $DIR/d1/d2 $DIR/d3/d2 &
PID1=$!
touch $DIR/f1
#define OBD_FAIL_MDS_RENAME3 0x155
touch $DIR/f1
#define OBD_FAIL_MDS_RENAME3 0x155
- do_facet mds $LCTL set_param fail_loc=0x155
+ do_facet mds1 $LCTL set_param fail_loc=0x155
mv $DIR/f1 $DIR/$tdir &
PID1=$!
sleep 2
mv $DIR/f1 $DIR/$tdir &
PID1=$!
sleep 2