Вы находитесь на странице: 1из 40

UNIX and Windows SAN HBA Commands

=============================================================================
How to load/view HBA and associated SAN software.
=============================================================================

DISCLAIMER: Some products (HBAs, software, OS) may not be covered.
Accuracy of document is not guaranteed. Please use as a guide and
tailor to your site and needs.

=============================================================================
TOC:
=============================================================================
AIX
AIX
list HBA
install HBA
configure HBA
install multipath s/w (if applicable)

HP-UX
HP-UX
list HBA
install HBA
configure HBA
install multipath s/w (if applicable)

Solaris
Solaris
list HBA
install HBA
configure HBA
install multipath s/w (if applicable)

Linux
Linux
list HBA
install HBA
configure HBA
install multipath s/w (if applicable)

Windows
Windows
list HBA
install HBA
configure HBA
install multipath s/w (if applicable)

Oracle
Oracle (ASM)

PowerPath
PowerPath commands

Vendor: Frame
Vendor: Storage Frame Commands

Vendor: HBA
Vendor: HBA
sites
tools
current models

=============================================================================
Top of Page

AIX
=============================================================================
#See the current OS levels

uname -a
oslevel -r
oslevel -q
oslevel -g

#See adapters, drivers, and microcode

#See the bottom of this section for AIX part number mappings

for FCS in $(lsdev -Cc adapter | awk '/fcs/ {print $1}')
do
#For each of the FCS instances
echo "=========================================================="
echo $FCS
echo "=========================================================="

#Microcode
lsmcode -cd $FCS

#Firmware
lscfg -vl $FCS | grep Z8

#Firmware, ROM, S/N, Type
fcstat $FCS
done

#Driver
lsdev -C -Ftype,name | grep -i fcs

#Software
lslpp -l | grep -i hba
lslpp -l | grep "FC Software"
lslpp -L EMC.Symm* #Should get two outputs - aix and fcp
lslpp -L devices.pci.df1000f7.com
lslpp -L devices.pci.df1000f*

#Disk type/info
lsattr -El hdisk#
lsattr -El vpath#

#See VTL device WWN (VTL - disk SAN array LUN that looks like tape to
OS/backup app)
lsdev -Cc tape
mt -f /dev/rmt# status

#List Powerpath info

#Software
lslpp -l | grep -i powerpath

#Devices
lsdev -C -t power

#WWN
for FCS in $(lsdev -Cc adapter | awk '/fcs/ {print $1}')
do
#Loop for each adapter
lscfg -vl $FCS | grep Z8
fcstat $FCS | grep ^World
done

#IBM Part numbers

#To determine the part numbers for the HBAs
lscfg -vpl fcs0 | grep "Part Number"

#To corrolate the Part Number from above to a "Feature Code"
#that EMC uses in their documentation OR to a HBA vendor model.


Emulex LPe11002 FC 5744
10N7255 (FRU 10N7255)

Emulex LP10000 FC 5716
80P4543 (FRU 80P4544)
80P4544

Emulex LP9002 FC 6228
00P2995 (FRU 00P2996)
00P2996
00P4494 (FRU 00P4495)
00P4495
03N2452 (FRU 09P0102)
09P0102
09P5079 (FRU 09P5080)
09P5080
80P4381 ???
80P4384

Emulex LP9802 FC 6239
00P4295
00P4297

Emulex LP7000 FC 6227
00P1882
03N4167
09P1162
09P1173
09P4038
24L0023

#Drivers
#See if they are already loaded
lslpp -L devices.pci.df1000f*

#If not, then
cd /mnt/aix/aix52_apar_IY56722
installp -a -Q -d . devices.pci.df1000fa.rte

smit install_software
use dot (.) for directory
select the following:
devices.pci.df1000fa
devices.pci.df1000f7

#Multipath software
#AIX
lsvpcfg
lspv

lsdev -Cc disk -s dpo -t vpath -F name

#AIX Dynamic Link Manager for HDS
/usr/DynamicLinkManager/bin/dlnkmgr view -help
/usr/DynamicLinkManager/bin/dlnkmgr view -path
/usr/DynamicLinkManager/bin/dlnkmgr view -path -hdev dlmfdrv#
/usr/DynamicLinkManager/bin/dlnkmgr view -drv

#RDAC
#show paths
fget_config -Av

#show what paths devices are on
fget_config -l dar0

#PCM/MPIO (available on AIX 5.2 and above)
CMD=pcmpath

mpio_get_config
mpio_get_config -Av
manage_disk_driver

#SDD
CMD=datapath
sddpcm_get_config -Av

#now run either PCM/MPIO or SDD commands

$CMD query version
$CMD query adapter
$CMD query device
$CMD query essmap
$CMD query wwpn
$CMD query port
$CMD query portmap
$CMD query portstats
$CMD query adaptstats N
$CMD query devstats N

Usage: $CMD query adapter [N aa/ap]

$CMD set adapter N online/offline aa/ap
$CMD set device N path N online/offline
$CMD set device N/(N N) algorithm rr/fo/lb/lbp
$CMD set device N/(N N) hc_interval T
$CMD set device N/(N N) hc_mode nonactive/enabled/failed
$CMD set device N/(N N) retry_timeout T
$CMD open device N path M
$CMD clear device N/(N N) count error/all
$CMD disable/enable ports CONNECTION ess ESSID
single port = R1-Bx-Hy-Zz
all ports on card = R1-Bx-Hy
all ports on bay = R1-Bx
refer portmap output for the connection string and ESS serial
number

Examples of valid device model include:
2105 - Displays all 2105 models (ESS)
2145 - Displays all 2145 models
1750 - Displays all 1750 devices (DS 6000)
2107 - Displays all 2107 devices (DS 8000)
1724 - Displays all 1724 devices (DS 4100)
1814 - Displays all 1814 devices (DS 4200 and DS 4700)
1722 - Displays all 1722 devices (DS 4300)
1742 - Displays all 1742 devices (DS 4400 and DS 4500)
1815 - Displays all 1815 devices (DS 4800)
1818 - Displays all 1818 devices (DS 5000)

#EMC Symmetrix software
cd /mnt/EMC/Drivers/AIX
installp -qa -d ./EMC.AIX.5.2.0.0 EMC.Symmetrix.aix.rte
EMC.Symmetrix.fcp.rte

#EMC ECC package
cd /mnt/EMC/ECC/Control_Center_5.2
./install_master.sh `pwd`
/opt/ecc
n
ECC-servername
#default
#default
Y
/opt/ecc/exec/start_master.csh

echo "ecc:2:once:/opt/ecc/exec/start_master.csh > /dev/console
2>&1 #Start ECCagent" >> /etc/inittab


#EMC PowerPath
#Must have a valid PowerPath license for this host
cd /mnt/EMC/PowerPath/PowerPath4.4/aix
installp -qa -d ./EMCpower_install EMCpower

/usr/sbin/emcpreg -install
/usr/sbin/powermt check_registration

#PCM/MPIO (available on AIX 5.2 and above)
CMD=pcmpath

#SDD
CMD=datapath

#View SDD/MPIO
$CMD query adapter
$CMD query device
lsvpcfg

#5.X and greater - MPIO multipath stats: bytes per path on hdisk
iostat -m

#Initialize HBAs in ODM
diag
Advanced Diag Routines
System Verification
(select each fcsX => F7)
loopback plug? no
F10
OR
diag -Avd fcs0 -c
OR
cfgmgr -vl fcs0

#Initialize HBA and scan for any disks
cfgmgr -vl fcs0
cfgmgr -vl fcs1
cfgmgr -vl dpo

#EMC Symmetrix software
cfgmgr -v
/usr/lpp/EMC/Symmetrix/bin/emc_cfgmgr
/usr/sbin/powermt config
/usr/sbin/powermt save

#SDD
#config HBA into SDD
/usr/sbin/allpaths

#config Paths via HBA
cfgmgr -l dpo
#dpovgfix
**or**
/usr/lib/methods/cfallvpath -2

lsdev -Cc disk | grep -i emc
lspv

#if this is the DR node, it needs to see failover disk's serial numbers
#so in can import the volumegroup
for DISK in $(lspv | grep hdiskpower | awk '{print $1}')
do
echo $DISK
chdev -l $DISK -a pv=yes
done

#change a SAN device to have no reserve
chdev -l HDISK# -a algorithm=round_robin -a reserve_policy=no_reserve -P

#VIO server
chdev -dev $HDISK -attr pv=yes

