MDT0=$($LCTL get_param -n mdc.*.mds_server_uuid |
awk '{ gsub(/_UUID/,""); print $1 }' | head -n1)
-LOVNAME=$($LCTL get_param -n llite.*.lov.common_name | tail -n 1)
-OSTCOUNT=$($LCTL get_param -n lov.$LOVNAME.numobd)
-STRIPECOUNT=$($LCTL get_param -n lov.$LOVNAME.stripecount)
-STRIPESIZE=$($LCTL get_param -n lov.$LOVNAME.stripesize)
-ORIGFREE=$($LCTL get_param -n lov.$LOVNAME.kbytesavail)
MAXFREE=${MAXFREE:-$((200000 * $OSTCOUNT))}
[ -f $DIR/d52a/foo ] && chattr -a $DIR/d52a/foo
test_27m() {
[[ $OSTCOUNT -lt 2 ]] && skip_env "$OSTCOUNT < 2 OSTs -- skipping" &&
return
+
+ ORIGFREE=$($LCTL get_param -n lov.$FSNAME-clilov-*.kbytesavail |
+ head -n1)
if [[ $ORIGFREE -gt $MAXFREE ]]; then
skip "$ORIGFREE > $MAXFREE skipping out-of-space test on OST0"
return
local file_size=$((stripe_size * OSTCOUNT))
local file_num=$((NUMDIRS * NUMFILES + NUMFILES))
local required_space=$((file_num * file_size))
- local free_space=$($LCTL get_param -n lov.$LOVNAME.kbytesavail)
+
+ local free_space=$($LCTL get_param -n lov.$FSNAME-clilov-*.kbytesavail |
+ head -n1)
[[ $free_space -le $((required_space / 1024)) ]] &&
skip_env "need at least $required_space bytes free space," \
"have $free_space kbytes" && return
test_65b() {
[ $PARALLEL == "yes" ] && skip "skip parallel run" && return
test_mkdir -p $DIR/$tdir
+ local STRIPESIZE=$($GETSTRIPE -S $DIR/$tdir)
+
$SETSTRIPE -S $((STRIPESIZE * 2)) -i 0 -c 1 $DIR/$tdir ||
error "setstripe"
touch $DIR/$tdir/f2
$LVERIFY $DIR/$tdir $DIR/$tdir/f2 || error "lverify failed"
}
-run_test 65b "directory setstripe -S $((STRIPESIZE * 2)) -i 0 -c 1"
+run_test 65b "directory setstripe -S stripe_size*2 -i 0 -c 1"
test_65c() {
[ $PARALLEL == "yes" ] && skip "skip parallel run" && return
if [[ $OSTCOUNT -gt 1 ]]; then
test_mkdir -p $DIR/$tdir
+ local STRIPESIZE=$($GETSTRIPE -S $DIR/$tdir)
+
$SETSTRIPE -S $(($STRIPESIZE * 4)) -i 1 \
-c $(($OSTCOUNT - 1)) $DIR/$tdir || error "setstripe"
touch $DIR/$tdir/f3
$LVERIFY $DIR/$tdir $DIR/$tdir/f3 || error "lverify failed"
fi
}
-run_test 65c "directory setstripe -S $((STRIPESIZE*4)) -i 1 -c $((OSTCOUNT-1))"
+run_test 65c "directory setstripe -S stripe_size*4 -i 1 -c $((OSTCOUNT-1))"
test_65d() {
[ $PARALLEL == "yes" ] && skip "skip parallel run" && return
test_mkdir -p $DIR/$tdir
+ local STRIPECOUNT=$($GETSTRIPE -c $DIR/$tdir)
+ local STRIPESIZE=$($GETSTRIPE -S $DIR/$tdir)
+
if [[ $STRIPECOUNT -le 0 ]]; then
sc=1
elif [[ $STRIPECOUNT -gt 2000 ]]; then
$LVERIFY $DIR/$tdir $DIR/$tdir/f4 $DIR/$tdir/f5 ||
error "lverify failed"
}
-run_test 65d "directory setstripe -S $STRIPESIZE -c stripe_count"
+run_test 65d "directory setstripe -S stripe_size -c stripe_count"
test_65e() {
[ $PARALLEL == "yes" ] && skip "skip parallel run" && return
test_65g() {
[ $PARALLEL == "yes" ] && skip "skip parallel run" && return
test_mkdir -p $DIR/$tdir
+ local STRIPESIZE=$($GETSTRIPE -S $DIR/$tdir)
+
$SETSTRIPE -S $((STRIPESIZE * 2)) -i 0 -c 1 $DIR/$tdir ||
error "setstripe"
$SETSTRIPE -d $DIR/$tdir || error "setstripe"
test_65h() {
[ $PARALLEL == "yes" ] && skip "skip parallel run" && return
test_mkdir -p $DIR/$tdir
+ local STRIPESIZE=$($GETSTRIPE -S $DIR/$tdir)
+
$SETSTRIPE -S $((STRIPESIZE * 2)) -i 0 -c 1 $DIR/$tdir ||
error "setstripe"
test_mkdir -p $DIR/$tdir/dd1