Red Hat SATELLITE 5.3.0 RELEASE NOTES Información técnica Pagina 44

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 199
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 43
if [[ $NUM -gt 0 ]]
then
echo "Aliases for this host already exists!"
else
cd /sys/class/fc_host
for f in host*
do
WWN=`cat ${f}/port_name | cut -f 2 -d 'x'`
sacommand --saurl //${MSA_USER}:${MSA_PW}@${MSA_IP} set host-name id ${WWN}
${SHORTHOST}_${f}
done
fi
fi
b) The second script, buildMpathAliases.sh, also called by the storage preparation
script, searches the multipath devices and assembles a portion of the multipath
configuration file that provides aliases for fibre channel devices.
#!/bin/bash
# This script will talk to the specified array and retrieve all existing volume and use
# the name of the volume to create an appropriate multipaths stanza
# developed to work with MSA2000s, unsure if any others would work
# usage: ./buildMpathAliases.sh <storage_array_name>
# 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
#check that an argument was passed
if [ $# -ne 1 ] ; then
echo "usage: buildMpathAliases.sh <storage_array_name>"
exit 1
fi
array=$1
#grab the WWN for all the local disks
for i in `awk '/sd/ {print $4}' /proc/partitions` ; do
echo "`scsi_id -g -u -s /block/$i`" >> /tmp/devs1
done
sort -u /tmp/devs1 > /tmp/devs2
www.redhat.com 44
Vista de pagina 43
1 2 ... 39 40 41 42 43 44 45 46 47 48 49 ... 198 199

Comentarios a estos manuales

Sin comentarios