#see VIO pathing, look for CXX number and CEC/Frame serial number
iostat -m
lscfg -l hdisk1 -vps
lparstat -i
lspath

for DISK in $(lspv | awk '{print $1}')
do
echo "===================================================="
echo $DISK
for i in `lspath -l $DISK -F"parent"`
do
lscfg -vl $i
done
done


=============================================================================
Top of Page

HP-UX
=============================================================================
#See the current OS levels
uname -a
swlist | grep "Gold Base"

#See adapters, drivers, and microcode

#List adapters and model number
ioscan -funC fc
ioscan -fun | grep -i tachyon

#List individual adapater
ioscan -funC fc /dev/td0
ioscan -funC fc /dev/fcd0

#HBA and driver info
#fcms - Tachyon and Itanium
/opt/fcms/bin/fcmsutil /dev/fclp0 #get firmware revisions

/opt/fcms/bin/fcmsutil /dev/fclp0 vpd #get model number

#or use other command
/opt/fcms/bin/fcdutil /dev/td4 vpd #get model number

#fcd - pa-RISC
/opt/fcms/bin/tdutil /dev/td0
/opt/fcms/bin/fcdutil /dev/fcd0

#Devices
ioscan -m lun

#Emulex, if s/w package is loaded:
#Menu based system
/usr/sbin/lpfc/lputil

#CLI
/usr/sbin/lpfc/lutil count
#Loop per interface
CNT=0
/usr/sbin/lpfc/lutil model $CNT
/usr/sbin/lpfc/lutil rev $CNT

#Emulex, if s/w package is loaded:
#Menu based system
/usr/sbin/lpfc/dfc

#CLI
/usr/sbin/lpfc/dfc <<-EOF > /tmp/myfile
exit
[grep PATTERN | cat] /tmp/myfile

#Software
swlist -l product FC-TACHYON-TL
swlist -l patch | grep -i TACHYON

#Driver patch
swlist -l product | grep "Fibre Channel Driver"

#List Powerpath info

#Software
swlist -l product EMCpower

#Devices
ioscan -FunC disk | grep EMC
ioscan -m lun -C disk | grep EMC

#WWN
#Loop for each HBA
/opt/fcms/bin/fcdutil /dev/fcd0 | grep "World Wide Name"
/opt/fcms/bin/fcmsutil /dev/fclp0 | grep "World Wide Name"

for DEVICE in $(ioscan -kfnCfc | awk '/dev/{print $1}')
do
/opt/fcms/bin/fcmsutil $DEVICE
done

#Get WWN for disks
scsimgr -p get_attr all_lun -a device_file -a wwid -a state

#HP Part numbers

#List adapters
ioscan -funC fc

#Vendor models
SC - Single Channel (single port) HBA
DC - Dual Channel (dual port) HBA
SW - StorageWorks

Cambex
SW C2000 FC HBA for AIX

Emulex LPe12002 8G
AJ63A/AH403A
StorageWorks 8 GB 2 Port Fibre PCI-EX8

Emulex LPe12000 8G
AJ62A/AH402A

Emulex LPe1205 8G
456972-B21
LPe1205-HP

Emulex LPe1105 4G
LPe1105-HP
403621-B21

Emulex LP10000
FCA2684 (LP10000) Alpha
FCA2684DC (LP10000DC) Alpha
SW FCA2684 (LP1000) 2Gb PCI-X FC HBA non-HP
SW FCA2684DC (LP1000DC) 2Gb PCI-X FC HBA non-HP

Emulex LP9802 (336070-001)
AB232A (LP9802) 2 Gb PCI-X-to-FC HBA for Windows and
integrity
FCA2384 (LP9802) 2Gb PCI-X-to-FC HBA for Tru64 Unix Alpha
FCA2384DC (LP9802DC) Alpha
FCA2404 (LP9802) 305573-B21 2Gb PCI-X-to FC HBA for Windows
FCA2404DC (LP9802DC) 323264-B21 2Gb PCI-X-to FC HBA for Windows

Emulex LP1150 / LPe1150 4G
A8002A
FC2142SR (LPe1150) A8002A Windows
FC2143 (LP1150) AD167A SC Windows and integrity

Emulex LP11002 / LPe11002
FC2243 (LP11002) AD168A DC Windows and integrity
FC2242SR (LPe11002) A8003A Windows

Emulex LP1000 / LP1050
A7387A (LP1000s) DC 2Gb PCI-X FC HBA Windows
AB466A (LP1050DC) integrity
SW AB466ADC (LP1050DC) 2Gb 64-Bit/133 MHz PCI-X FC HBA
A7388A (LP1050) SC 2Gb PCI-X FC HBA Windows
AB467A (LP1050) 2Gb 64-Bit/133 MHz PCI-X FC HBA integrity
SW A7560A (1050EX) FC HBA for Windows

Emulex LP982
FCA2408 (LP982) 343073-B21 2Gb PCI-X-to-FC HBA for Windows
Windows
SW A7298A (LP982) 2Gb PCI-X FC HBA integrity

Emulex THOR ASIC
394757-B21 (THOR ASIC) (HP FC Mezzanine Card)
394588-B21 (THOR ASIC) (HP FC Mezzanine Card)

Qlogic QLA2342
A6826A

Qlogic QMH2462
A7538A

Qlogic AE311A
FCS1142SR

Qlogic AE312A
FCS1242SR

Qlogic QMH2562
451871-B21

Qlogic QMH2462 4Gb FC HBA
AB429A FC1143
AB429A FC1143
AB379B FC2242
AD300A
AE311A FC1142SR
AE369A FC1243
AE311A FC1142SR
AE312A FC1242SR
403618-B21
403619-B21
281541-B21 FC2214
321835-B21 FC2214DC
354054-b21 HP BL30p/BL35p Dual-Port FCHBA
300874-b21 HP BL20p G2 FC MEZ
361426-B21 HP BL20p G3 FC Adapter
381881-b21 HP BL25p/BL45p FCHBAL

Tachyon
A5158A PCI Fibre Channel Tachyon TL Adapter
A6684A HSC Fibre Channel Tachlite Adapter
A6685A HSC Fibre Channel Tachlite Adapter
A6795A PCI Fibre Channel Tachyon XL2 Adapter
A6826A PCI-X Dual Port Fibre Channel Adapt

4Gb PCI-X Fibre Channel HBAs
AB378B PCI-X single-channel-4Gb Fibre Channel adapter AB378B PCI-X
single channel
AB379B PCI-X dual port-4Gb Fibre Channel adapter AB379B PCI-X dual
port
AB429A PCI-X single-channel-4Gb Fibre Channel adapter AB429A PCI-X
single channel
AD167A FC2143 4Gb PCI-X 2.0 HBA AD167A PCI-X 2.0 HBA
AD168A FC2243 4Gb PCI-X 2.0 DC HBA AD168A PCI-X 2.0 HBA

4Gb PCIe Fibre Channel HBAs
AD300A PCIe dual port 4Gb Fibre Channel adapter AD300A PCIe dual
port
AD299A PCIe 1-port 4Gb Fiber Channel adapter AD299A PCIe 1-port
AD355A PCIe 2-port 4Gb Fiber Channel adapter AD355A PCIe 2-port
AE311A FC1142SR 4Gb PCIe HBA AE311A PCIe HBA
A8002A FC2142SR 4Gb PCIe HBA A8002A PCIe HBA
A8003A FC2242SR/DC 4Gb PCIe HBA A8003A PCIe HBA

8Gb PCIe Fibre Channel HBAs
AH400A PCIe 1-port 8Gb Fiber Channel HBA AH400A PCIe 1-port
AH401A PCIe 2-port 8Gb Fiber Channel HBA AH401A PCIe 2-port
AH402A PCIe 8Gb 1-Port Fibre Channel HBA AH402A PCIe 1-port
AH403A PCIe 8Gb 2-Port Fibre Channel HBA AH403A PCIe 2-port

Other Fibre Channel HBAs
403619-B21 BLc QLogic QMH2462 FC HBA Opt Kit BLc QLogic FC HBA Opt
Kit
403621-B21 BLc Emulex LPe1105 FC HBA Opt Kit BLc Emulex LPe1105 FC
HBA Opt Kit
SAS adapter family
AH303A PCIe SC44Ge SAS HBA AH303A PCIe SAS HBA

SCSI adapter family
A7173A PCI-X dual-port SCSI adapter A7173A PCI-X dual-port
AT134A HP Integrity SC11Xe PCIe SCSI Host Bus Adapter A7173A PCI-X
dual-port

