The "lfs getstripe -M" and "lfs mv -M" options are deprecated
since 2.9 and should not be used in the tests.
Clean up some of the nearby tests to match current coding style:
- lower-case local variable names
- tabs for indentation
- replace $GETSTRIPE/$SETSTRIPE with "$LFS getstripe/setstripe"
Test-Parameters: trivial testlist=replay-dual,sanity-flr
Test-Parameters: testlist=recovery-small,replay-single mdtcount=2
Test-Parameters: testlist=testlist=sanity,sanityn,sanity-hsm mdtcount=2
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: Id86395a03379bef2de24dfa92642c928f51cab07
Reviewed-on: https://review.whamcloud.com/31808
Tested-by: Jenkins
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Elena Gryaznova <c17455@cray.com>
Reviewed-by: Yang Sheng <yang.sheng@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
argument must follow the option without a space, and for long options an
.RB ' = '
sign must be used.
argument must follow the option without a space, and for long options an
.RB ' = '
sign must be used.
The default behavior when a directory is specified is to list the striping
information for all files within the specified directory (like
The default behavior when a directory is specified is to list the striping
information for all files within the specified directory (like
+.RB ' "ls -l <directory>" ').
.SH OPTIONS
.TP
.BR --component-count | --comp-count
.SH OPTIONS
.TP
.BR --component-count | --comp-count
.BR none
, then the OST pool name will be cleared and inherit from parent directory.
.TP
.BR none
, then the OST pool name will be cleared and inherit from parent directory.
.TP
-.B -L, --layout <\fIlayout type\fB>\fR
+.B -L\fR, \fB--layout \fR<\fIlayout type\fR>
The type of stripe layout, can be
.BR raid0 ", " released " or " mdt ".
It is
The type of stripe layout, can be
.BR raid0 ", " released " or " mdt ".
It is
.SH COMPONENT_OPTIONS
The various component related options are listed and explained below:
.TP
.SH COMPONENT_OPTIONS
The various component related options are listed and explained below:
.TP
-.B -E\fR,\fB--component-end \fR< \fIend\fR>
+.B -E\fR, \fB--component-end \fR<\fIend\fR>
The end offset of the component,
.I end
is specified in bytes, or using a suffix (kMGTP),
The end offset of the component,
.I end
is specified in bytes, or using a suffix (kMGTP),
test_110a () {
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return 0
local remote_dir=$DIR/$tdir/remote_dir
test_110a () {
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return 0
local remote_dir=$DIR/$tdir/remote_dir
local num
#prepare for 110 test, which need set striped dir on remote MDT.
for num in $(seq $MDSCOUNT); do
do_facet mds$num \
local num
#prepare for 110 test, which need set striped dir on remote MDT.
for num in $(seq $MDSCOUNT); do
do_facet mds$num \
- lctl set_param -n mdt.${FSNAME}*.enable_remote_dir=1 \
+ lctl set_param -n mdt.$FSNAME*.enable_remote_dir=1 \
2>/dev/null
done
mkdir -p $DIR/$tdir
2>/dev/null
done
mkdir -p $DIR/$tdir
- drop_request "$LFS mkdir -i $MDTIDX -c2 $remote_dir" ||
- error "lfs mkdir failed"
- local diridx=$($GETSTRIPE -M $remote_dir)
- [ $diridx -eq $MDTIDX ] || error "$diridx != $MDTIDX"
+ drop_request "$LFS mkdir -i $mdtidx -c2 $remote_dir" ||
+ error "lfs mkdir failed"
+ local diridx=$($LFS getstripe -m $remote_dir)
+ [ $diridx -eq $mdtidx ] || error "$diridx != $mdtidx"
rm -rf $DIR/$tdir || error "rmdir failed"
}
rm -rf $DIR/$tdir || error "rmdir failed"
}
test_110b () {
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return 0
local remote_dir=$DIR/$tdir/remote_dir
test_110b () {
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return 0
local remote_dir=$DIR/$tdir/remote_dir
- drop_reint_reply "$LFS mkdir -i $MDTIDX -c2 $remote_dir" ||
- error "lfs mkdir failed"
+ drop_reint_reply "$LFS mkdir -i $mdtidx -c2 $remote_dir" ||
+ error "lfs mkdir failed"
- diridx=$($GETSTRIPE -M $remote_dir)
- [ $diridx -eq $MDTIDX ] || error "$diridx != $MDTIDX"
+ diridx=$($LFS getstripe -m $remote_dir)
+ [ $diridx -eq $mdtidx ] || error "$diridx != $mdtidx"
rm -rf $DIR/$tdir || error "rmdir failed"
}
rm -rf $DIR/$tdir || error "rmdir failed"
}
test_110c () {
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return 0
local remote_dir=$DIR/$tdir/remote_dir
test_110c () {
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return 0
local remote_dir=$DIR/$tdir/remote_dir
- drop_update_reply $MDTIDX "$LFS mkdir -i $MDTIDX -c2 $remote_dir" ||
- error "lfs mkdir failed"
+ drop_update_reply $mdtidx "$LFS mkdir -i $mdtidx -c2 $remote_dir" ||
+ error "lfs mkdir failed"
- diridx=$($GETSTRIPE -M $remote_dir)
- [ $diridx -eq $MDTIDX ] || error "$diridx != $MDTIDX"
+ diridx=$($GETSTRIPE -m $remote_dir)
+ [ $diridx -eq $mdtidx ] || error "$diridx != $mdtidx"
rm -rf $DIR/$tdir || error "rmdir failed"
}
rm -rf $DIR/$tdir || error "rmdir failed"
}
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return 0
local remote_dir=$DIR/$tdir/remote_dir
[ $MDSCOUNT -lt 2 ] && skip "needs >= 2 MDTs" && return 0
local remote_dir=$DIR/$tdir/remote_dir
mkdir -p $remote_dir
createmany -o $remote_dir/f 100
#define OBD_FAIL_MIGRATE_NET_REP 0x1800
mkdir -p $remote_dir
createmany -o $remote_dir/f 100
#define OBD_FAIL_MIGRATE_NET_REP 0x1800
- do_facet mds$MDTIDX lctl set_param fail_loc=0x1800
- $LFS migrate -m $MDTIDX $remote_dir || error "migrate failed"
- do_facet mds$MDTIDX lctl set_param fail_loc=0x0
+ do_facet mds$mdtidx lctl set_param fail_loc=0x1800
+ $LFS migrate -m $mdtidx $remote_dir || error "migrate failed"
+ do_facet mds$mdtidx lctl set_param fail_loc=0x0
for file in $(find $remote_dir); do
for file in $(find $remote_dir); do
- mdt_index=$($LFS getstripe -M $file)
- [ $mdt_index == $MDTIDX ] ||
- error "$file is not on MDT${MDTIDX}"
+ mdt_index=$($LFS getstripe -m $file)
+ [ $mdt_index == $mdtidx ] ||
+ error "$file is not on MDT${mdtidx}"
done
rm -rf $DIR/$tdir || error "rmdir failed"
done
rm -rf $DIR/$tdir || error "rmdir failed"
local param_file=$TMP/$tfile-params
local param_file=$TMP/$tfile-params
- local mdtidx=$($LFS getstripe -M $MOUNT1)
+ local mdtidx=$($LFS getstripe -m $MOUNT1)
local facet=mds$((mdtidx + 1))
save_lustre_params $facet "mdt.*.commit_on_sharing" > $param_file
local facet=mds$((mdtidx + 1))
save_lustre_params $facet "mdt.*.commit_on_sharing" > $param_file
run_test 74 "Ensure applications don't fail waiting for OST recovery"
remote_dir_check_80() {
run_test 74 "Ensure applications don't fail waiting for OST recovery"
remote_dir_check_80() {
local diridx
local fileidx
local diridx
local fileidx
- diridx=$($GETSTRIPE -M $remote_dir) ||
- error "$GETSTRIPE -M $remote_dir failed"
- [ $diridx -eq $MDTIDX ] || error "$diridx != $MDTIDX"
+ diridx=$($LFS getstripe -m $remote_dir) ||
+ error "$LFS getstripe -m $remote_dir failed"
+ [ $diridx -eq $mdtidx ] || error "$diridx != $mdtidx"
createmany -o $remote_dir/f-%d 20 || error "creation failed"
createmany -o $remote_dir/f-%d 20 || error "creation failed"
- fileidx=$($GETSTRIPE -M $remote_dir/f-1) ||
- error "$GETSTRIPE -M $remote_dir/f-1 failed"
- [ $fileidx -eq $MDTIDX ] || error "$fileidx != $MDTIDX"
+ fileidx=$($LFS getstripe -m $remote_dir/f-1) ||
+ error "$LFS getstripe -m $remote_dir/f-1 failed"
+ [ $fileidx -eq $mdtidx ] || error "$fileidx != $mdtidx"
- # file "f${index}" striped over 1 OST
- # file "all" striped over all OSTs
+ # file "f${index}" striped over 1 OST
+ # file "all" striped over all OSTs
- $SETSTRIPE -c $OSTCOUNT $dir/all ||
- error "setstripe failed to create $dir/all"
+ $LFS setstripe -c $OSTCOUNT $dir/all ||
+ error "setstripe failed to create $dir/all"
- for (( i=0; i<$OSTCOUNT; i++ )); do
- local f=$dir/f$i
- $SETSTRIPE -i $i -c 1 $f || error "$SETSTRIPE failed to create $f"
+ for ((i = 0; i < $OSTCOUNT; i++)); do
+ local f=$dir/f$i
- # confirm setstripe actually created the stripe on the requested OST
- local uuid=$(ostuuid_from_index $i)
- for file in f$i all; do
- if [[ $dir/$file != $($LFS find --obd $uuid --name $file $dir) ]]; then
- $GETSTRIPE $dir/$file
- error wrong stripe: $file, uuid: $uuid
- fi
- done
- done
+ $LFS setstripe -i $i -c 1 $f ||
+ error "$LFS setstripe failed to create $f"
+
+ # confirm setstripe actually created stripe on requested OST
+ local uuid=$(ostuuid_from_index $i)
+
+ for file in f$i all; do
+ local found=$($LFS find --obd $uuid --name $file $dir)
+
+ if [[ $dir/$file != $found ]]; then
+ $LFS getstripe $dir/$file
+ error "wrong stripe: $file, uuid: $uuid"
+ fi
+ done
+ done
# Before failing an OST, get its obd name and index
local varsvc=${ostfail}_svc
# Before failing an OST, get its obd name and index
local varsvc=${ostfail}_svc
verify_ost_layout_version $tf
# test case 2
verify_ost_layout_version $tf
# test case 2
- local mds_idx=mds$(($($LFS getstripe -M $tf-2) + 1))
+ local mds_idx=mds$(($($LFS getstripe -m $tf-2) + 1))
local delay_sec=10
do_facet $mds_idx $LCTL set_param fail_val=$delay_sec
local delay_sec=10
do_facet $mds_idx $LCTL set_param fail_val=$delay_sec
do_facet $mds_idx $LCTL set_param fail_loc=0
# test case 3
do_facet $mds_idx $LCTL set_param fail_loc=0
# test case 3
- mds_idx=mds$(($($LFS getstripe -M $tf-3) + 1))
+ mds_idx=mds$(($($LFS getstripe -m $tf-3) + 1))
#define OBD_FAIL_FLR_LV_INC 0x1A02
do_facet $mds_idx $LCTL set_param fail_loc=0x1A02
#define OBD_FAIL_FLR_LV_INC 0x1A02
do_facet $mds_idx $LCTL set_param fail_loc=0x1A02
#define OBD_FAIL_FLR_RANDOM_PICK_MIRROR 0x1A03
$LCTL set_param fail_loc=0x1A03
#define OBD_FAIL_FLR_RANDOM_PICK_MIRROR 0x1A03
$LCTL set_param fail_loc=0x1A03
- local mds_idx=mds$(($($LFS getstripe -M $tf) + 1))
+ local mds_idx=mds$(($($LFS getstripe -m $tf) + 1))
do_facet $mds_idx $LCTL set_param fail_loc=0x1A03
declare -a pids
do_facet $mds_idx $LCTL set_param fail_loc=0x1A03
declare -a pids
local fid3=$(create_small_sync_file $striped_dir/${tfile}_2)
local fid4=$(create_small_sync_file $striped_dir/${tfile}_3)
local fid3=$(create_small_sync_file $striped_dir/${tfile}_2)
local fid4=$(create_small_sync_file $striped_dir/${tfile}_3)
- local idx1=$($LFS getstripe -M $striped_dir/${tfile}_0)
- local idx2=$($LFS getstripe -M $striped_dir/${tfile}_1)
- local idx3=$($LFS getstripe -M $striped_dir/${tfile}_2)
- local idx4=$($LFS getstripe -M $striped_dir/${tfile}_3)
+ local idx1=$($LFS getstripe -m $striped_dir/${tfile}_0)
+ local idx2=$($LFS getstripe -m $striped_dir/${tfile}_1)
+ local idx3=$($LFS getstripe -m $striped_dir/${tfile}_2)
+ local idx4=$($LFS getstripe -m $striped_dir/${tfile}_3)
# check that compound requests are shunt to the rights MDTs
$LFS hsm_archive $striped_dir/${tfile}_0 $striped_dir/${tfile}_1 \
# check that compound requests are shunt to the rights MDTs
$LFS hsm_archive $striped_dir/${tfile}_0 $striped_dir/${tfile}_1 \
$LFS migrate -m1 $DIR/$tdir ||
error "cannot complete migration after HSM remove"
$LFS migrate -m1 $DIR/$tdir ||
error "cannot complete migration after HSM remove"
- mdt_index=$($LFS getstripe -M $DIR/$tdir)
+ mdt_index=$($LFS getstripe -m $DIR/$tdir)
if ((mdt_index != 1)); then
error "expected MDT index 1, got $mdt_index"
fi
if ((mdt_index != 1)); then
error "expected MDT index 1, got $mdt_index"
fi
ln -sf ${short_sym} $wdir/short-$i || error "short_sym failed"
done
ln -sf ${short_sym} $wdir/short-$i || error "short_sym failed"
done
- local mds_index=$(($($LFS getstripe -M $wdir) + 1))
+ local mds_index=$(($($LFS getstripe -m $wdir) + 1))
local devname=$(mdsdevname $mds_index)
echo "stop and checking mds${mds_index}:"
local devname=$(mdsdevname $mds_index)
echo "stop and checking mds${mds_index}:"
test_mkdir $wdir
touch $wdir/$tfile
test_mkdir $wdir
touch $wdir/$tfile
- mdt_index=$($LFS getstripe -M $wdir/$tfile)
+ mdt_index=$($LFS getstripe -m $wdir/$tfile)
mdt_index=$((mdt_index + 1))
cancel_lru_locks mdc
mdt_index=$((mdt_index + 1))
cancel_lru_locks mdc
local ofacet=ost$((OSTIDX + 1))
test_mkdir -p -c1 $DIR/$tdir
local ofacet=ost$((OSTIDX + 1))
test_mkdir -p -c1 $DIR/$tdir
- local mdtidx=$($LFS getstripe -M $DIR/$tdir)
+ local mdtidx=$($LFS getstripe -m $DIR/$tdir)
local mfacet=mds$((mdtidx + 1))
echo OSTIDX=$OSTIDX MDTIDX=$mdtidx
local mfacet=mds$((mdtidx + 1))
echo OSTIDX=$OSTIDX MDTIDX=$mdtidx
- local mdtidx=$(printf "%04x" $($LFS getstripe -M $dir))
+ local mdtidx=$(printf "%04x" $($LFS getstripe -m $dir))
local numfree=$(lctl get_param -n mdc.$FSNAME-MDT$mdtidx*.filesfree)
[[ $numfree -lt $nrdirs ]] &&
skip "not enough free inodes ($numfree) on MDT$mdtidx"
local numfree=$(lctl get_param -n mdc.$FSNAME-MDT$mdtidx*.filesfree)
[[ $numfree -lt $nrdirs ]] &&
skip "not enough free inodes ($numfree) on MDT$mdtidx"
local max=100000
local ulimit_old=$(ulimit -n)
local spare=20 # number of spare fd's for scripts/libraries, etc.
local max=100000
local ulimit_old=$(ulimit -n)
local spare=20 # number of spare fd's for scripts/libraries, etc.
- local mdt=$(lfs getstripe -M $DIR/$tdir)
- local numfree=$(lfs df -i $DIR/$tdir | awk '/MDT:'$mdt'/ { print $4 }')
+ local mdt=$($LFS getstripe -m $DIR/$tdir)
+ local numfree=$($LFS df -i $DIR/$tdir | awk '/MDT:'$mdt'/ { print $4 }')
echo "MDT$mdt numfree=$numfree, max=$max"
[[ $numfree -gt $max ]] && numfree=$max || numfree=$((numfree * 7 / 8))
echo "MDT$mdt numfree=$numfree, max=$max"
[[ $numfree -gt $max ]] && numfree=$max || numfree=$((numfree * 7 / 8))
run_test 56u "check lfs find -stripe-index works"
test_56v() {
run_test 56u "check lfs find -stripe-index works"
test_56v() {
local dir=$DIR/$tdir
setup_56 $dir $NUMFILES $NUMDIRS
local dir=$DIR/$tdir
setup_56 $dir $NUMFILES $NUMDIRS
- UUID=$(mdtuuid_from_index $MDT_IDX $dir)
- [ -z "$UUID" ] && error "mdtuuid_from_index cannot find MDT $MDT_IDX"
+ UUID=$(mdtuuid_from_index $mdt_idx $dir)
+ [ -z "$UUID" ] && error "mdtuuid_from_index cannot find MDT $mdt_idx"
- for file in $($LFS find -mdt $UUID $dir); do
- file_mdt_idx=$($LFS getstripe -M $file)
- [ $file_mdt_idx -eq $MDT_IDX ] ||
- error "lfind -mdt $UUID != getstripe -M $file_mdt_idx"
+ for file in $($LFS find -m $UUID $dir); do
+ file_midx=$($LFS getstripe -m $file)
+ [ $file_midx -eq $mdt_idx ] ||
+ error "lfs find -m $UUID != getstripe -m $file_midx"
-run_test 56v "check 'lfs find -mdt match with lfs getstripe -M' ======="
+run_test 56v "check 'lfs find -m match with lfs getstripe -m'"
test_56w() {
[[ $OSTCOUNT -lt 2 ]] && skip_env "needs >= 2 OSTs"
test_56w() {
[[ $OSTCOUNT -lt 2 ]] && skip_env "needs >= 2 OSTs"
remote_mds_nodsh && skip "remote MDS with nodsh"
local dir=$DIR/$tdir
remote_mds_nodsh && skip "remote MDS with nodsh"
local dir=$DIR/$tdir
- local FILECOUNT=100
- local FILE1=$dir/f1
- local FILEN=$dir/f$FILECOUNT
+ local filecount=100
+ local file1=$dir/f1
+ local fileN=$dir/f$filecount
rm -rf $dir || error "removing $dir"
test_mkdir -c1 $dir
rm -rf $dir || error "removing $dir"
test_mkdir -c1 $dir
- local mdtidx=$($LFS getstripe -M $dir)
+ local mdtidx=$($LFS getstripe -m $dir)
local mdtname=MDT$(printf %04x $mdtidx)
local facet=mds$((mdtidx + 1))
local mdtname=MDT$(printf %04x $mdtidx)
local facet=mds$((mdtidx + 1))
- echo "mcreating $FILECOUNT files"
- createmany -m $dir/f 1 $FILECOUNT || \
- error "creating files in $dir"
+ echo "mcreating $filecount files"
+ createmany -m $dir/f 1 $filecount || error "creating files in $dir"
# verify that files do not have EAs yet
# verify that files do not have EAs yet
- $GETSTRIPE $FILE1 2>&1 | grep -q "no stripe" || error "$FILE1 has an EA"
- $GETSTRIPE $FILEN 2>&1 | grep -q "no stripe" || error "$FILEN has an EA"
+ $LFS getstripe $file1 2>&1 | grep -q "no stripe" ||
+ error "$file1 has an EA"
+ $LFS getstripe $fileN 2>&1 | grep -q "no stripe" ||
+ error "$fileN has an EA"
sync
sleep 1
df $dir #make sure we get new statfs data
sync
sleep 1
df $dir #make sure we get new statfs data
- local MDSFREE=$(do_facet $facet \
- lctl get_param -n osd*.*$mdtname.kbytesfree)
- local MDCFREE=$(lctl get_param -n mdc.*$mdtname-mdc-*.kbytesfree)
+ local mdsfree=$(do_facet $facet \
+ lctl get_param -n osd*.*$mdtname.kbytesfree)
+ local mdcfree=$(lctl get_param -n mdc.*$mdtname-mdc-*.kbytesfree)
+ local file
+
echo "opening files to create objects/EAs"
echo "opening files to create objects/EAs"
- local FILE
- for FILE in `seq -f $dir/f%g 1 $FILECOUNT`; do
- $OPENFILE -f O_RDWR $FILE > /dev/null 2>&1 || error "opening $FILE"
+ for file in $(seq -f $dir/f%g 1 $filecount); do
+ $OPENFILE -f O_RDWR $file > /dev/null 2>&1 ||
+ error "opening $file"
done
# verify that files have EAs now
done
# verify that files have EAs now
- $GETSTRIPE $FILE1 | grep -q "obdidx" || error "$FILE1 missing EA"
- $GETSTRIPE $FILEN | grep -q "obdidx" || error "$FILEN missing EA"
+ $LFS getstripe $file1 | grep -q "obdidx" || error "$file1 missing EA"
+ $LFS getstripe $fileN | grep -q "obdidx" || error "$fileN missing EA"
sleep 1 #make sure we get new statfs data
df $dir
sleep 1 #make sure we get new statfs data
df $dir
- local MDSFREE2=$(do_facet $facet \
- lctl get_param -n osd*.*$mdtname.kbytesfree)
- local MDCFREE2=$(lctl get_param -n mdc.*$mdtname-mdc-*.kbytesfree)
- if [[ $MDCFREE2 -lt $((MDCFREE - 16)) ]]; then
- if [ "$MDSFREE" != "$MDSFREE2" ]; then
- error "MDC before $MDCFREE != after $MDCFREE2"
+ local mdsfree2=$(do_facet $facet \
+ lctl get_param -n osd*.*$mdtname.kbytesfree)
+ local mdcfree2=$(lctl get_param -n mdc.*$mdtname-mdc-*.kbytesfree)
+
+ if [[ $mdcfree2 -lt $((mdcfree - 16)) ]]; then
+ if [ "$mdsfree" != "$mdsfree2" ]; then
+ error "MDC before $mdcfree != after $mdcfree2"
- echo "MDC before $MDCFREE != after $MDCFREE2"
+ echo "MDC before $mdcfree != after $mdcfree2"
echo "unable to confirm if MDS has large inodes"
fi
fi
echo "unable to confirm if MDS has large inodes"
fi
fi
test_mkdir $DIR/$tdir
test_mkdir -i0 -c1 $DIR/$tdir/test_230_local
test_mkdir $DIR/$tdir
test_mkdir -i0 -c1 $DIR/$tdir/test_230_local
- local mdt_idx=$($GETSTRIPE -M $DIR/$tdir/test_230_local)
+ local mdt_idx=$($LFS getstripe -m $DIR/$tdir/test_230_local)
[ $mdt_idx -ne 0 ] &&
error "create local directory on wrong MDT $mdt_idx"
$LFS mkdir -i $MDTIDX $DIR/$tdir/test_230 ||
error "create remote directory failed"
[ $mdt_idx -ne 0 ] &&
error "create local directory on wrong MDT $mdt_idx"
$LFS mkdir -i $MDTIDX $DIR/$tdir/test_230 ||
error "create remote directory failed"
- local mdt_idx=$($GETSTRIPE -M $DIR/$tdir/test_230)
+ local mdt_idx=$($LFS getstripe -m $DIR/$tdir/test_230)
[ $mdt_idx -ne $MDTIDX ] &&
error "create remote directory on wrong MDT $mdt_idx"
createmany -o $DIR/$tdir/test_230/t- 10 ||
error "create files on remote directory failed"
[ $mdt_idx -ne $MDTIDX ] &&
error "create remote directory on wrong MDT $mdt_idx"
createmany -o $DIR/$tdir/test_230/t- 10 ||
error "create files on remote directory failed"
- mdt_idx=$($GETSTRIPE -M $DIR/$tdir/test_230/t-0)
+ mdt_idx=$($LFS getstripe -m $DIR/$tdir/test_230/t-0)
[ $mdt_idx -ne $MDTIDX ] && error "create files on wrong MDT $mdt_idx"
rm -r $DIR/$tdir || error "unlink remote directory failed"
}
[ $mdt_idx -ne $MDTIDX ] && error "create files on wrong MDT $mdt_idx"
rm -r $DIR/$tdir || error "unlink remote directory failed"
}
echo "migratate to MDT1, then checking.."
for ((i = 0; i < 10; i++)); do
for file in $(find $migrate_dir/dir_${i}); do
echo "migratate to MDT1, then checking.."
for ((i = 0; i < 10; i++)); do
for file in $(find $migrate_dir/dir_${i}); do
- mdt_index=$($LFS getstripe -M $file)
+ mdt_index=$($LFS getstripe -m $file)
[ $mdt_index == $MDTIDX ] ||
error "$file is not on MDT${MDTIDX}"
done
done
# the multiple link file should still in MDT0
[ $mdt_index == $MDTIDX ] ||
error "$file is not on MDT${MDTIDX}"
done
done
# the multiple link file should still in MDT0
- mdt_index=$($LFS getstripe -M $migrate_dir/$tfile)
+ mdt_index=$($LFS getstripe -m $migrate_dir/$tfile)
[ $mdt_index == 0 ] ||
error "$file is not on MDT${MDTIDX}"
[ $mdt_index == 0 ] ||
error "$file is not on MDT${MDTIDX}"
echo "migrate back to MDT0, checking.."
for file in $(find $migrate_dir); do
echo "migrate back to MDT0, checking.."
for file in $(find $migrate_dir); do
- mdt_index=$($LFS getstripe -M $file)
+ mdt_index=$($LFS getstripe -m $file)
[ $mdt_index == $MDTIDX ] ||
error "$file is not on MDT${MDTIDX}"
done
[ $mdt_index == $MDTIDX ] ||
error "$file is not on MDT${MDTIDX}"
done
echo "Finish migration, then checking.."
for file in $(find $migrate_dir); do
echo "Finish migration, then checking.."
for file in $(find $migrate_dir); do
- mdt_index=$($LFS getstripe -M $file)
+ mdt_index=$($LFS getstripe -m $file)
[ $mdt_index == $MDTIDX ] ||
error "$file is not on MDT${MDTIDX}"
done
[ $mdt_index == $MDTIDX ] ||
error "$file is not on MDT${MDTIDX}"
done
echo "Finish migration, then checking.."
for file in $(find $migrate_dir); do
echo "Finish migration, then checking.."
for file in $(find $migrate_dir); do
- mdt_index=$($LFS getstripe -M $file)
+ mdt_index=$($LFS getstripe -m $file)
[ $mdt_index == $MDTIDX ] ||
error "$file is not on MDT${MDTIDX}"
done
[ $mdt_index == $MDTIDX ] ||
error "$file is not on MDT${MDTIDX}"
done
$LFS migrate -m 1 $DIR/$tdir/migrate_dir ||
error "migrate dir fails"
$LFS migrate -m 1 $DIR/$tdir/migrate_dir ||
error "migrate dir fails"
- mdt_index=$($LFS getstripe -M $DIR/$tdir/migrate_dir)
+ mdt_index=$($LFS getstripe -m $DIR/$tdir/migrate_dir)
[ $mdt_index == 1 ] || error "migrate_dir is not on MDT1"
[ $mdt_index == 1 ] || error "migrate_dir is not on MDT1"
- mdt_index=$($LFS getstripe -M $DIR/$tdir/migrate_dir/a)
+ mdt_index=$($LFS getstripe -m $DIR/$tdir/migrate_dir/a)
[ $mdt_index == 0 ] || error "a is not on MDT0"
$LFS migrate -m 1 $DIR/$tdir/other_dir ||
error "migrate dir fails"
[ $mdt_index == 0 ] || error "a is not on MDT0"
$LFS migrate -m 1 $DIR/$tdir/other_dir ||
error "migrate dir fails"
- mdt_index=$($LFS getstripe -M $DIR/$tdir/other_dir)
+ mdt_index=$($LFS getstripe -m $DIR/$tdir/other_dir)
[ $mdt_index == 1 ] || error "other_dir is not on MDT1"
[ $mdt_index == 1 ] || error "other_dir is not on MDT1"
- mdt_index=$($LFS getstripe -M $DIR/$tdir/migrate_dir/a)
+ mdt_index=$($LFS getstripe -m $DIR/$tdir/migrate_dir/a)
[ $mdt_index == 1 ] || error "a is not on MDT1"
[ $mdt_index == 1 ] || error "a is not on MDT1"
- mdt_index=$($LFS getstripe -M $DIR/$tdir/other_dir/b)
+ mdt_index=$($LFS getstripe -m $DIR/$tdir/other_dir/b)
[ $mdt_index == 1 ] || error "b is not on MDT1"
a_fid=$($LFS path2fid $DIR/$tdir/migrate_dir/a)
[ $mdt_index == 1 ] || error "b is not on MDT1"
a_fid=$($LFS path2fid $DIR/$tdir/migrate_dir/a)
# a should be migrated to MDT1, since no other links on MDT0
$LFS migrate -m 1 $DIR/$tdir/migrate_dir ||
error "#1 migrate dir fails"
# a should be migrated to MDT1, since no other links on MDT0
$LFS migrate -m 1 $DIR/$tdir/migrate_dir ||
error "#1 migrate dir fails"
- mdt_index=$($LFS getstripe -M $DIR/$tdir/migrate_dir)
+ mdt_index=$($LFS getstripe -m $DIR/$tdir/migrate_dir)
[ $mdt_index == 1 ] || error "migrate_dir is not on MDT1"
[ $mdt_index == 1 ] || error "migrate_dir is not on MDT1"
- mdt_index=$($LFS getstripe -M $DIR/$tdir/migrate_dir/a)
+ mdt_index=$($LFS getstripe -m $DIR/$tdir/migrate_dir/a)
[ $mdt_index == 1 ] || error "a is not on MDT1"
# a should stay on MDT1, because it is a mulitple link file
$LFS migrate -m 0 $DIR/$tdir/migrate_dir ||
error "#2 migrate dir fails"
[ $mdt_index == 1 ] || error "a is not on MDT1"
# a should stay on MDT1, because it is a mulitple link file
$LFS migrate -m 0 $DIR/$tdir/migrate_dir ||
error "#2 migrate dir fails"
- mdt_index=$($LFS getstripe -M $DIR/$tdir/migrate_dir/a)
+ mdt_index=$($LFS getstripe -m $DIR/$tdir/migrate_dir/a)
[ $mdt_index == 1 ] || error "a is not on MDT1"
$LFS migrate -m 1 $DIR/$tdir/migrate_dir ||
[ $mdt_index == 1 ] || error "a is not on MDT1"
$LFS migrate -m 1 $DIR/$tdir/migrate_dir ||
# a should be migrated to MDT0, since no other links on MDT1
$LFS migrate -m 0 $DIR/$tdir/migrate_dir ||
error "#4 migrate dir fails"
# a should be migrated to MDT0, since no other links on MDT1
$LFS migrate -m 0 $DIR/$tdir/migrate_dir ||
error "#4 migrate dir fails"
- mdt_index=$($LFS getstripe -M $DIR/$tdir/migrate_dir/a)
+ mdt_index=$($LFS getstripe -m $DIR/$tdir/migrate_dir/a)
[ $mdt_index == 0 ] || error "a is not on MDT0"
rm -rf $DIR/$tdir || error "rm dir failed after migration"
[ $mdt_index == 0 ] || error "a is not on MDT0"
rm -rf $DIR/$tdir || error "rm dir failed after migration"
$LFS migrate -m1 $DIR/$tdir/migrate_dir/.. ||
error "migrating $tdir fail"
$LFS migrate -m1 $DIR/$tdir/migrate_dir/.. ||
error "migrating $tdir fail"
- mdt_index=$($LFS getstripe -M $DIR/$tdir)
+ mdt_index=$($LFS getstripe -m $DIR/$tdir)
[ $mdt_index == 1 ] || error "$mdt_index != 1 after migration"
[ $mdt_index == 1 ] || error "$mdt_index != 1 after migration"
- mdt_index=$($LFS getstripe -M $DIR/$tdir/migrate_dir)
+ mdt_index=$($LFS getstripe -m $DIR/$tdir/migrate_dir)
[ $mdt_index == 1 ] || error "$mdt_index != 1 after migration"
}
[ $mdt_index == 1 ] || error "$mdt_index != 1 after migration"
}
stat $DIR/$tdir
#define OBD_FAIL_MDS_XATTR_REP 0x161
stat $DIR/$tdir
#define OBD_FAIL_MDS_XATTR_REP 0x161
- local mdtidx=$($LFS getstripe -M $DIR/$tdir)
+ local mdtidx=$($LFS getstripe -m $DIR/$tdir)
local facet=mds$((mdtidx + 1))
set_nodes_failloc $(facet_active_host $facet) 0x80000161
getfattr -n trusted.name1 $DIR/$tdir 2> /dev/null
local facet=mds$((mdtidx + 1))
set_nodes_failloc $(facet_active_host $facet) 0x80000161
getfattr -n trusted.name1 $DIR/$tdir 2> /dev/null
[ $($LFS getstripe -c $dom) == 0 ] || error "bad stripe count"
[ $($LFS getstripe -S $dom) == 1048576 ] || error "bad stripe size"
[ $($LFS getstripe -c $dom) == 0 ] || error "bad stripe count"
[ $($LFS getstripe -S $dom) == 1048576 ] || error "bad stripe size"
- local mdtidx=$($GETSTRIPE -M $dom)
+ local mdtidx=$($LFS getstripe -m $dom)
local mdtname=MDT$(printf %04x $mdtidx)
local facet=mds$((mdtidx + 1))
local space_check=1
local mdtname=MDT$(printf %04x $mdtidx)
local facet=mds$((mdtidx + 1))
local space_check=1
$LFS setstripe -E 1024K -L mdt $DIR/$tdir
$LFS setstripe -E 1024K -L mdt $DIR/$tdir
- local mdtidx=$($LFS getstripe -M $DIR/$tdir)
+ local mdtidx=$($LFS getstripe -m $DIR/$tdir)
local facet=mds$((mdtidx + 1))
cancel_lru_locks mdc
local facet=mds$((mdtidx + 1))
cancel_lru_locks mdc
error "create 10 files failed"
for file in $(find $DIR/$tdir); do
error "create 10 files failed"
for file in $(find $DIR/$tdir); do
- stripe_count=$($GETSTRIPE -c $file)
+ stripe_count=$($LFS getstripe -c $file)
[ $stripe_count -eq 2 ] ||
error "wrong stripe $stripe_count for $file"
done
[ $stripe_count -eq 2 ] ||
error "wrong stripe $stripe_count for $file"
done
error "setfattr -n trusted.name1=value1 $DIR/$tdir failed"
#define OBD_FAIL_MDS_INTENT_DELAY 0x160
error "setfattr -n trusted.name1=value1 $DIR/$tdir failed"
#define OBD_FAIL_MDS_INTENT_DELAY 0x160
- local mdtidx=$($LFS getstripe -M $DIR/$tdir)
+ local mdtidx=$($LFS getstripe -m $DIR/$tdir)
local facet=mds$((mdtidx + 1))
stat $DIR/$tdir
set_nodes_failloc $(facet_active_host $facet) 0x80000160
local facet=mds$((mdtidx + 1))
stat $DIR/$tdir
set_nodes_failloc $(facet_active_host $facet) 0x80000160
echo "Finish migration, then checking.."
for file in $(find $DIR1/$tdir); do
echo "Finish migration, then checking.."
for file in $(find $DIR1/$tdir); do
- mdt_index=$($LFS getstripe -M $file)
+ mdt_index=$($LFS getstripe -m $file)
[ $mdt_index == $MDTIDX ] ||
error "$file is not on MDT${MDTIDX}"
done
[ $mdt_index == $MDTIDX ] ||
error "$file is not on MDT${MDTIDX}"
done