Emulex / Luxadm

man ddi_log_sysevent
# emlxadm “SUNW,emlxs@2” get_num_devs
Information similar to the following is displayed:
Found path to 2 HBA port(s).
HBA port: /devices/pci@1e,600000/SUNW,emlxs@2/fp@0,0:devctl
> Do you wish to continue with this device [y,n,q] ? y <— Response required
There are 5 devices reported on this port.
HBA port: /devices/pci@1e,600000/SUNW,emlxs@2,1/fp@0,0:devctl
> Do you wish to continue with this device [y,n,q] ? y <— Response required
There are 0 devices reported on this port

==================================================
# emlxadm ———–> utility

hba —->Allows you to select another HBA to interface with. This prevents you from having to exit and reenter the program.
Example:
emlxadm> hba
Available HBA’s:
1. /devices/pci@1e,600000/SUNW,qlc@3/fp@0,0:devctl (CONNECTED)
2. /devices/pci@1e,600000/SUNW,qlc@3,1/fp@0,0:devctl (NOT CONNECTED)
3. /devices/pci@1e,600000/SUNW,emlxs@2/fp@0,0:devctl (CONNECTED)
4. /devices/pci@1e,600000/SUNW,emlxs@2,1/fp@0,0:devctl (NOT CONNECTED)
Enter an HBA number or zero to exit:

get_num_devs —-> Returns the number of FC devices currently seen by this HBA port.

get_dev_list —-> Returns a list of FC devices currently seen by this HBA port.

get_sym_pname —-> Returns the symbolic FC port name of the HBA port.

dev_login <wwpn> —-> Performs an FC login to an FC device on the network, if not already logged in.
Example:
emlxadm> dev_login 21000020371938fa ———> WWPN number Done

dev_logout <wwpn> —-> Performs an FC logout to an FC device on the network, if not already logged in.
Example:
emlxadm> dev_logout 21000020371938fa
Done.

get_state <wwpn> —-> Returns the current Leadville state of the specified FC device on the network.
Example:
emlxadm> get_state 21000020371938fa
State: PORT_DEVICE_LOGGED_IN

dev_remove <wwpn> —-> Removes the specified FC device from Leadville management.

link_status <d_id> —->Requests and returns the current link error status from the FC device specified by the d_id address.
Example:
emlxadm> link_status e8
D_ID: e8
Link failures: 3 (0x3)
Loss of sync count: 12 (0xc)
Loss of signal count: 0 (0x0)
Primitive sequence errors: 0 (0x0)
Invalid tx words: 17 (0x11)
Invalid CRC count: 0 (0x0)

get_fcode_rev —-> Returns the current FCode revision of the HBA.
Example:
emlxadm> get_fcode_rev
FCODE revision: LP10000-S 1.41a3
get_host_attrs —-> Displays all of the current host HBA API attributes.
Example:
emlxadm> get_host_attrs
get_path <index> —–>Displays the current Solaris device path for a specified HBA port. The total number of ports available can be seen in the “Number of HBA ports” attribute displayed using the get_host_attrs command. The <index> argument is an index into this list.
Example:
emlxadm> get_path 0
Adapter: /pci@1e,600000/SUNW,emlxs@2/fp@0,0
emlxadm> get_path 1
Adapter: /pci@1e,600000/SUNW,emlxs@2,1/fp@0,0
========================================================
emlxdrv —-> utility
============================================================

LUXADM

luxadm remove_device /dev/rdsk/c0t1d0s2 ————-> unconfigure device

luxadm -e forcelip

http://docs.sun.com/app/docs/doc/805-1637/6j1jjulq9?l=en&a=view&q=forcelip

test this
luxadm -e forcelip /dev/cfg/c3
or
luxadm -e forcelip /devices/pci@if,700000/pci@0,2/SUNW,emlxs@1/fp@0,0:devctl

==============================================================================================================
root@ssdbsiiam001 # luxadm probe
Found Enclosure:
SUNWGS INT FCBPL Name:FCloop Node WWN:50800200001a0748 Logical Path:/dev/es/ses0

root@ssdbsiiam001 # luxadm display /dev/es/ses0

SUNWGS INT FCBPL
DISK STATUS
SLOT DISKS (Node WWN)
0 On (O.K.) 20000004cf3be799
1 On (O.K.) 20000004cfe5341e
2 On (O.K.) 20000004cf8f0f8d
3 On (O.K.) 20000004cf8f0f9e
4 On (O.K.) 20000004cf8f0095
5 On (SCSI Error) 20000004cf8f05f0
6 On (Login failed)
7 On (Login failed)
8 On (Login failed)
9 On (Login failed)
10 On (Login failed)
11 On (Login failed)
SUBSYSTEM STATUS
FW Revision:9226 Box ID:0
Node WWN:50800200001a0748 Enclosure Name:FCloop
SSC100’s – 0=Base Bkpln, 1=Base LoopB, 2=Exp Bkpln, 3=Exp LoopB
SSC100 #0: O.K.(9226/ FD99)
SSC100 #1: O.K.(9226/ FD99)
SSC100 #2: Not Installed
SSC100 #3: Not Installed
Temperature Sensors – 0 Base, 1 Expansion
0:20ºC
1Not Installed
Default Language is USA English, ASCII

after replacing the disk
=================
root@ssdbsiiam001 # luxadm display /dev/es/ses0

