# on the MDS servers which is tested with wait_osp_* below.
# For ost_server_uuid that only exist on client so filtering
# is safe.
- local PROC_ACT="osc.$FSNAME-OST0001-osc-[^M]*.active"
- local PROC_UUID="osc.$FSNAME-OST0001-osc-[^M]*.ost_server_uuid"
+ local PROC_ACT="os[cp].$FSNAME-OST0001-osc-[^M]*.active"
+ local PROC_UUID="os[cp].$FSNAME-OST0001-osc-[^M]*.ost_server_uuid"
ACTV=$($LCTL get_param -n $PROC_ACT)
DEAC=$((1 - $ACTV))
local OSTNAME=$(ostname_from_index 0)
local mdtosc_proc1=$(get_mdtosc_proc_path mds1 $OSTNAME)
local last_id=$(do_facet mds1 $LCTL get_param -n \
- osc.$mdtosc_proc1.prealloc_last_id)
+ osp.$mdtosc_proc1.prealloc_last_id)
# Want to have OST LAST_ID over 5 * OST_MAX_PRECREATE to
# verify that the LAST_ID recovery is working properly. If
# Collect debug information - start of test
do_nodes $(comma_list $(mdts_nodes)) \
- $LCTL get_param osc.*.prealloc_*_id
+ $LCTL get_param osp.*.prealloc_*_id
mount_client $MOUNT || error "mount client $MOUNT failed"
wait_osts_up
mkdir $DIR/$tdir || error "mkdir $DIR/$tdir failed"
stack_trap "do_nodes $(comma_list $(mdts_nodes)) \
- $LCTL get_param osc.*.prealloc_*_id" EXIT
+ $LCTL get_param osp.*.prealloc_*_id" EXIT
# 1. If the file does not exist, new file will be created
# with specified OSTs.
at_start || return 0
CONN1=$(lctl get_param -n osc.*.stats | awk '/_connect/ {total+=$2} END {print total}')
- # exhaust precreations on ost1
- local OST=$(ostname_from_index 0)
- local mdtosc=$(get_mdtosc_proc_path mds $OST)
- local last_id=$(do_facet $SINGLEMDS lctl get_param -n \
- osc.$mdtosc.prealloc_last_id)
- local next_id=$(do_facet $SINGLEMDS lctl get_param -n \
- osc.$mdtosc.prealloc_next_id)
+ # exhaust precreations on ost1
+ local OST=$(ostname_from_index 0)
+ local mdtosc=$(get_mdtosc_proc_path mds $OST)
+ local last_id=$(do_facet $SINGLEMDS lctl get_param -n \
+ osp.$mdtosc.prealloc_last_id)
+ local next_id=$(do_facet $SINGLEMDS lctl get_param -n \
+ osp.$mdtosc.prealloc_next_id)
mkdir -p $DIR/$tdir/${OST} || error "mkdir $DIR/$tdir/${OST} failed"
$SETSTRIPE -i 0 -c 1 $DIR/$tdir/${OST} || error "$SETSTRIPE failed"
replay_barrier ost1
replay_barrier $SINGLEMDS
- # exhaust precreations on ost1
- local OST=$(ostname_from_index 0)
- local mdtosc=$(get_mdtosc_proc_path $SINGLEMDS $OST)
- local last_id=$(do_facet $SINGLEMDS lctl get_param -n osc.$mdtosc.prealloc_last_id)
- local next_id=$(do_facet $SINGLEMDS lctl get_param -n osc.$mdtosc.prealloc_next_id)
+ # exhaust precreations on ost1
+ local OST=$(ostname_from_index 0)
+ local mdtosc=$(get_mdtosc_proc_path $SINGLEMDS $OST)
+ local last_id=$(do_facet $SINGLEMDS lctl get_param -n osp.$mdtosc.prealloc_last_id)
+ local next_id=$(do_facet $SINGLEMDS lctl get_param -n osp.$mdtosc.prealloc_next_id)
echo "before test: last_id = $last_id, next_id = $next_id"
echo "Creating to objid $last_id on ost $OST..."
createmany -o $DIR/$tdir/f-%d $last_id 8 ||
error "createmany create files with uncommitted objids failed"
- last_id2=$(do_facet $SINGLEMDS lctl get_param -n osc.$mdtosc.prealloc_last_id)
- next_id2=$(do_facet $SINGLEMDS lctl get_param -n osc.$mdtosc.prealloc_next_id)
+ last_id2=$(do_facet $SINGLEMDS lctl get_param -n osp.$mdtosc.prealloc_last_id)
+ next_id2=$(do_facet $SINGLEMDS lctl get_param -n osp.$mdtosc.prealloc_next_id)
echo "before recovery: last_id = $last_id2, next_id = $next_id2"
# if test uses shutdown_facet && reboot_facet instead of facet_failover ()
clients_up
- last_id2=$(do_facet $SINGLEMDS lctl get_param -n osc.$mdtosc.prealloc_last_id)
- next_id2=$(do_facet $SINGLEMDS lctl get_param -n osc.$mdtosc.prealloc_next_id)
+ last_id2=$(do_facet $SINGLEMDS lctl get_param -n osp.$mdtosc.prealloc_last_id)
+ next_id2=$(do_facet $SINGLEMDS lctl get_param -n osp.$mdtosc.prealloc_next_id)
echo "after recovery: last_id = $last_id2, next_id = $next_id2"
# create new files, which should use new objids, and ensure the orphan
run_test 27m "create file while OST0 was full"
sleep_maxage() {
- local delay=$(do_facet $SINGLEMDS lctl get_param -n lov.*.qos_maxage |
+ local delay=$(do_facet $SINGLEMDS lctl get_param -n lo[vd].*.qos_maxage |
awk '{ print $1 * 2; exit; }')
sleep $delay
}
# on the mdt's osc
local mdtosc_proc1=$(get_mdtosc_proc_path $mfacet $OST)
local last_id=$(do_facet $mfacet lctl get_param -n \
- osc.$mdtosc_proc1.prealloc_last_id)
+ osp.$mdtosc_proc1.prealloc_last_id)
local next_id=$(do_facet $mfacet lctl get_param -n \
- osc.$mdtosc_proc1.prealloc_next_id)
+ osp.$mdtosc_proc1.prealloc_next_id)
local mdtosc_proc2=$(get_mdtosc_proc_path $mfacet)
- do_facet $mfacet lctl get_param osc.$mdtosc_proc2.prealloc*
+ do_facet $mfacet lctl get_param osp.$mdtosc_proc2.prealloc*
test_mkdir -p $DIR/$tdir/${OST}
$SETSTRIPE -i $OSTIDX -c 1 $DIR/$tdir/${OST}
do_facet $ofacet lctl set_param fail_val=$FAILIDX fail_loc=0x215
echo "Creating to objid $last_id on ost $OST..."
createmany -o $DIR/$tdir/${OST}/f $next_id $((last_id - next_id + 2))
- do_facet $mfacet lctl get_param osc.$mdtosc_proc2.prealloc*
+ do_facet $mfacet lctl get_param osp.$mdtosc_proc2.prealloc*
do_facet $ofacet lctl set_param fail_loc=$FAILLOC
sleep_maxage
}
local mdtosc=$(get_mdtosc_proc_path $SINGLEMDS $FSNAME-OST0000)
local last_id=$(do_facet $SINGLEMDS lctl get_param -n \
- osc.$mdtosc.prealloc_last_id)
+ osp.$mdtosc.prealloc_last_id)
local next_id=$(do_facet $SINGLEMDS lctl get_param -n \
- osc.$mdtosc.prealloc_next_id)
+ osp.$mdtosc.prealloc_next_id)
local fcount=$((last_id - next_id))
[[ $fcount -eq 0 ]] && skip "not enough space on OST0"
[[ $fcount -gt $OSTCOUNT ]] && fcount=$OSTCOUNT
local mdtosc=$(get_mdtosc_proc_path $SINGLEMDS)
local value
for value in $(do_facet $SINGLEMDS \
- $LCTL get_param osc.$mdtosc.prealloc_last_id) ; do
+ $LCTL get_param osp.$mdtosc.prealloc_last_id) ; do
param=$(echo ${value[0]} | cut -d "=" -f1)
ostname=$(echo $param | cut -d "." -f2 | cut -d - -f 1-2)
remote_mds_nodsh && skip "remote MDS with nodsh"
echo -n "Free space priority "
- do_facet $SINGLEMDS lctl get_param -n lo*.*-mdtlov.qos_prio_free |
+ do_facet $SINGLEMDS lctl get_param -n lo[vd].*-mdtlov.qos_prio_free |
head -n1
declare -a AVAIL
free_min_max
#define OBD_FAIL_MDS_OSC_CREATE_FAIL 0x147
local old_rr=$(do_facet $SINGLEMDS lctl get_param -n \
- lo*.$FSNAME-MDT0000-mdtlov.qos_threshold_rr | head -1)
+ lo[vd].$FSNAME-MDT0000-mdtlov.qos_threshold_rr | head -1)
[ -z "$old_rr" ] && skip "no QOS"
do_facet $SINGLEMDS lctl set_param \
- lo*.$FSNAME-MDT0000-mdtlov.qos_threshold_rr=0
+ lo[vd].$FSNAME-MDT0000-mdtlov.qos_threshold_rr=0
mkdir -p $DIR/$tdir
do_facet $SINGLEMDS lctl set_param fail_loc=0x147
createmany -o $DIR/$tdir/f- 20 || error "can't create"
do_facet $SINGLEMDS lctl set_param fail_loc=0
rm -rf $DIR/$tdir
do_facet $SINGLEMDS lctl set_param \
- lo*.$FSNAME-MDT0000-mdtlov.qos_threshold_rr=$old_rr
+ lo[vd].$FSNAME-MDT0000-mdtlov.qos_threshold_rr=$old_rr
}
run_test 116b "QoS shouldn't LBUG if not enough OSTs found on the 2nd pass"
# on the mdt's osc
local mdtosc_proc1=$(get_mdtosc_proc_path $SINGLEMDS $OST)
local last_id=$(do_facet $SINGLEMDS lctl get_param -n \
- osc.$mdtosc_proc1.prealloc_last_id)
+ osp.$mdtosc_proc1.prealloc_last_id)
local next_id=$(do_facet $SINGLEMDS lctl get_param -n \
- osc.$mdtosc_proc1.prealloc_next_id)
+ osp.$mdtosc_proc1.prealloc_next_id)
$LFS df -i
createmany -o $DIR/$tdir/f $MDSOBJS || return 3
local last_id2=$(do_facet mds${MDSIDX} lctl get_param -n \
- osc.$mdtosc_proc1.prealloc_last_id)
+ osp.$mdtosc_proc1.prealloc_last_id)
local next_id2=$(do_facet mds${MDSIDX} lctl get_param -n \
- osc.$mdtosc_proc1.prealloc_next_id)
+ osp.$mdtosc_proc1.prealloc_next_id)
echo "after creation, last_id=$last_id2, next_id=$next_id2"
$LFS df -i
local ost_facet=$2
local expected=$3
local target=$(get_osc_import_name $facet $ost_facet)
- local param="osc.${target}.ost_server_uuid"
+ local param="os[cp].${target}.ost_server_uuid"
local params=$param
local i=0
mdtosc=$(get_mdtosc_proc_path mds$num)
mdtosc=${mdtosc/-MDT*/-MDT\*}
local output=$(do_facet mds$num lctl get_param -n \
- osc.$mdtosc.$PROC_CLI 2>/dev/null)
+ os[cp].$mdtosc.$PROC_CLI 2>/dev/null)
local tmpcnt=$(count_flvr "$output" $flavor)
if $GSS_SK && [ $flavor != "null" ]; then
# tmpcnt=min(contexts,flavors) to ensure SK context is on
output=$(do_facet mds$num lctl get_param -n \
- osc.$mdtosc.$PROC_CON 2>/dev/null)
+ os[cp].$mdtosc.$PROC_CON 2>/dev/null)
local outcon=$(count_contexts "$output")
if [ "$outcon" -lt "$tmpcnt" ]; then
tmpcnt=$outcon