RAID adapter family
337972-B21 PCI-X Smart Array P600 controller PCI-X Smart Array P600
controller
AD335A PCIe P800 SAS RAID controller PCIe P800 SAS RAID controller
AH226A PCIe Smart Array E500 SAS controller PCIe Smart Array E500
SAS controller
A9890A PCI-X 2-channel Smart Array 6402 PCI-X 2-channel Smart Array
6402
A9891A PCI-X 4-channel Smart Array 6404 PCI-X 4-channel Smart Array
6404

Networking connectivity
10Gb Ethernet adapter family
Product number Short description Photos
AD385A PCI-X 266MHz 10GBase-SR adapter Not available
AD386A PCIe 10GBase-SR adapter Not available
Gigabit Ethernet adapters
AD331A PCI 1-port 1000Base-T Gigabit Ethernet copper adapter AD331A
PCI 1-port
A7012A PCI-X 2-port 1000Base-T Gigabit Ethernet copper adapter
A7012A PCI-X 2-port;
AB545A PCI-X 4-port 1000Base-T Gigabit Ethernet copper adapter
AB545A PCI-X 4-port
AD332A PCI 1-port 1000Base-SX Gigabit Ethernet fiber adapter AD332A
PCI 1-port
A7011A PCI-X 2-port 1000Base-SX Gigabit Ethernet fiber adapter
A7011A PCI-X 2-port
AD337A PCIe 2-port 1000Base-T Gigabit Ethernet adapter AD337A PCIe
2-port
AD338A PCIe 2-port 1000Base-SX Gigabit Ethernet adapter AD338A PCIe
2-port
AD339A PCIe 4-port 1000Base-T Gigabit Ethernet adapter AD339A PCIe
4-port
447883-B21 BLc NC364m NIC adapter Opt Kit BLc NC364m NIC adapter
Opt Kit

Asynchronous multiplexer family
AD278A HP PCI 8-port serial MUX adapter Not available
AD279A HP PCI 64-port serial MUX adapter Not available

WAN adapter family
J3525A Dual port PSI card for HP3000/9000 Not available
Ethernet multifunction adapters: See Multifunction adapter family

Infiband adapters and switch family
AB286C HP PCI-X 2-port 4X fabric adapter HP PCI-X 2-port 4X fabric
adapter
AH304A PCIe 2-port 4x DDR Fast IB HCA PCIe 2-port 4x DDR Fast IB
HCA
410533-B21 HP BLc 4X DDR IB Mezzanine HCA HP BLc 4X DDR IB
Mezzanine HCA

HyperFabric2 adapters and switches
A6388A HyperFabric2 8-port fiber switch module HyperFabric2 8-port
fiber switch module
A6386A PCI HyperFabric2 fiber adapter PCI HyperFabric2 fiber
adapter

Cisco Pass-Thru Interconnect Modules
AT135A HP Integrity Cisco B22HP Fabric Extender HyperFabric2 8-port
fiber switch module
AT136A HP Integrity Cisco B22HP Fabric Extender wFET PCI
HyperFabric2 fiber adapter

Multifunction adapter family
AB290A PCI-X dual port U320 SCSI and dual port 1Gb Ethernet adapter
A9782A PCI-X 2Gb Fibre Channel and 1000Base-SX Gigabit Ethernet
multifunction adapter
AD193A PCI-X 4Gb Fibre Channel and 1000Base-T Gigabit Ethernet
multifunction adapter
AD194A PCI-X 2-port 4Gb Fibre Channel & 2-port 1000Base-T adapter
AD221A PCIe 1-port 4GB Fibre Channel and 1-port 1000Base-T adapter
AD222A PCIe 2-port 4GB Fibre Channel and 2-port 1000Base-T adapter
AD393A PCIe 2-port 4GB Fibre Channel and 2-port 1000Base-SX adapter

Lights Out Advanced KVM family
AD307A PCI 1000Base-T Gigabit Ethernet adapter HP PCIe 1000Base-T

Graphics adapter family
AH391A HP 2D PCI graphics card HP 2D PCI graphics card
A6869B HP 2D USB PCI graphics card HP 2D USB PCI graphics card

Unknown mapping to vendor type
FC1143 SC
FC1243 DC
FCA2257C Dual Channel cPCI FC HBA for Solaris
FCA2257P 2Gb PCI-to-FC HBA for Solaris
FCA2257S Dual Channel Sbus FC HBA for Solaris
SW FCA2210 FC HBA for NetWare
SW FCA2214 2Gb PCI-X FC HBA
SW FCA2214DC DC 2Gb PCI-X FC HBA
SW FCA2101 245299-B2 2Gb FC HBA
SW FCA2355 308540-B21 dual channel PCI HBA
SW FCA2354 FC HBA Tru64 UNIX OpenVMS
SW FC1142SR 4Gb PCI-E HBA
SW FC1242SR 4Gb PCI-E DC HBA
SW Q200 FC HBA for Windows and Linux
SW Q2300 FC HBA for Linux


#Load software, drivers and firmware
#NOTE: You may need to modify lines for the APPROPRIATE version

#EMC ECC package
cd /tmp_mnt/EMC/ECC/Control_Center_5.2
./install_master.sh `pwd`
/opt/ecc
n
ECC-servername
#default
#default
Y
/opt/ecc/exec/start_master.csh

#EMC PowerPath
#Must have a valid PowerPath license for this host

#Multiple reboots
mkdir /tmp/EMC
cd /tmp/EMC
cp /tmp_mnt/EMC/PowerPath/PowerPath4.3/hpux/EMCPower.HP.4.3.0.tar.Z .
uncompress EMCPower.HP.4.3.0.tar.Z
swinstall -x autoreboot=true -x mount_all_filesystems=false \
-s /tmp/EMC/EMCPower.HP.4.3.0.tar EMCpower

*** REBOOT - automatically occurs ***

mount nimserver:/depot/Software/UNIX /tmp_mnt
mkdir /tmp/EMC
cd /tmp/EMC
cp
/tmp_mnt/EMC/PowerPath/PowerPath4.3/hpux/EMCPower.HP.4.3.1.Patch.b040.tar.Z
uncompress EMCPower.HP.4.3.1.Patch.b040.tar.Z
swinstall -x autoreboot=true -x mount_all_filesystems=false \
-s /tmp/EMC/EMCPower.HP.4.3.1.Patch.b040.tar \
EMCpower_patch431

*** REBOOT - automatically occurs ***

#Single reboot
mkdir /tmp/EMC
cd /tmp/EMC

cp /tmp_mnt/EMC/PowerPath/PowerPath4.3/hpux/EMCPower.HP.4.3.0.tar.Z .
cp
/tmp_mnt/EMC/PowerPath/PowerPath4.3/hpux/EMCPower.HP.4.3.1.Patch.b040.tar.Z
uncompress EMCPower.HP.4.3.0.tar.Z
uncompress EMCPower.HP.4.3.1.Patch.b040.tar.Z

swcopy -s /tmp/EMC/EMCPower.HP.4.3.0.tar EMCpower @/tmp/PPdepot
swmodify -alayout_version=1.0 @ /tmp/PPdepot

swcopy -s /tmp/EMC/EMCPower.HP.4.3.1.Patch.b040.tar \
EMCpower_patch431 @/tmp/PPdepot
swinstall -x autoreboot=true -x mount_all_filesystems=false \
-s /tmp/PPdepot EMCpower EMCpower_patch431

*** REBOOT - automatically occurs ***

/usr/sbin/emcpreg -install
/sbin/powermt check_registration

/sbin/powermt config
/sbin/powermt save

ioscan -FunC disk | grep EMC

=============================================================================
Top of Page

SunOS/Solaris
=============================================================================

NOTE: Just because the software package is loaded, or if the driver is
loaded, does not mean there is a HBA card installed in the system.
(A "forceload" in /etc/system will load the driver regardless if the
hardware
is there or not).

#See the current OS levels
#OS Version and kernel patch
uname -a

#Maintenance level (based on month/year,
# i.e. "Solaris 8 2/02" is Feb/2002 code release)
grep Solaris /etc/issue

#List patches
showrev -p

#Get to latest OBP, go to sunsolve.sun.com, then to hardware, then model
prtconv -V

#See adapters, drivers, and microcode

#COMMON to VENDORS

#System error log file (other than /var/adm/messages.*
# and /var/log/syslog.*):

#Solaris 10 only
/var/fm/fmd/fltlog

#look up/view an error
fmtdump -v
fmadm

#view and error code from the logs
http://www.sun.com/msg/

