Enabling failed SAN-paths in Solaris.

Failed SAN-paths are deactivated (disabled) by Veritas Dynamic Multipathing, and must be activated manually, if it's not done automatically (enabled).

List the SAN-paths:
bash-3.00$ sudo vxdmpadm listenclosure all
ENCLR_NAME ENCLR_TYPE ENCLR_SNO STATUS ARRAY_TYPE LUN_COUNT
===================================================================================
disk Disk DISKS CONNECTED Disk 6
1143 EMC 000290101143 CONNECTED A/A 44
1257 EMC 000290101257 CONNECTED A/A 44

bash-3.00$ sudo vxdmpadm getdmpnode enclosure=1143 | head -10
NAME STATE ENCLR-TYPE PATHS ENBL DSBL ENCLR-NAME
==============================================================================
c2t5006048452A5E5C3d0s2 ENABLED EMC 16 16 0 1143
c2t5006048452A5E5C3d1s2 ENABLED EMC 16 16 0 1143
c2t5006048452A5E5C3d2s2 ENABLED EMC 16 16 0 1143
c2t5006048452A5E5C3d3s2 ENABLED EMC 16 16 0 1143
c2t5006048452A5E5C3d4s2 ENABLED EMC 16 16 0 1143
c2t5006048452A5E5C3d5s2 ENABLED EMC 16 16 0 1143
c2t5006048452A5E5C3d6s2 ENABLED EMC 16 16 0 1143
c2t5006048452A5E5C3d7s2 ENABLED EMC 16 16 0 1143

bash-3.00$ sudo vxdmpadm getdmpnode enclosure=1257 | head -10
NAME STATE ENCLR-TYPE PATHS ENBL DSBL ENCLR-NAME
==============================================================================
c2t5006048452A60243d0s2 ENABLED EMC 16 16 0 1257
c2t5006048452A60243d1s2 ENABLED EMC 16 16 0 1257
c2t5006048452A60243d2s2 ENABLED EMC 16 16 0 1257
c2t5006048452A60243d3s2 ENABLED EMC 16 16 0 1257
c2t5006048452A60243d4s2 ENABLED EMC 16 16 0 1257
c2t5006048452A60243d5s2 ENABLED EMC 16 16 0 1257
c2t5006048452A60243d6s2 ENABLED EMC 16 16 0 1257
c2t5006048452A60243d7s2 ENABLED EMC 16 16 0 1257

This example shows that the LUNs on the host have 16 paths. All paths are available.

The Veritas command to enable disabled SAN-paths:

/sbin/vxdmpadm enable path=

Script:
See remarks in the code.
#!/bin/bash

#
# enable disabled EMC devices
#

let failed=0
let number=0
let perctlr 0

for ctlr in $(/sbin/vxdmpadm listctlr all | grep EMC | awk '{ print $1 }' | sort | uniq )
do
echo "! getsubpath ctlr=$ctlr"
let perctlr=0
for subpath in $(/sbin/vxdmpadm getsubpaths ctlr=$ctlr | grep -i disabled | awk '{ print $1 }')
do

echo -e "! Now enabling disabled subpath $subpath: rc=\c"
/sbin/vxdmpadm enable path=$subpath
rc=$?
echo "${rc}."
if [ $rc -ne 0 ]; then let failed=failed+1 ; fi
let number=number+1
let perctlr=perctlr+1
done
echo "-> $perctlr subpaths to enable for ctlr=${ctlr}."
done

echo "= $number disabled subpath to enable, $failed failed to enable."
echo "Bye."

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s