IBM Midrange System DS4000 Series Hardware Manual page 514

Midrange system storage ds4000/ds5000 series
Hide thumbs Also See for Midrange System DS4000 Series:
Table of Contents

Advertisement

Example 8-8 Script to create and map a logical drives for AIX
#!/usr/bin/ksh
#
# ----------------------------------------------------------------------------
#
# Script:
# Purpose:
#
#
# ----------------------------------------------------------------------------
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 ]
####################################\n"
####################################\n"
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
496
IBM Midrange System Storage Hardware Guide
Create LUN on DS5000
Create several LUNs on DS5000 and allocate to a specific hostgroup.
If error message is detected, script will terminate
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
echo "Process $2 terminating at $TIME"
echo " ######################## ERROR
exit 1
fi

Advertisement

Table of Contents
loading

Table of Contents