#See what hardware is there
/usr/platform/sun4u/sbin/prtdiag | awk '/PCI/ {print $NF}'
ls -l /dev/cfg/c0

#add to /etc/system
forceload: drv/fp
forceload: drv/ssd
forceload: drv/pcisch

# NOTE: run as root user (otherwise you don't see everything)
cfgadm -l
cfgadm -al
cfgadm -al CONTROLLER_ID
cfgadm -al -o show_FCP_dev CONTROLLER_ID
cfgadm -o show_SCSI_LUN -al
cfgadm -o show_FCP_dev -al

# configure command - not a show command
cfgadm -c configure c# c#

#NOTE: Some of the luxadm commands require the devices to
# be configured with cfgadm first.
luxadm -e port
luxadm -e dump_map `HBA path from above command'
luxadm -e dump_map /devices/pci@23d,600000/SUNW,qlc@1/fp@0,0
luxadm -e dump_map /dev/fc/fp0
luxadm -e forcelip `HBA path'
luxadm probe
luxadm display '/dev/rdsk/cXtXdX'

#NOTE: run as root user (otherwise you don't see everything)
# Solaris 10 only, and the last releases of Solaris 9
fcinfo hba-port
fcinfo hba-port -l
fcinfo hba-port -l 210000e08b86f07d
fcinfo -port -slp 210000e08b86f07d
fcinfo remote-port -slp 210000e08b86f07d

#Devices listed with WWN
iostat -XMzxn

#If Emulex
#add to /etc/system
forceload: drv/clone

#NOTE: Only in solaris 10
#List lots of info about each HBA by port
fcinfo hba-port | grep WWN

#*** Use French: fibre (re not er)
# does not give the WWN, but does list instances
prtpicl -v -c obp-device

#List out known HBAs in system device tree
grep lpfc\"$ /etc/path_to_inst
"/pci@8,700000/lpfc@2" 0 "lpfc"
"/pci@8,700000/lpfc@3" 1 "lpfc"
"/pci@8,700000/fibre-channel@2" 2 "lpfc"
"/pci@8,700000/fibre-channel@3" 3 "lpfc"

#you have 2 Emulex cards:
# instance 0 is interface card 2
# instance 1 is interface card 3

#Entry needed for forceload in /etc/system
grep clone /etc/system
forceload: drv/clone

#See if driver is loaded
modinfo | grep lpfc
110 78162000 512d2 185 1 lpfc (Emulex LightPulse FC SCSI/IP)

#Number of HBA instances/devices
prtdiag -v | grep fibre

#List adapaters
/usr/sbin/lpfc/lputil

#Software version of Driver
pkginfo -l lpfc | awk '/VERSION/ {print $3}'

#Firmware, FCode
echo "quit" | /usr/sbin/lpfc/dfc | grep lpfc

#Get HBA config info
fcinfo hba-port -l

#Firmware, FCode
/usr/sbin/lpfc/dfc
hbaconfig
quit

#Firmware, i.e '0' is instance number
/usr/sbin/lpfc/lputil rev 0

#Lputil s/w version
/usr/sbin/lpfc/lputil version

#Get WWN for each HBA
/usr/sbin/lpfc/lputil listhbas

#Get WWN for each HBA and LUNs on that HBA
/usr/sbin/lpfc/lputil fcpmap 0

#Get persistent binding WWN
/usr/sbin/lpfc/lputil shownodes 0

#manage HBAs (firmware, reset, etc)
#script/menu at OS level (like HBAnyware)
/usr/sbin/lpfc/lptuil

HBANYWARE GUI
#HBAnyware graphic
#start an X windows on the system you are on
export DISPLAY=$YOURIP:0
/usr/sbin/hbanyware/ocmanager
/usr/sbin/hbanyware/hbanyware

HBANYWARE CLI
/usr/sbin/hbanyware/ocmanager
/usr/sbin/hbanyware/hbacmd listhbas
/usr/sbin/hbanyware/hbacmd hbattrib $WWPN

#If Qlogic

##Entry needed for forceload in /etc/system
forceload: drv/qlc

#List info about HBA
prtpicl -v -c scsi-fcp
prtpicl -v -c scsi-fcp | grep port-wwn
prtpicl -v -c scsi-fcp | grep devfs-path

#See if driver is loaded
grep qlc /etc/system
forceload: drv/qlc

#Number of HBA instances/devices
prtdiag -v | grep qlc

#Frimware Driver
modinfo | grep qlc
27 10257975 26bc0 153 1 qlc (Qlogic FCA Driver v0.40.5)
#OR
grep Driver /var/adm/messages* | grep Qlogic

#Get HBA config info
fcinfo hba-port -l

#Fcode
# RUN AS ROOT (otherwise you don't see everything)
luxadm fcode_download -p

#Software version of Driver
#32 bit
pkginfo -l SUNWqlc | grep VERSION
#64 bit
pkginfo -l SUNWqlcx | grep VERSION

#Get Model type of Driver
pkginfo -l SUNWqlc | grep NAME

#See devices on Qlogic
luxadm probe

#See devices HBA (WWN)
luxadm display 50060482c465135c

#See devices on Qlogic
luxadm probe

#See devices HBA (WWN)
luxadm display 50060482c465135c

#See disk device
luxadm display /dev/rdsk/c3t50060482C465135Cd14s2

#See the configurable devices
# RUN AS ROOT (otherwise you don't see everything)
cfgadm -al | grep fc-fabric

#Configure "fc-fabric" items (output from cfgadm -al)
#Where '#' is the controller number
# RUN AS ROOT (otherwise you don't see everything)
luxadm -e port

#List Powerpath info

#Software
pkginfo -L EMCpower

#Devices
iostat -En | grep EMC
format < /dev/null | grep EMC

#Files that need modification

The software package for the HBA should make entries in
/etc/system

**** NOTE: if you install VxFS later, lwp_default_stksize value
may be changed (additional later entry in /etc/system).

#If Emulex

You will need to add entries for the targets in
vi /kernel/drv/sd.conf

#Add to the end of the file (example):

#
# 66-71, 102-121 BCV
#
name="sd" parent="lpfc" target=0 lun=102;
name="sd" parent="lpfc" target=0 lun=103;
name="sd" parent="lpfc" target=0 lun=104;
...
name="sd" parent="lpfc" target=0 lun=119;
name="sd" parent="lpfc" target=0 lun=120;
name="sd" parent="lpfc" target=0 lun=121;

#
# LUNs: b7-ca (hex), 183-202 (decimal) SRDF
#
name="sd" parent="lpfc" target=0 lun=183;
name="sd" parent="lpfc" target=0 lun=184;
name="sd" parent="lpfc" target=0 lun=185;
...
name="sd" parent="lpfc" target=0 lun=200;
name="sd" parent="lpfc" target=0 lun=201;
name="sd" parent="lpfc" target=0 lun=202;


vi /kernel/drv/lpfc.conf

log-verbose=0x10;
log-only=1;
fcp-bind-method=2;
# BEGIN: LPUTIL-managed Persistent Bindings
fcp-bind-WWPN="5006048acc18f567:lpfc0t0";
# "5006048acc18f547:lpfc1t1";
automap=2;
fcp-on=1;
lun-queue-depth=20;
tgt-queue-depth=512;
no-device-delay=1;
network-on=0;
xmt-que-size=256;
scan-down=1;
linkdown-tmo=60;
nodev-holdio=0;
nodev-tmo=60;
delay-rsp-err=0;
check-cond-err=0;
num-iocbs=2048;
num-bufs=1024;
topology=2;
ip-class=3;
fcp-class=3;
use-adisc=0;
extra-io-tmo=0;
post-ip-buf=128;
dqfull-throttle-up-time=1;
dqfull-throttle-up-inc=1;
zone-rscn=1;
ack0=0;
cr-delay=0;
cr-count=1;
discovery-threads=1;
class-code=0x00020000;
flow_control="duplx" queue="qfifo" disk="scdk" tape="sctp";
use-lomempages=0;
link-speed=0;
fdmi-on=0;

#If Qlogic/Sun, you will need to modify

vi /etc/system
set sd:sd_max_throttle=20

*for the Leadville Qlogic Sun driver (HBA)
set fcp:ssfcp_enable_auto_configuration=1

#PowerPath - 60 sec timeout
set sd:sd_io_time = 0x3c

#Non-PowePath - 120 sec timeout
set sd:sd_io_time = 0x78

#file it creates - no need to modify
/kernel/drv/md.conf,/kernel/drv/qlc.conf
/kernel/drv/fp.conf, vi /kernel/drv/scsi_vhci.conf

