
nfsClient=`riccicmd -H ${MGMT1_IP} cluster configuration | grep ${host} |cut -d\" -f4`
if [[ $? -ne 0 ]]
then
echo "Cluster resource not found for ${host}!"
exit -3
fi
delnfsexport --ricciroot=/.ricci -H ${MGMT1_IP} rhev-nfs-fs ${nfsClient}
# Unpresent storage to removed host and delete host HBAs
echo -e "\nUnpresenting storage to removed host ${hostFQDN} ...\n"
/root/resources/rem_stor_host.sh ${host}
# Remove Satellite registration
/root/resources/wipeSatReg.py ${hostFQDN}
nblade=`vcmcommand --vcmurl //${LOGIN}:${VCM_PW}@${VCM_IP} show server | grep ${host} | awk
'{print $3}'`
iloIP=`oacommand --oaurl //${LOGIN}:${OA_PW}@${OA_IP} show server info ${nblade} | grep "IP
Address" | awk '{print $3}'`
ilocommand -i //${LOGIN}:${ILO_PW}@${iloIP} power off
• rem_stor_host.sh is called from within remHost.sh and unmaps any storage volumes
previously mapped to the host
rem_stor_host.sh
#!/bin/bash
# This script requires a host (hypervisor) name as a passed parameter.
# It will unmap any volumes previously mapped to the host
#source variables
if [[ -x varDefs.sh ]]
then
source varDefs.sh
elif [[ -x /root/varDefs.sh ]]
then
source /root/varDefs.sh
elif [[ -x /root/resources/varDefs.sh ]]
then
source /root/resources/varDefs.sh
elif [[ -x /root/distro/resources/varDefs.sh ]]
then
source /root/distro/resources/varDefs.sh
else
echo "didn't find a varDefs.sh file"
fi
# Confirm that a host name was passed
if [[ $# -ne 1 ]]
then
www.redhat.com 132
Comentarios a estos manuales