Sunday 5 March 2017

luxadm. cheat sheet

luxadm. cheat sheet

Display port state

# luxadm -e port
/devices/pci@700/pci@0/pci@c/SUNW,emlxs@0,1/fp@0,0:devctl CONNECTED
/devices/pci@400/pci@0/pci@d/SUNW,emlxs@0,1/fp@0,0:devctl CONNECTED
/devices/pci@600/pci@0/pci@c/SUNW,emlxs@0,1/fp@0,0:devctl NOT CONNECTED
/devices/pci@500/pci@0/pci@d/SUNW,emlxs@0/fp@0,0:devctl NOT CONNECTED

Dump devices connected to port

# luxadm -e dump_map /devices/pci@400/pci@1/pci@0/pci@0/SUNW,emlxs@0/fp@0,0:devctl
Pos Port_ID Hard_Addr Port WWN Node WWN Type
0 97f4c0 0 204300a0b848a702 200200a0b848a702 0x0 (Disk device)
1 97f680 0 10000000c9b1f51c 20000000c9b1f51c 0x1f (Unknown Type,Host Bus Adapter)
# luxadm -e dump_map /dev/cfg/c6
Pos Port_ID Hard_Addr Port WWN Node WWN Type
0 97f4c0 0 204300a0b848a702 200200a0b848a702 0x0 (Disk device)
1 97f680 0 10000000c9b1f51c 20000000c9b1f51c 0x1f (Unknown Type,Host Bus Adapter)

List disks

# luxadm probe -p
No Network Array enclosures found in /dev/es
Found Fibre Channel device(s):
Node WWN:206000c0ff0067d9 Device Type:Disk device
Logical Path:/dev/rdsk/c14t600C0FF0000000000067D96B373B6600d0s2
Physical Path:
/devices/scsi_vhci/ssd@g600c0ff0000000000067d96b373b6600:c,raw
Node WWN:206000c0ff0067d9 Device Type:Disk device
Logical Path:/dev/rdsk/c14t600C0FF0000000000067D96B373B6601d0s2
Physical Path:
/devices/scsi_vhci/ssd@g600c0ff0000000000067d96b373b6601:c,raw
Node WWN:206000c0ff0067d9 Device Type:Disk device
Logical Path:/dev/rdsk/c14t600C0FF0000000000067D96B373B6602d0s2
Physical Path:
/devices/scsi_vhci/ssd@g600c0ff0000000000067d96b373b6602:c,raw

Show disk info

# luxadm display /dev/rdsk/c14t60060E8004F236000000F23600000A00d0s2
DEVICE PROPERTIES for disk: /dev/rdsk/c14t60060E8004F236000000F23600000A00d0s2
Vendor: HITACHI
Product ID: OPEN-V -SUN
Revision: 5009
Serial Num: 50 0F2360A00
Unformatted capacity: 34091.250 MBytes
Write Cache: Enabled
Read Cache: Enabled
Minimum prefetch: 0x0
Maximum prefetch: 0x0
Device Type: Disk device
Path(s):
/dev/rdsk/c14t60060E8004F236000000F23600000A00d0s2
/devices/scsi_vhci/ssd@g60060e8004f236000000f23600000a00:c,raw
Controller /devices/pci@400/pci@0/pci@c/SUNW,emlxs@0,1/fp@0,0
Device Address 50060e8004f23674,4
Host controller port WWN 10000000c98b08d3
Class primary
State ONLINE
Controller /devices/pci@400/pci@0/pci@c/SUNW,emlxs@0,1/fp@0,0
Device Address 50060e8004f23676,4
Host controller port WWN 10000000c98b08d3
Class primary
State ONLINE
Controller /devices/pci@400/pci@0/pci@c/SUNW,emlxs@0/fp@0,0
Device Address 50060e8004f23664,4
Host controller port WWN 10000000c98b08d2
Class primary
State ONLINE
Controller /devices/pci@400/pci@0/pci@c/SUNW,emlxs@0/fp@0,0
Device Address 50060e8004f23666,4
Host controller port WWN 10000000c98b08d2
Class primary
State ONLINE

Inquire device

# luxadm inquiry/dev/rdsk/c14t600C0FF00000000009208424A938CA00d0s2
INQUIRY:
Physical Path:
/devices/scsi_vhci/ssd@g600c0ff00000000009208424a938ca00:c,raw
Vendor: SUN
Product: StorEdge 3511
Revision: 421F
Serial Number 09208424A938CA00
Device type: 0x0 (Disk device)
Removable media: no
Medium Changer Element: no
ISO version: 0
ECMA version: 0
ANSI version: 3 (Device complies to SCSI-3)
Terminate task: no
Response data format: 2
Additional length: 0xf7
Command queueing: no
VENDOR-SPECIFIC PARAMETERS
Byte# Hex Value ASCII
52 00 00 00 00 ....
96 43 6f 70 79 72 69 67 68 74 20 28 43 29 20 31 39 Copyright (C) 19
39 39 20 49 6e 66 6f 72 74 72 65 6e 64 2e 20 41 99 Infortrend. A
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 ............

Display tape information