#Must do a reconfigure reboot
touch /reconfigure;init 6

If Emulex
#Persistent Binding
/usr/sbin/lpfc/lputil
=> 5. Persistent Bindings
=> 5. Bind Automapped Targets
Loop for each adapter
Yes to bind all auto-mapped targets
=> 2. Bind by port name

touch /reconfigure;init 6

When disks are presented:

Emulex
Solaris 2.6: drvconfig;disks
Solaris >=2.7: devfsadm -v -C -c disks OR devfsadm -v
If VxVM: vxdctl enable

Qlogic
#See devices on Qlogic
luxadm probe

#See devices HBA (WWN)
luxadm display 50060482c465135c

#See disk device
luxadm display /dev/rdsk/c3t50060482C465135Cd14s2

#See the configurable devices
# RUN AS ROOT (otherwise you don't see everything)
cfgadm -al | grep fc-fabric

#Configure "fc-fabric" items (output from cfgadm -al)
#Where '#' is the controller number
# RUN AS ROOT (otherwise you don't see everything)
luxadm -e port

#configure connected ports
cfgadm -c configure c# c#

#IF IBM SDD
/opt/IBMsdd/bin/cfgvpath -r
/opt/IBMsdd/bin/vpathmkdev

#WWN
If Emulex
#Menu driven
/usr/sbin/lpfc/lputil

#Get WWN for each HBA
/usr/sbin/lpfc/lputil listhbas

#Get WWN for each HBA and LUNs on that HBA
/usr/sbin/lpfc/lputil fcpmap 0

#Get persistent binding WWN
/usr/sbin/lpfc/lputil shownodes 0

If QLogic
#See devices on Qlogic
luxadm probe

#See devices HBA (WWN)
luxadm display 50060482c465135c

#Load software, drivers and firmware
#NOTE: You may need to modify lines for the APPROPRIATE version

If Emulex
#Driver
cd /tmp
tar xvf /mnt/solaris/emulex_hba/602f/lpfc-6.02f-sparc.tar
pkgadd -d . lpfc.1
packages? all
man pages? yes
enable IP? no
conflicting files? yes
continue? yes
packages? q #You are back to the beginning
reboot

#Firmware
/usr/sbin/lpfc/lputil
3 - firmware maintenance
1 - load firmware image
filename? /mnt/solaris/emulex_hba/602f/cd392a3.awc
0 - exit
0 - exit

#Software - HBAnyware
#Must have Java 1.4 loaded
cd /tmp
gzip -dc /mnt/solaris/emulex_hba/602f/HBAnyware-2.1a18-sparc.tar.gz\
| tar xvf -
pkgadd -d . HBAnyware

reboot

#Persistent Binding
/usr/sbin/lpfc/lputil
=> 5. Persistent Bindings
=> 5. Bind Automapped Targets
Loop for each adapter
Yes to bind all auto-mapped targets
=> 2. Bind by port name

touch /reconfigure;init 6

If QLogic
#Drivers downloaded from www.sun.com/storage/san

#Driver
cd /tmp
zcat /mnt/solaris/sun_hba/SAN_4[1].4.6_install_it.tar.Z | \
tar xvf -
cd SAN_4.4.6_install_it
./install_it

install? y
Patchpro search? n
reboot

# RUN AS ROOT (otherwise you don't see everything)
cfgadm -al | grep fc-fabric
luxadm -e port
#configure connected ports
cfgadm -c configure c# c#

#EMC ECC package
cd /mnt/EMC/ECC/Control_Center_5.2
./install_master.sh `pwd`
/opt/ecc
n
ECC-servername
#default
#default
Y
Y

/opt/ecc/exec/start_master.csh

#Multipath
#EMC PowerPath
#Must have a valid PowerPath license for this host
cd /tmp
zcat
/mnt/EMC/PowerPath/PowerPath4.4/solaris/EMCPower.SOLARIS.4.4.0.tar.Z |\
tar xvf -
pkgadd -d . EMCpower
opt
y

/etc/emcpreg -install
/etc/powermt check_registration

devfsadm -v
#*OR*
devfsadm -v -C c disk

/etc/powermt config
/etc/powermt save

iostat -En | grep EMC

#Install Veritas product now for DMP
# and/or Volume Mgt (if applicable)

#Enable Multipathing (MPXIO)

#enable MPXIO
vi /kernel/drv/scsi_vhci.conf
vi /kernel/drv/fp.conf

stmsboot -e

#update vfstab and dumpadm
stmsboot -u

luxadm -e port

#list ports/hbas
cfgadm -al

#makes /dev/fc/fp#
#by all controllers
cfgadm -c

#by specific controllers
cfgadm -c configure c# [c#] ...
#i.e. cfgadm -c configure c0 c3

#enable MPXIO
stmsboot -e

#update MPXIO and reboot to configure
stmsboot -u

#disable MPXIO
stmsboot -d

#list devices on a controller
stmsboot -l c#

#list all paths
stmsboot -L

#SUN rebranded HBA Part numbers

#Must have a sunsolve account to see this information.

http://sunsolve.sun.com/handbook_private/Devices/Fibre_Channel/FIBRE_TOC.html

#Supported
http://www.emulex.com/products/fc/index.html
http://www.emulex.com/ts/index.html

http://www.qlogic.com/products/fc_san_hostadapers.asp

#Supported but dead product line - no longer shipping.
http://www.amcc.com

#Others

http://www.lsilogic.com/storage_home/products_home/host_bus_adapters/index.ht
ml
http://www.attotechnology.com/fibrechannelhostadaptertechnology.html


NOTE: JNI (was aquired by amcc.com), no longer makes HBAs.
Sun supported choices are (as of 2006): Emulex and Qlogic.

NOTE: Sun Microsystems appears to be heading down the same path
as HP and IBM. While all of the major HBA vendors currently
provide drivers for Sun Solaris, Sun has included the
leadville driver as part of its current SAN Foundation
software. This driver offers full fabric support, along
with failover and management capabilities, and replaces the
one provided by the HBA vendors, though this driver
currently only works with the newest HBAs provided by
QLogic. The upside of this approach, according to
Christopher Poelker, a storage architect with Hitachi Data
Systems (HDS), is that the leadville driver removes the
need to edit the /kernel/drv/sd.conf file because it runs
at the kernel level and uses a different configuration
file--/kernel/drv/sdd.conf--which needs no editing.

#To determine the part numbers for the HBAs
#Solaris 10 only
fcinfo hba-port -l


Emulex LPe11000
PCI Express 4Gigabit/Sec Single FC Host Adapter
noneavailable

375-3396 Option SG-XPCIE1FC-EM4

Emulex LP11000
PCI/PCI-x 4Gigabit/Sec Single FC Host Adapter
3.3V 64Bit 33/66/100/133/266MHz

375-3398 Option SG-XPCI1FC-EM4-Z

Emulex LPe11002
PCI Express 4Gigabit/Sec Dual FC Host Adapter
noneavailable

375-3397 Option SG-XPCIE2FC-EM4

Emulex LP11002
PCI/PCI-x 4Gigabit/Sec Dual FC Host Adapter
3.3V 64Bit 33/66/100/133/266MHz

375-3399 Option SG-XPCI2FC-EM4-Z

Emulex LP10000DC-S
PCI/PCI-x 2Gigabit/Sec Dual FC Host Adapter
3.3/5V 32/64Bit 33/66/100/133MHz

375-3305 Option SG-XPCI2FC-EM2

Emulex LP10000-S
PCI/PCI-x 2Gigabit/Sec Single FC Host Adapter
3.3/5V 32/64Bit 33/66/100/133MHz

375-3304 Option SG-XPCI1FC-EM2

JNI FCX2-6562-L
PCI/PCI-x 2Gigabit/Sec Dual FC Host Adapter
3.3/5V 32/64Bit 33/66/100/133MHz

375-3157 Option SG-XPCI2FC-JF2

JNI FCX-6562-L
PCI/PCI-x 2Gigabit/Sec Single FC Host Adapter
3.3/5V 32/64Bit 33/66/100/133MHz

375-3156 Option SG-XPCI1FC-JF2

JNI FCE-6460-N
PCI 2Gigabit/Sec Single FC Host Adapter
3.3/5V 32/64Bit 33MHz

370-4915 Option XT8-FCE-6460-N
370-5702 Option SG-XFCE-6460-N, SG-XPCI1FC-JN2
375-3019 Option 6799

