The LCTL command "cfg_device" is obsolete and some operations
(such as "cleanup", "detach") don't support it anymore.
In mds_survey and lfsck-performance it causes the echo client
device not to be destroyed and causes LBUG when umounting the
related Lustre device.
Lustre-change: https://review.whamcloud.com/40227
Lustre-commit:
2e6342a7365825091d9c7b25418033c02ecfbb12
Change-Id: If7f6eff080906e395023289652fcd2a78dfb6fb7
Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/40227
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/45879
Tested-by: Maloo <maloo@whamcloud.com>
cleanup_netdisk () {
for osc in $@; do
$lctl <<-EOF
- cfg_device $osc
- cleanup
- detach
+ --device $osc cleanup
+ --device $osc detach
EOF
done
}
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
}
$lctl <<-EOF
attach echo_client ${osc_name}_ecc ${osc_name}_ecc_UUID
- cfg_device ${osc_name}_ecc
- setup $osc_name
+ --device ${osc_name}_ecc setup $osc_name
EOF
}
$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
+ --device $oscname setup echo_srv_UUID echo_UUID
EOF
$lctl <<-EOF
attach echo_client ${ocsname}_ecc $oscuuid
$lctl add_uuid ${host_name}_UUID $ost_nid@$NETTYPE >/dev/null 2>&1
$lctl <<-EOF
attach osc ${obdfilter_name}_osc ${obdfilter_name}_osc_UUID
- cfg_device ${obdfilter_name}_osc
- setup ${obdfilter_name}_UUID ${host_name}_UUID
+ --device ${obdfilter_name}_osc setup ${obdfilter_name}_UUID ${host_name}_UUID
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() {
$LCTL --device $tECHOID destroy "${tOBJID}:0"
$LCTL <<-EOF
- cfg_device ECHO_osc1
- cleanup
- detach
+ --device ECHO_osc1 cleanup
+ --device ECHO_osc1 detach
EOF
# reading of 1st stripe should pass
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"
}