# luxadm -v display /dev/rmt/3
Displaying information for: /dev/rmt/3
DEVICE PROPERTIES for tape: /dev/rmt/3
Vendor: ARCHIVE
Product ID: Python
Revision: V000
Serial Num: Unsupported
Device Type: Tape device
Path(s):
/dev/rmt/3n
/devices/pci@700/pci@0/pci@c/SUNW,emlxs@0,1/fp@0,0/st@w2101001b3232ef61,0:n
LUN path port WWN: 2101001b3232ef61
Host controller port WWN: 10000000c98b07d5
Path status: Not Ready

Display disk information

# luxadm display 226000c0ff992084
DEVICE PROPERTIES for disk: 226000c0ff992084
Vendor: SUN
Product ID: StorEdge 3511
Revision: 421F
Serial Num: 09208424A938CA00
Unformatted capacity: 956000.000 MBytes
Write Cache: Enabled
Read Cache: Enabled
Minimum prefetch: 0x0
Maximum prefetch: 0xffff
Device Type: Disk device
Path(s):
/dev/rdsk/c14t600C0FF00000000009208424A938CA00d0s2
/devices/scsi_vhci/ssd@g600c0ff00000000009208424a938ca00:c,raw
Controller /devices/pci@700/pci@0/pci@c/SUNW,emlxs@0,1/fp@0,0
Device Address 226000c0ff992084,0
Host controller port WWN 10000000c98b07d5
Class primary
State ONLINE
Controller /devices/pci@700/pci@0/pci@c/SUNW,emlxs@0/fp@0,0
Device Address 216000c0ff892084,0
Host controller port WWN 10000000c98b07d4
Class primary
State ONLINE
DEVICE PROPERTIES for disk: 226000c0ff992084
Vendor: SUN
Product ID: StorEdge 3511
Revision: 421F
Serial Num: 09208424A938CA01
Unformatted capacity: 956000.000 MBytes
Write Cache: Enabled
Read Cache: Enabled
Minimum prefetch: 0x0
Maximum prefetch: 0xffff
Device Type: Disk device
Path(s):

List hba && firmware version

# luxadm fcode_download -p
Found Path to 0 FC100/S Cards
Complete
Found Path to 0 FC100/P, ISP2200, ISP23xx Devices
Complete
Found Path to 0 JNI1560 Devices.
Complete
Found Path to 12 Emulex Devices.
Opening Device: /devices/pci@400/pci@0/pci@c/SUNW,emlxs@0/fp@0,0:devctl
Detected FCode Version: 3.01a1
Opening Device: /devices/pci@400/pci@0/pci@c/SUNW,emlxs@0,1/fp@0,0:devctl
Detected FCode Version: 3.01a1
Opening Device: /devices/pci@400/pci@0/pci@d/SUNW,emlxs@0/fp@0,0:devctl
Detected FCode Version: 3.01a1

FC Error stats

# luxadm -e rdls/dev/cfg/c3
Link Error Status information for loop:
al_pa lnk fail sync loss signal loss sequence err invalid word CRC
712100 1 0 0 0 293 0
713600 0 0 0 0 255 0
713700 1 0 0 0 255 0
713b00 0 0 0 0 255 0
8c0000 0 1 0 0 3 0
NOTE: These LESB counts are not cleared by a reset, only power cycles.
These counts must be compared to previously read counts.

FC device state

# luxadm -e bus_getstate/dev/rdsk/c14t60060E8004F236000000F23600000300d0s2
/dev/rdsk/c14t60060E8004F236000000F23600000300d0s2: Active
# for i in /dev/rdsk/c14*s2 ; do luxadm -e bus_getstate $i; done
/dev/rdsk/c14t60060E8004F236000000F23600000300d0s2: Active
Error: Invalid pathname (/devices/scsi_vhci/ssd@g60060e80153438000001343800000501:c,raw)
Error: Invalid pathname (/devices/scsi_vhci/ssd@g60060e80153438000001343800000502:c,raw)

Failover path

# luxadm failover secondary /dev/rdsk/c14t6d0s2
Error: Device does not support failover
# luxadm failover primary /dev/rdsk/c14t6d0s2
Error: Device does not support failover

LIP port

# luxadm -e forcelip /dev/cfg/c3
# tail -100 /var/adm/messages
Oct 26 17:32:22 pioneer emlxs: [ID 349649 kern.info] [ 5.05F1]emlxs1: NOTICE: 730: Link reset. (Resetting link...)
Oct 26 17:32:22 pioneer emlxs: [ID 349649 kern.info] [ 5.031F]emlxs1: NOTICE: 710: Link down.
Oct 26 17:32:22 pioneer emlxs: [ID 349649 kern.info] [ 5.0631]emlxs1: NOTICE: 730: Link reset.
Oct 26 17:32:24 pioneer emlxs: [ID 349649 kern.info] [ 5.0549]emlxs1: NOTICE: 720: Link up. (4Gb, fabric, initiator)

Offline/Online/Reset device

# luxadm -e offline /dev/rdsk/c14t6d0s2

# luxadm -e online /dev/rdsk/c14t6d0s2

# luxadm -e dev_reset /dev/rdsk/c14t6d0s2

Led ON/OFF

# luxadm led /dev/rdsk/c14t6d0s2
# luxadm led_on /dev/rdsk/c14t6d0s2
# luxadm led_off /dev/rdsk/c14t6d0s2
# luxadm led_blink /dev/rdsk/c14t6d0s2

Update firmware

# luxadm fcode_download -d /path_to_firmware

No comments:

Post a Comment