SUNWGS INT FCBPL
DISK STATUS
SLOT DISKS (Node WWN)
0 On (O.K.) 20000004cf3be799
1 On (O.K.) 20000004cfe5341e
2 On (O.K.) 20000004cf8f0f8d
3 On (O.K.) 20000004cf8f0f9e
4 On (O.K.) 20000004cf8f0095
5 On (O.K.) 20000004cf835401
6 On (Login failed)
7 On (Login failed)
8 On (Login failed)
9 On (Login failed)
10 On (Login failed)
11 On (Login failed)
SUBSYSTEM STATUS
FW Revision:9226 Box ID:0
Node WWN:50800200001a0748 Enclosure Name:FCloop
SSC100’s – 0=Base Bkpln, 1=Base LoopB, 2=Exp Bkpln, 3=Exp LoopB
SSC100 #0: O.K.(9226/ FD99)
SSC100 #1: O.K.(9226/ FD99)
SSC100 #2: Not Installed
SSC100 #3: Not Installed
Temperature Sensors – 0 Base, 1 Expansion
0:20ºC
1Not Installed
Default Language is USA English, ASCII

==============================================================================================================
luxadm -e offline /dev/rdsk/c3t49d0s2
devfsadm -C
echo | format | grep -i t49d0
vxdisk list
ls -ld /dev/dsk/c3t49d0*
devfsadm -C -c disk
ls -ld /dev/dsk/c3t49d0*
luxadm remove_device /dev/rdsk/c3t49d0s2
man devfsadm
vxdisk list
vxdisk list | grep -i c3t49d0
vxdmpadm getsubpaths ctlr=c3
vxdisk rm c3t49d0s2
vxdiskadm
vxdisk list
vxdmpadm getsubpaths ctlr=c3
luxadm remove_device /dev/rdsk/c7t49d0s2
vxconfigd -k
luxadm insert_device /dev/rdsk/c7t49d0s2
vxdmpadm getsubpaths ctlr=c3
luxadm insert_device VUS306-3,r01
cd /kernel/drv
ls -l lpfc.conf
more lpfc.conf
eco | format | grep c3t49
luxadm -e online /dev/rdsk/c7t49d0s2
echo | format | grep c3t49
cd sysconfig
diff ./sysconfig/drv/lpfc.conf /kernel/drv/lpfc.conf
cp -p /kernel/drv/lpfc.conf /kernel/drv/lpfc.conf.14Mar09
cp -p ./sysconfig/drv/lpfc.conf /kernel/drv/lpfc.conf
cd /usr/sbin
cd lpfc
./lputil
luxadm power_on /dev/rdsk/c7t49d0s2
cp -p /kernel/drv/lpfc.conf.14Mar09 /kernel/drv/lpfc.conf
vxdisk list
luxadm -e oline c5t48d0s2
luxadm -e online /dev/rdsk/c5t48d0s2
luxadm display /dev/rdsk/c5t48d0s2
echo | format | grep c3t49
vxdctl enable
luxadm probe
ps -ef | grep -i vX
format
top
vxdisk list
vxdisk list | grep -i c3t49
luxadmdisplay VUS306-3,r01
luxadm display VUS306-3,r1
luxadm display VUS306-3
vxdisk list
luxadm display VUS306-1
vxdisk list
vxdisk rm c3t49d0s2
vxdmpadm getsubpaths ctlr=c3
vxdmpadm getsubpaths ctlr=c7
ps -ef | grep -i lux
ptree 23457
kill -9 23457
luxadm display VUS306-1
ps -ef | grep -i lux
kill -9 23457 24936
sudo ksh -o vi
kill -9 23457 24936
ps -ef | grep -i lux
luxadm probe -p /dev/rdsk/c3t49d0s2
luxadm probe -v /dev/rdsk/c3t49d0s2
luxadm probe -v
luxadm -v probe
luxadm -e bus_quiesce /dev/rdsk/c3t49d0s2
luxadm -e offline /dev/rdsk/c7t49d0s2
luxadm -e offline /dev/rdsk/c3t49d0s2
fuser /dev/rdsk/c7t49d0s2
ps -ef | grep -i 6732
ptree 6732
kill -9 6732
luxadm -e bus_quiesce /dev/rdsk/c7t49d0s2
luxadm -e bus_quiesce /dev/rdsk/c3t49d0s2
vxdisk list | grep -i c3t49d0
vxdisk rm c3t49d0s2
vxdisk list | grep -i c3t49d0
vxdmpadm getsubpaths ctlr=c7
vxdmpadm getsubpaths ctlr=c3
luxadm -e bus_unquiesce /dev/rdsk/c3t49d0s2
luxadm -e online /dev/rdsk/c3t49d0s2
luxadm -e release /dev/rdsk/c3t49d0s2
luxadm -e release /dev/rdsk/c3t49d0s2
luxadm release /dev/rdsk/c3t49d0s2
luxadm inser_device /dev/rdsk/c3t49d0s2
luxadm insert_device -F /dev/rdsk/c3t49d0s2
devfsadm -v
vxdisk list
echo | format | grep -i c3t49d0
¢nslookup nuh420
nslookup vuh602
telnet vuh602.telecom.com.au
telnet vuh602.telecom.com.au
kstat -p|grep -i ce4|grep -i link
465 ifconfig ce4 plumb
466 ifconfig -a
467 ifconfig ce4 `cat /etc/hostname.ce4` up