
echo "Aliases for this host already exist!"
else
vcmcommand --vcmurl //${LOGIN}:${VCM_PW}@${VCM_IP} show profile ${PNAME} |
grep -A 6 "FC SAN Connections" | grep "[0-9]\+\\W\+[0-9]\+" | awk '{print $1 " " $6}' | while read
PORT WWN
do
# if storage see HBA set the nickname, otherwise create host entry
if [[ `sacommand --saurl //${MSA_USER}:${MSA_PW}@${MSA_IP} show hosts | grep $
{WWN//:}` ]]
then
sacommand --saurl //${MSA_USER}:${MSA_PW}@${MSA_IP} set host-name id $
{WWN//:} ${PNAME}_${PORT}
else
sacommand --saurl //${MSA_USER}:${MSA_PW}@${MSA_IP} create host id ${WWN//:}
${PNAME}_${PORT}
fi
done
fi
#Present the RHEVStorage1 storage volumes to each HBA in host
for f in `sacommand --saurl //${MSA_USER}:${MSA_PW}@${MSA_IP} show hosts | grep $
{PNAME}_ | awk '{print $2}'`
do
sacommand --saurl //${MSA_USER}:${MSA_PW}@${MSA_IP} map volume
msa20_RHEVStorage1 access rw ports a1,a2 lun 4 host ${f}
done
c) GetAvailNFSClient.sh – output the next unique identifier for the NFS client tag in
the cluster configuration file
#!/bin/bash
# This script will provide the an available nfs-client idenitifier
# Source env vars
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
nfsClients=`riccicmd --ricciroot=/.ricci -H ${MGMT1_IP} cluster configuration | grep nfsclient |
grep name= | awk '{print $3}' | cut -f2 -d\" | sort -u`
if [[ ${nfsClients} ]]
then
www.redhat.com 114
Comentários a estes Manuais