JNI FCE-6410-N
PCI 3.3/5V 32/64Bit 33MHz
370-4519 Option XT8-FCE-6410-N
370-5701 Option SG-XFCE-6410-N

PCI 1Gigabit/Sec Dual FC Host Adapter
3.3/5V 32/64Bit 33/66MHz

370-4626 Option XT8-FCE2-6412-N
370-5700 Option SG-XFCE2-6412-N

JNI FCE-1063-N
PCI 1Gigabit/Sec Single FC Host Adapter
5V 32Bit 33MHz
370-4517 Option XT8-FCI-1063-N

Myrinet M3F-PCI64C-2
PCI 2Gigabit/Sec Sun Fire Visual Grid Interconnect
3.3/5V 32/64Bit 33/66MHz

375-3180 Option 3692

QLogic QLE2462-Sun
PCI Express 4Gigabit/Sec Dual FC Host Adapter
noneavailable

375-3356 Option SG-XPCIE2FC-QF4

Qlogic QLA2462-S
PCI/PCI-x 4Gigabit/Sec Dual FC Host Adapter
3.3V (mode 1) 1.5V/3.3V (mode 2) 64Bit 33/66/100/133/266MHz

375-3294 Option SG-XPCI2FC-QF4

QLogic QEM2462
PCI Express 4Gigabit/Sec Dual FC Host Adapter ExpressModule
noneavailable

375-3384 Option SG-XPCIE2FC-QB4-Z

Qlogic QLE2460-Sun
PCI Express 4Gigabit/Sec Single FC Host Adapter
noneavailable

375-3355 Option SG-XPCIE1FC-QF4

Qlogic QLA2460-S
PCI/PCI-x 4Gigabit/Sec Single FC Host Adapter
3.3V (mode 1) 1.5V/3.3V (mode 2) 64Bit 33/66/100/133/266MHz

375-3354 Option SG-XPCI1FC-QF4

Qlogic QLA2342-SUN
PCI/PCI-x 2Gigabit/Sec Dual FC Host Adapter
3.3/5V 32/64Bit 33/66/100/133MHz

375-3108 Option 6768, SG-XPCI2FC-QF2, SG-XPCI2FC-QF2-Z
375-3363 Option 6768, SG-XPCI2FC-QF2, SG-XPCI2FC-QF2-Z

Qlogic QLA2340 / QLA2340-CK
PCI/PCI-x 2Gigabit/Sec Single FC Host Adapter
3.3/5V 32/64Bit 33/66/100/133MHz

370-6697 Option 9279 (QLA2340-CK)
375-3383 Option SG-XPCI1FC-QL2 (QLA2340)

Qlogic QLA2310F-SUN
PCI 2Gigabit/Sec Single FC Host Adapter
3.3/5V 32/64Bit 33/66MHz

375-3102 Options 6767 / SG-XPCI1FC-QF2

Qlogic QLA2212F/66-SUN
PCI 1Gigabit/Sec Dual FC Host Adapter+
3.3/5V 32/64Bit 33/66MHz

375-3030 Option 6727

Qlogic QLA2200F 2Gigabit/Sec PCI-X Single
3.3/5V 32/64Bit 33/66MHz

QLA2200F-CK 501-6640 Option 5133
QLA2200F/66-SUN 375-3019 Option 6799

Qlogic QLA210-Sun
PCI/PCI-x 2Gigabit/Sec PCI/PCI-X Single FC Host Adapter
3.3V 32Bit 33/66/100/133MHz

375-3253 Option SG-XPCI1FC-QLC
375-3364 Option SG-XPCI1FC-QLC-Z

Unknown FC100/P
PCI 1Gigabit/Sec PCI Single Host Adapter
3.3/5V 32/64Bit 33/66MHz
375-0040 Option 6729

=============================================================================
Top of Page

Linux (focused on RedHat, but should work for other flavors too)
=============================================================================
#find what is on your system
dmesg | grep -i fib
dmesg | grep -i qlog
dmesg | grep -i emulex
dmidecode
numactl --hardware

lspci | grep -i fib
lspci -vv | awk '/Emulex/,/^$/ {print $0}'
lspci -vv | awk '/Qlogic/,/^$/ {print $0}'
lspci -nn | grep -i hba

hdparm -I /dev/sdX
lshw -class disk -class storage #if you have lshw loaded
lshw -short -C disk
smartctl -d auto -a -i /dev/sda
smartctl -d ata -a -i /dev/sda

palimpsest #disk GUI

cat /etc/modprobe.conf
lsmod | grep -i lpfc

#what are the currently configured disks
fdisk -lu

ls -l /proc/scsi
ls -l /sys/class/scsi-host

#What type of HBA and its characteristics
#model, firmware, driver
cat /sys/class/scsi_host/host*/modelname
cat /sys/class/scsi_host/host*/info
cat /sys/class/scsi_host/host*/fwrev
cat /sys/class/scsi_host/host*/lpfc_drvr_version

#WWNN WWPN
cat /sys/class/scsi_host/host*/device/fc_host/host*/node_name
cat /sys/class/scsi_host/host*/device/fc_host/host*/port_name
cat /sys/class/scsi_host/host*/device/fc_host/host*/fabric_name

cat /sys/class/fc_host/host*/port_name
cat /sys/class/fc_host/host*/device/scsi_host/host*/info

#old RHEL < 5
cat /proc/scsi/qla2300/1

#get HBA info
yum -y install libsysfs sysfsutils
/usr/bin/adapter_info
/usr/bin/systool -c fc_transport -v
/usr/bin/systool -c fc_host -v
/usr/bin/systool -c scsi_host -v
/usr/bin/systool -c scsi_host -v \
| egrep -w "lpfc_drvr_version|firmware_revision|info"
/usr/bin/systool -c scsi_host -v \
| grep modeldesc

#discover new Emulex modules
modprobe -l *lpfc*

#discover new disk
modprobe -r

#
#How to add new / remove used LUNs without rebooting Linux server"
#

#discover new disk
for HOST in $(cd /sys/class/scsi_host; ls -d host*)
do
echo $HOST
echo "- - -" > /sys/class/scsi_host/$HOST/scan
done

#discover new disk
#have HBA relogin and rescan
#loop for each host#
echo "1" > \
/sys/class/fc_host/host0/issue_lip

#discover new disk
#scan scsi bus
#loop for each host#
echo "1" > \
/sys/class/scsi_host/hostX/scan

#discover new disk
/usr/sbin/lpfc lun_san all

#How to add new / remove used LUNs without rebooting Linux server"
part-probe
scsi-rescan #if not there, then: yum -y install
sg3_utils
/usr/bin/rescan-scsi-bus.sh #do not use if have powerpath installed

printf "scsi remove-single-device %d %d %d %d" \
$controller $bus $target $lun \
>>/proc/scsi/scsi

printf "scsi add-single-device %d %d %d %d" \
$controller $bus $target $lun \
>>/proc/scsi/scsi

#FC View
cat /proc/scsi/lpfc/X
cat /sys/class/scsi_host/hostX/port_name
cat /sys/class/fc_host/hostX/port_name

#For example if you have a qlogic 2300 hba:
modprobe -r qla2300
modprobe qla2300
echo "scsi-qlascan" > \
/proc/scsi/qla2200/1
echo "scsi-qlascan" > \
/proc/scsi/qla2200/2
echo "scsi add-single-device 1 0 0 6" > \
/proc/scsi/scsi

#Disk mappings
ls -l /dev/mapper
ls -l /dev/disk/by-id
cat /var/lib/multipath/bindings

blkid -o list # list all the UUIDs for disks/partitions
blkid /dev/sda3 # list all the UUIDs for disk
blkid -U xxxxxxxxx # list all the disk that matches UUID
lsblk --fs #like blkid, but gives FS info for the devices

vol_id /dev/sda3 # list all the UUIDs for disk
ls -l /dev/disk/by-uuid | grep sda3
pvs -a -v # list UUIDs w/ disk names

