496
IBM Midrange System Storage Hardware Guide
Example 8-8 Script to create and map a logical drives for AIX
#!/usr/bin/ksh
#
# ----------------------------------------------------------------------------
#
# Script: Create LUN on DS5000
# Purpose: Create several LUNs on DS5000 and allocate to a specific hostgroup.
# If error message is detected, script will terminate
#
# ----------------------------------------------------------------------------
set -x
#
DATE=`date '+%y%m%d'`
FCMD=/usr/SMclient/SMcli
IP="9.11.218.183 9.11.218.182"
PWDD=xxxxxxx
Create_LUN()
{
LUNNO=$7
$FCMD $IP -p $PWDD -c "create logicaldrive array=$2 userlabel=\"$1\" capacity=$3 GB
owner=$6 segmentsize=$4;"
error_chk $? Create_$1 quit
# Note we are attaching to a 'hostgroup', this can be changed to 'host' below
$FCMD $IP -p $PWDD -c "set logicaldrive [$1] logicalunitnumber=$7 hostgroup=\"$5\";"
error_chk $? Allocate_$1 quit
}
error_chk()
{
TIME=`date '+%T'`
if [ $1 -eq 0 ]
then
echo "Process $2 completed Successfully at $TIME"
else
echo "Warning process $2 completed with code $1 at $TIME "
if [ "$3" = "quit" ]
then
echo " ######################## ERROR
####################################\n"
echo "Process $2 terminating at $TIME"
echo " ######################## ERROR
####################################\n"
exit 1
fi
fi
}
# Passed variables used below
# LUN name=$1
# ARRAY name $2
# LUN size $3
# Segment size $4
# Host to map to $5
# Preferred Controlle a or b $6
# Host LUN number when mapped $7
Create_LUN AIX_A Data_FC 20 64 AIX_ITSO a 10
Содержание System Storage DS4000
Страница 2: ......
Страница 18: ...xvi IBM Midrange System Storage Hardware Guide...
Страница 40: ...22 IBM Midrange System Storage Hardware Guide...
Страница 302: ...284 IBM Midrange System Storage Hardware Guide...
Страница 344: ...326 IBM Midrange System Storage Hardware Guide...
Страница 372: ...354 IBM Midrange System Storage Hardware Guide Figure 7 25 Drive firmware Incompatible...
Страница 490: ...472 IBM Midrange System Storage Hardware Guide...
Страница 522: ...504 IBM Midrange System Storage Hardware Guide...
Страница 544: ...526 IBM Midrange System Storage Hardware Guide...
Страница 561: ...Index 543 Z zoning 129 130...
Страница 562: ...544 IBM Midrange System Storage Hardware Guide...
Страница 564: ...IBM Midrange System Storage Hardware Guide IBM Midrange System Storage Hardware Guide...
Страница 565: ......