local clean_srv_OSS=$1
$lctl <<-EOF
- cfg_device echotmp
- cleanup
- detach
+ --device echotmp cleanup
+ --device echotmp detach
EOF
remote_shell "root@$server_nid" \
"$lctl <<-EOF
- cfg_device echo_srv
- cleanup
- detach
+ --device echo_srv cleanup
+ --device echo_srv detach
EOF"
if [ $clean_srv_OSS ]; then
remote_shell "root@$server_nid" \
"$lctl <<-EOF
- cfg_device OSS
- cleanup
- detach
+ --device OSS cleanup
+ --device OSS detach
EOF"
fi
}
# create echo client using server nid.
ec_using_srv_nid () {
local server_nid=$1
- local ocsname=$2
+ local oscname=$2
local oscuuid=$3
$lctl add_uuid echo_UUID $server_nid@$NETTYPE >/dev/null 2>&1
$lctl <<-EOF
- attach osc $ocsname $oscuuid
- cfg_device $ocsname
- setup echo_srv_UUID echo_UUID
+ attach osc $oscname $oscuuid
+ --device $oscname setup echo_srv_UUID echo_UUID
EOF
$lctl <<-EOF
- attach echo_client ${ocsname}_ecc $oscuuid
- setup $ocsname
+ attach echo_client ${oscname}_ecc $oscuuid
+ --device ${oscname}_ecc setup $oscname
EOF
}
remote_shell "root@$server_nid" \
"$lctl <<-EOF
attach obdecho $test_ostfsnm ${test_ostfsnm}_UUID
- cfg_device $test_ostfsnm
- setup
+ --device $test_ostfsnm setup
EOF"
}
remote_shell "root@$server_nid" \
"$lctl <<-EOF
attach ost OSS OSS_UUID
- cfg_device OSS
- setup
+ --device OSS setup
EOF"
}
remote_shell $host \
"$lctl <<-EOF
- cfg $client_name
- cleanup
- detach
+ --device $client_name cleanup
+ --device $client_name detach
EOF"
}
lfsck_detach() {
${ECHOCMD} "${LCTL} <<-EOF
- device lfsck-MDT0000
- cleanup
- detach
+ --device lfsck-MDT0000 cleanup
+ --device lfsck-MDT0000 detach
EOF"
}
local echodev=$(${RLCTL} dl | grep echo_client|awk '{print $1}')
local j
- ${ECHOCMD} "${LCTL} <<-EOF
- cfg_device ${echodev}
- test_mkdir ${tdir}
- EOF"
+ ${ECHOCMD} "${LCTL} --device ${echodev} test_mkdir ${tdir}"
for ((j = 1; j < ${threads}; j++)); do
- ${ECHOCMD} "${LCTL} <<-EOF
- cfg_device ${echodev}
- test_mkdir ${tdir}${j}
- EOF"
+ ${ECHOCMD} "${LCTL} --device ${echodev} test_mkdir ${tdir}${j}"
done
- ${ECHOCMD} "${LCTL} <<-EOF
- cfg_device ${echodev}
- --threads ${threads} 0 ${echodev} test_create \
- -d ${tdir} -D ${threads} -b ${lbase} -c 0 -n ${usize}
- EOF"
+ ${ECHOCMD} "${LCTL} --device ${echodev} \
+ --threads ${threads} 0 ${echodev} \
+ test_create -d${tdir} -D${threads} -b${lbase} -c0 -n${usize}"
}
lfsck_cleanup() {
attach llog_test llt_name llt_uuid
ignore_errors
setup $MGS
- device llt_name
- cleanup
- detach
+ --device llt_name cleanup
+ --device llt_name detach
EOF"
rmmod -v llog_test || RC2=3
[ $RC -eq 0 -a "$RC2" ] && RC=$RC2
scrub_detach() {
${ECHOCMD} "${LCTL} <<-EOF
- device scrub-MDT0000
- cleanup
- detach
+ --device scrub-MDT0000 cleanup
+ --device scrub-MDT0000 detach
EOF"
}
local echodev=$(${RLCTL} dl | grep echo_client|awk '{print $1}')
local j
- ${ECHOCMD} "${LCTL} <<-EOF
- cfg_device ${echodev}
- test_mkdir ${tdir}
- EOF"
+ ${ECHOCMD} "${LCTL} --device ${echodev} test_mkdir ${tdir}"
- for ((j=1; j<${threads}; j++)); do
- ${ECHOCMD} "${LCTL} <<-EOF
- cfg_device ${echodev}
- test_mkdir ${tdir}${j}
- EOF"
+ for ((j = 1; j < ${threads}; j++)); do
+ ${ECHOCMD} "${LCTL} --device ${echodev} test_mkdir ${tdir}${j}"
done
- ${ECHOCMD} "${LCTL} <<-EOF
- cfg_device ${echodev}
- --threads ${threads} 0 ${echodev} test_create \
- -d ${tdir} -D ${threads} -b ${lbase} -c 0 -n ${usize}
+ ${ECHOCMD} "${LCTL} --device ${echodev} \
+ --threads ${threads} 0 ${echodev} \
+ test_create -d${tdir} -D${threads} -b${lbase} -c0 -n${usize}"
EOF"
}