#What is my controller/device/LUN
lsscsi
#H:C:T:L
#if no lsscsi, then manually:
ls -l /sys/bus/scsi/devices
ls -l /sys/block/sd${LETTER}/device/scsi_device
ls -l /sys/block/*/device
#H:C:T:L
#HBA:HBA-channel:SCSI-ID-Target:LUN_sequence
0:0:0:0

#OR
sg_map -x

/dev/sg22 0 0 3 4 /dev/sdam

#######################################################
#Miscellaneous commands (yet to be organzied)
#######################################################
pvs
pvs --segments
lvs -a -o+devices
lvs --all --segments -o +devices
lvdisplay --maps [/dev/VG/LV]
vgs -o +tags
vgs -o +devices

#backup VG metadata
vgcfgbackup
cd /etc/lvm/backup
ls
cat SOMEVG

#add new device driver to kernel
vi /etc/sysconfig/kernel
#add to INITRD_MODULES line: as in "qla2xxx"
mkinitrd

#mpio = multipath
/etc/multipath.conf
multipath -l
multipath -ll
multipath -l[l] [mpath0]
multipath -v2

#get multipathd into boot sequence
insserv boot.multipath multipathd

#add to /etc/fstab, in the options field: "_netdev"
#as in "default,_netdev"

ll /dev/mpath/mpath1
ls -l /dev/mapper
ls -l /sys/block

dmsetup info
dmsetup ls --tree -o uuid,vt100

service multipathd stop
multipath -F #flushes multipath
service multipathd start

service multipathd reload

pvcreate /dev/mpath/mpath1

/var/lib/multipath/bindings #can copy between systems (clustered) so
that
the names come out the same on both systems

/usr/share/doc/device-mapper-multipath*/multipath.conf

lsscsi
#loop for each host#
echo "1" > \
/sys/class/fc_host/host0/issue_lip

#print disk queries
cat /proc/scsi/scsi

#remove a sd disk device
echo 1 > \
/sys/block/sd${LETTER}/device/delete

#remove a path
echo offline > \
/sys/block/sdX/device/state


#*****WARNING**** DISK WIPE *** DATA LOSS *********
badblocks -ws DEVICE-NAME # Erase a disk
#*****WARNING**** DISK WIPE *** DATA LOSS *********

parted # create, resize, remove partitions
fdisk # create, resize, remove partitions

#blocksize and other FS charachteristics
dumpe2fs /dev/mapper/rootvg-esplv | grep -i 'Block size'
blockdev --getbsz /dev/mapper/rootvg-esplv

lsscsi #yum install lsscsi
#LATEST: http://sg.danny.cz/scsi/lsscsi.html

[/sbin,/lib/udev]/scsi_id #vpd
scsi_id -g -u -s [/dev]/block/sda

#Print/Get the WWN/LUN ID/LID of a disk device
/sbin/scsi_id -g -s /block/sde

#scsi_id display UUID if no multipath, WWN if multipath
scsi_id --whitelisted --device=/dev/sddl2

#remember that blkid with no arguments returns all of the system disk
#blkid display UUID if no multipath, WWN if multipath
blkid | grep a1331d73-d640-4bac-97b4-cf33a375ae5b

#find what disk is associated w/ a UUID
findfs UUID=7bc9f29c-67e7-4391-9a6a-23a2d34fc3ca

#find what disk is associated w/ a LABEL
findfs LABEL=SWAP

#The "filter" line: what you want displayed/output/used
#by disk commands
grep filter /etc/lvm/lvm.conf

cd /dev/disk/by-path
cd /dev/disk/by-id
ls -l
WWN -> ../../sd?

#Two ways to mount disk by using other disk indentifiers
#grep boot /etc/fstab
#LABEL
LABEL=/boot /boot ext3 defaults 1 2
#UUID
UUID=a1331d73-d640-4bac-97b4-cf33a375ae5b /dir/mount/disk/on ext3fs
defaults 1 1

mount -U a1331d73-d640-4bac-97b4-cf33a375ae5b
/directory/you/mount/this/disk/on

#If you prefer to generate your own UUID's (see above), you can use the
#uuidgen command and couple it with tune2fs to change the default UUID
#assigned to your disk by the system, like this:

uuidgen
1d721189-7b71-4315-95a7-1c3abc90d379
tune2fs -U 1d721189-7b71-4315-95a7-1c3abc90d379 /dev/sda3

ls -l /dev/disk/by-uuid | grep cf33a375ae5b
lrwxrwxrwx 1 root root ....a1331d73-d640-4bac-97b4-cf33a375ae5b->
../../sda3

=============================================================================
Top of Page

Windows
=============================================================================
#HBA INFO
Start ->
right click on "My Computer" ->
Properties menu item ->
Hardware tab ->
Device Manger button ->
"SCSI and RAID controllers" object ->
select the device you want to know about ->
double-click on device ->
Driver tab and look for "Driver Version"

Click on DETAILS tab ->
pulldown on menu "Property" and select "Service"
it should list the general HBA model number
pulldown on menu "Property" and select "Hardware IDs"
The "dev" argument should list the specific HBA model number

#WWN/LUN MAPPING
Start ->
right click on "My Computer" ->
Manage menu item ->
double-click on Disk Management ->
Right click over Disk # name area ->
then select Properties

RDAC:
mpputil -a
mpputil -g 0

Some HBAs have add-on software (may or may not be installed - software is
not nomrally needed for fucntionalitiy - but aids in management of it)

Look in the Programs menu for:
Emulex -> HBAnyware
/usr/sbin/hbanyware/ocmanager
/usr/sbin/hbanyware/hbacmd
hbacmd
allnodeinfo
getlunlist
hbaattributes
listhbas
serverattributes
version

Qlogic -> SANsurfer
/opt/QLogic_Corporoation/SANsurferCLI/scli
scli
-g #host info
-z #host config
-z WWN #host config: ALL output in one
command
-z all #host config: ALL output in one
command
-tp #host topology
-v #version
[-x] #XML output

For a standard installation of SANsurfer FC HBA CLI on a Windows
operating
system type the following:
#msiexec /i scli-1.06.16-20.windows.msi

For a silent mode install type the following:
#msiexec /i scli-1.06.16-20.windows.msi /q

To uninstall SANsurfer FC HBA CLI using the command line, type
the
following:
#msiexec.exe /x {D4AB108C-6B03-49A3-AC9E-1D29761300C3}

NOTE: By default, the SANsurfer FC HBA CLI application is
installed in the
following directory: C:\Program files\QLogic
Corporation\SANsurferCLI.
If you want to change the applications location, enter the
directory in
the command line; for example:
#msiexec /i scli-1.06.16-20.windows.msi
installdir="c:\sansurfercli"


These tools will show you the versions and status, withtout them,
don't know what to tell you.

=============================================================================
Top of Page

Oracle ASM commands
=============================================================================

vi /etc/scsi_id.config
options=-g
#
# make this the right size "fdisk -lu | more" and find the DATA disk size
#
ASMDISKSIZE=50
for DISK in $(fdisk -lu 2> /dev/null \
| grep Disk \
| grep $ASMDISKSIZE \
| awk '{print $2}'\
| sed -e 's/://;s@/dev/@@')
do
echo $DISK
#The following command should now show the disk UUIDs:
# where X = the disk device (e.g. /dev/sdX)
scsi_id -g -u -s /block/$DISK
done
#
# Set the size for the disks you are using.
# Use "fdisk -l" to find your size and put in for the following variable.
#
ASMDISKSIZE=50
for DISK in $(fdisk -lu 2> /dev/null \
| grep Disk \
| grep $ASMDISKSIZE \
| awk '{print $2}'\
| sed -e 's/://')
do
echo $DISK
echo "32768,," | sfdisk -uS --force $DISK
done

fdisk -lu 2> /dev/null | more
asmlisttotal

NOTE: You may need to reboot after formatting the disk for all the
partitions to be recognized.

The file would list X from /dev/sdX , where X is the
unique alpha character for the device
These would be listed on seperate lines

Example: /dev/sde, /dev/sdf, /dev/sdg etc... would list:
e
f
g

# Set the size for the disks you are using. Use "fdisk -l" to find your
# size and put in for the following variable.
ASMDISKSIZE=50
fdisk -lu 2> /dev/null \
| grep Disk \
| grep $ASMDISKSIZE \
| awk '{print $2}' \
| sed -e 's/://' \
| cut -c8 \
> /tmp/myfile
udevASMrules.sh

NOTE: LOOP for each of the instances on the system, you can have a
different
udev rules for for each instance.

NOTE: You may have to edit /tmp/file and only have selected disks in it
if you have multiple instances, so you only use the right
number/qty
of disks per instance, and don't reuse disks.

udevASMrules.sh
#answer questions
# file: /tmp/myfile
# DBNAME: ----get from DBAs
# disk size: ----get from DBAs
# (will be a few GB less than what fdisk shows)

cp /tmp/99-asm.$DBNAME.rules /etc/udev/rules.d/
start_udev
asmlisttotal
/dev/oracleasm/disks

##############################################################
# SPECIAL SIZE - ASM config disk - ALWAYS do this one
##############################################################
ASMCONFIGDISKSIZE=5
DISK=$(fdisk -lu 2> /dev/null \
| grep Disk \
| grep $ASMCONFIGDISKSIZE \
| awk '{print $2}'\
| sed -e 's/://')
echo "32768,," | sfdisk -uS --force $DISK
#
# normally this should be device /dev/sdd (a "d" in myfile)
#
fdisk -lu 2> /dev/null \
| grep Disk \
| grep $ASMCONFIGDISKSIZE \
| awk '{print $2}' \
| sed -e 's/://' \
| cut -c8- \
> /tmp/myfile

udevASMrules.sh
#answer questions
# file: /tmp/myfile
# DBNAME: ASM
# disk size: 5

cp /tmp/99-asm.ASM.rules /etc/udev/rules.d/
start_udev
asmlisttotal
ls -l /dev/oracleasm/disks
#
#validate activity
#
ls -l /dev/oracleasm/disks
asmlisttotal
udevrules-check
devmap


#Check if ASM disk header is healthy
kfed read /dev/oracleasm/disks/$DISK
kfed read /dev/oracleasm/disks/DISK4 aun=0 blkn=0

#EXAMPLE OUTPUT
#kfbh.type: 1 ; 0x002: KFBTYP_DISKHEAD ###ASM disk disk name
#kfdhdb.driver.provstr: ORCLDISKDISK4 ; 0x000: length=13 ###ASMLIB
disk name
#kfdhdb.grptyp: 2 ; 0x026: KFDGTP_NORMAL
#kfdhdb.hdrsts: 3 ; 0x027: KFDHDR_MEMBER
#kfdhdb.blksize: 4096 ; 0x0ba: 0x1000
#kfdhdb.ausize: 4194304 ; 0x0bc: 0x00400000
#kfdhdb.dsksize: 1221 ; 0x0c4: 0x000004c5

#NOTES
#ASM metadata block size (blksize) is 4 KB
#allocation unit size (ausize) is 4 MB for this disk
#disk size (dsksize) is 1221 AUs, i.e 4884 MB.

#*****WARNING**** DISK WIPE *** DATA LOSS *********
#Clear out ASM info on a disk to make it look like ASM never owned/used
it
#(Removing the "private region")
DISK_PARTITION=/dev/sdd
#*****WARNING**** DISK WIPE *** DATA LOSS *********
dd if=/dev/zero of=$DISK_PARTITION bs=1024 count=100
#*****WARNING**** DISK WIPE *** DATA LOSS *********

=============================================================================
Top of Page

PowerPath commands
=============================================================================
PowerPath
Software produced and licensed by EMC (www.emc.com)

A few commands:

powermt display dev=all
powermt check_registration
powermt config
powermt save

For more see:
http://computeranddata.com/docs/notes/emc_powerpath

=============================================================================
Top of Page

Vendor Storage Frame Commands
=============================================================================
=================
EMC Symm commands (storage view from the host, needs ECC and gatekeepers)
=================
/opt/emc/SYMCLI/bin/syminq
#**OR**
/opt/emc/SYMCLI/*/bin/syminq
#OLD command: inq

DEVICES: EMC, SYMMETRIX

=================
EMC Clariion devices
=================
Vendor: DGC, Target: LUNZ, Members: RAID 5

DEVICES: DGC

=================
HDS (Hitachi Data Systems)
=================
lunstat
inqraid
raidcom get ldev -ldev_id

DEVICES: OPEN-V

=================
HP storage (rebranded HDS)
=================
xpinfo -i
xpinfo -i DISK-TARGET-NAME

DEVICES: OPEN-V

=============================================================================
Top of Page

HBA vendor sites
=============================================================================

http://www.emulex.com/products/fibre-channel-hbas.html
http://www.emulex.com/products/fc/index.html
http://www.emulex.com/ts/index.html

http://www.qlogic.com/products/fc_san_hostadapers.asp


http://www.lsilogic.com/storage_home/products_home/host_bus_adapters/index.ht
ml

http://www.attotechnology.com/fibrechannelhostadaptertechnology.html

#Dead product line - no longer shipping. There is an existing install
base.
http://www.amcc.com (URL www.jni.com will forward to the amcc site.)

=============================================================================
HBA vendor tools
=============================================================================
NOTE: Not all HBAs vendors are covered.

Emulex
Install: AutoPilot Installer (apinstall)
Management: OCmanager/HBAnyware

Qlogic
Install & Management: SANsurfer SMS (SANsurfer Mangement Suite)


=============================================================================
Emulex HBA models
=============================================================================

-----------+--------------+---------+----------+----------+---------+-------+
Bus Type PCI Express PCI-X PCI-X PCI cPCI SBus
2.0 1.0
-----------+--------------+---------+----------+----------+---------+-------+
Bus/Lane x4 up to up to up to up to
Speed 266MHz 133MHz 66MHz 66MHz 25MHz
-----------+--------------+---------+----------+----------+---------+-------+
Link Speed(1) 2/4 Gb/s 4Gb/s 2Gb/s 2Gb/s 2Gb/s 2Gb/s
-----------+--------------+---------+----------+----------+---------+-------+
================
By Business Use
================
SME LP101(3, 5)
----------------
Midrange(2) LPe1150 LP1150 LP1050(2) LP952L(2)
LP1050Ex(2) LP1050DC(2)
LP9822
----------------
Enterprise LPe11000 LP11000 LP1005DC LP9002L LP9002C(4)
LP9002S(4)
LPe11002 LP11002 LP10000 LP9002DC
LP10000ExDC LP10000DC
LP9802
LP9802DC
LP9402DC
================
By Configuration
================
Dual Port
LPe11002 LP11002 LP1005DC LP9002DC
LP10000ExDC LP10000DC
LP1050DC(2)
LP9802DC
LP9402DC
----------------
Single Port
LPe11000 LP11000 LP101(3, 5) LP9002L LP9002C(4)
LP9002S(4)
LPe1150 LP1150 LP10000 LP952L(2)
LP1050Ex(2) LP1050(2)
LP9802
LP982(2)
-------------------------------------------------------
Operating Systems:
Windows Server 2003
Windows 2000
Windows NT
Linux
NetWare
HP-UX
Solaris

Notes:
1 2Gb/s and 4Gb/s are backwards compatible to 1Gb/s
2 Windows (NT, 2000 & Server 2003), Linux and NetWare only
3 Windows (2000 & Server 2003), Linux and NetWare only
4 Solaris only
5 Available to OEMs only

=============================================================================
Qlogic HBA models
=============================================================================
ALL=Windows 2000/2003, Solaris Sparc, Linux Red Hat, Linux SuSE, Netware
SPARC=Solaris Sparc

QLA2310 PCI/PCI-X ALL 2Gb Fibre Channel - 2300 Series
QLA2310F PCI/PCI-X ALL 2Gb Fibre Channel - 2300 Series
QLA2310FL PCI/PCI-X ALL 2Gb Fibre Channel - 2300 Series
QLA2340 PCI/PCI-X ALL 2Gb Fibre Channel - 2300 Series
QLA2340L PCI/PCI-X ALL 2Gb Fibre Channel - 2300 Series
QLA2342 PCI/PCI-X ALL 2Gb Fibre Channel - 2300 Series
QLA2342L PCI/PCI-X ALL 2Gb Fibre Channel - 2300 Series
QLA2344 PCI/PCI-X ALL 2Gb Fibre Channel - 2300 Series
QCP2340 cPCI SPARC 2Gb Fibre Channel - 2300 Series
QCP2342 cPCI SPARC 2Gb Fibre Channel - 2300 Series
QSB2340 SBus SPARC 2Gb Fibre Channel - 2300 Series
QSB2342 SBus SPARC 2Gb Fibre Channel - 2300 Series
QLA2200/33 PCI ALL 1Gb Fibre Channel - 2200 Series
QLA2200/66 PCI ALL 1Gb Fibre Channel - 2200 Series
QLA2200L/66 PCI ALL 1Gb Fibre Channel - 2200 Series
QLA2200F/66 PCI ALL 1Gb Fibre Channel - 2200 Series
QCP2202F/33 cPCI SPARC 1Gb Fibre Channel - 2200 Series
QLA2202FS SBus SPARC 1Gb Fibre Channel - 2200 Series
QLA4010 PCI/PCI-X ALL 1Gb iSCSI - 4000 Series
QLA4010C PCI/PCI-X ALL 1Gb iSCSI - 4000 Series

=============================================================================
Top of Page
=============================================================================

Вам также может понравиться