HBA Hard reset / HBA Brands / HBA-Lpfc drivers upgrade

# luxadm -e port
Found path to 4 HBA ports
/devices/pci@9c,600000/SUNW,emlxs@1/fp@0,0:devctl NOT CONNECTED
/devices/pci@9c,600000/SUNW,emlxs@1,1/fp@0,0:devctl NOT CONNECTED
/devices/pci@9d,600000/SUNW,emlxs@1/fp@0,0:devctl CONNECTED
/devices/pci@9d,600000/SUNW,emlxs@1,1/fp@0,0:devctl NOT CONNECTED

# cfgadm -o show_FCP_dev -al
Ap_Id Type Receptacle Occupant Condition
c2 fc connected configured unknown
c2::5006048452a7aa4d,1 disk connected configured failing
c2::5006048452a7aa4d,2 disk connected configured failing
c3 fc connected unconfigured unknown
c4 fc-fabric connected configured unknown
c4::5005076801202c7a disk connected configured unusable
c4::5005076801202f34 disk connected configured unusable
c4::5005076801202ff7 disk connected configured unusable
c4::5005076801202ffa disk connected configured unusable
c4::5005076801203009 disk connected configured unusable
c4::50050768012030d3 disk connected configured unusable
c4::5006048452a7aa42,0 disk connected configured unknown
c4::5006048452a7aa42,1 disk connected configured unknown
c4::5006048452a7aa42,2 disk connected configured unknown
c4::5006048452a7aa4c,0 disk connected configured unknown
c4::5006048452a7aa4c,1 disk connected configured unknown
c4::5006048452a7aa4c,2 disk connected configured unknown
c5 fc connected unconfigured unknown
#/opt/EMLXemlxu/bin/emlxadm
Available commands: [rev2]

get_num_devs – Returns the number of FC devices seen by this HBA.
get_dev_list – Returns a list of FC devices seen by this HBA.
get_logi_params <wwpn> – Returns the login paramters for a specified FC device.
get_host_params – Return the host parameters.
get_sym_pname – Returns the symbolic port name of a device.
set_sym_pname <string> – Sets the symbolic port name for a device.
get_sym_nname – Returns the symbolic node name of a device.
set_sym_nname <string> – Sets the symbolic node name for a device.
dev_login <wwpn> – Performs an FC login to a device.
dev_logout <wwpn> – Performs an FC logout to a device.
get_state <wwpn> – Returns current Leadville state of a specified device.
dev_remove <wwpn> – Remove the FC device from Leadville management.
link_status <d_id> – Request link error status from a specified D_ID.
get_fcode_rev – Returns the current Fcode revison of the HBA.
download_fcode [filename] – Download the HBA fcode.
get_fw_rev – Returns the current firmware revison of the HBA.
download_fw [filename] – Download the HBA firmware.
get_boot_rev * Returns the current boot revison of the HBA.
download_boot [filename] * Download the HBA boot image.
get_dump_size – Returns the HBA’s firmware core dump size.
force_dump – Force a firmware core dump on this HBA.
get_dump <-t,-b> <file> – Saves firmware core dump to a file.
get_topology – Returns the current FC network topology.
reset_link <wwpn,0> – Resets the link of a specified FC device.
reset_hard – Reset the HBA.
reset_hard_core – Reset the HBA firmware core.
diag <test> – Perform a diagnostic test on the HBA.
ns – Performs a complete query of the fabric name server.
parm_get_num * Returns the total number of configurable parameters.
parm_get_list * Returns a list of configurable parameters.
parm_get <label> * Gets the value of a specified parameter in the driver.
parm_set <label> <val> * Sets the value of a specified parameter in the driver.
msgbuf all or <number> [-i interval] * Returns the driver’s internal message log.
get_host_attrs – Returns the host adapter and port attributes.
get_port_attrs <index>, <wwn> or all – Returns the port attributes.
get_path <index> – Returns the adapter path.
get_vpd * Returns the adapter’s Vital Product Data (VPD).
q – Exits this program.
h – Returns this help screen.
hba – Select another hba.
p – Repeat previous command.

*Emulex adapters only
emlxadm> get_dev_list
ioctl: FCIO_GET_DEV_LIST2: Invalid argument
fcio: FCIO_GET_DEV_LIST: No map available.
emlxadm> reset_hard
ioctl: FCIO_RESET_HARD: I/O error
fcio: FCIO_RESET_HARD: Port offline


Note that the reverse of this is not true – the native Emulex “lpfc” driver is not supported for use with a Sun branded FC HBA in Solaris.
Document Body: Top

Use the “/usr/sbin/prtconf -vp” or “/usr/sbin/prtpicl -v” command to determine the following five properties of the FC HBA :

– model
– vendor-id
– device-id
– subsystem-vendor-id
– subsystem-id

If the “model” ends in “-S” then the FC HBA is a Sun branded model.
If the “model” ends in “-E” then the FC HBA is a EMC branded model.
If the “model” ends without extension then the FC HBA is a Emulex branded model.

The remaining four properties can be used to confirm this. For all Emulex based HBA’s, both Sun and Emulex branded, the following two properties will be the same :

vendor-id = 10df
subsystem-vendor-id = 10df

The “device-id” and “subsystem-id” will vary, depending if the FC HBA is Sun branded or Emulex branded. If this is a Sun branded FC HBA, then they will be as follows :
HBA device-id subsystem-id model
Sun SG-XPCI1FC-EM2 fc00 fc00 LP10000-S
Sun SG-XPCI2FC-EM2 fc00 fc00 LP10000DC-S
Sun SG-XPCIE1FC-EM4 fc20 fc21 LPe11000-S
Sun SG-XPCIE2FC-EM4 fc20 fc22 LPe11002-S


1 # mkdir /var/tmp/PWP717326 ; mkdir /var/tmp/PWP717326/emulex ; mkdir /var/tmp/PWP717326/patches
2 Upload patches.zip to /var/tmp/upgrade OS Patches for host
3 Upload lpfc-6.10gfX1-sparc.tar to /var/tmp/emulex lpfc-6.10gfX1-sparc.tar
4 echo | format > /var/tmp/PWP717326/format.pre format output
5 # df -k > /var/tmp/PWP717326/df-k.pre Disk mount information
6 # mount > /var/tmp/PWP717326/mount.pre More disk mount information
7 # /opt/SUNWexplo/bin/explorer Run Sun Explorer and save output to PC
8 # eeprom > /var/tmp/PWP717326/eeprom.out Sun eeprom settings backup
9 # cp -p /etc/vfstab /var/tmp/PWP717326/vfstab.backout Backup vfstab
10 # cp -p /etc/vfstab /etc/vfstab.backout for editing vfstab
11 # cp -p /etc/vfstab /etc/vfstab.<Date> Create copy of vfstab for later use
12 #cp -p /etc/system /etc/system.<Date>
13 #cp -p /kernel/drv/lpfc.conf  /kernel/drv/lpfc.conf.<date> Create a backup of Emulex configuration file
#cp -p /kernel/drv/sd.conf  /kernel/drv/sd.conf.<date> Create a backup of lpfc target file
14 # cp -p /etc/patch_to_inst /etc/path_to_inst.<date>
15 # vi /etc/vfstab.backout Prepare host to be able to be backed out a sample /etc/vfstab is there on appendix #1
16  /etc/powermt display > /var/tmp/PWP717326/powermt.out Save a copy of PowerPath info
17  /etc/powermt display dev=all > /var/tmp/PWP717326/powermt.dev.out Save a copy of PowerPath link details
18  vxdisk -o alldgs list >  /var/tmp/PWP717326/vxdisk.alldgs.list.out Save off Veritas info
19  /usr/local/bin/inq > /var/tmp/PWP717326/inq.out Save off disk info
20  vxdisk list > /var/tmp/PWP717326/vxdisklist.pre Total of ?? disks
21  vxprint -ht  >  /var/tmp/PWP717326/vxprint.pre
22  df -k > /var/tmp/PWP717326/df-k.pre Total of ?? ufs filesystems.
 
Phase 1 Phase 1 – Prepare and verify backout
1 #metastat Check for the status of metadevices before detach
2 #metadetach d0 d2 Detach /
3 #metadetach d3 d5 Detach swap
4 #metadetach d6 d8 Detach /var
5 #metadetach d9 d11 Detach /opt
7 #metadetach d12 d14 Detach /home partitions mirror
8 # installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c1t0d0s0 Put a boot block onto rootmirrordisk
9 #metastat Check for the status of metadevices
10 # umount /mnt Remove mounts on /mnt (should be none)
11 # mount /dev/dsk/c1t1d0s0 /mnt Mount backout root to make sure its boots.
12 # cp -p /etc/vfstab.backout /mnt/etc/vfstab Copy in the modified vfstab
13 #cat /mnt/etc/vfstab Check over vfstab on backout system
16 metaroot -k /mnt/etc/system -v /mnt/etc/vfstab d2 Update system/vfstab file of backout mirror
umount /mnt
17 #eeprom auto-boot?=false For not booting automatically after reboot
Login as root@console
18 #/usr/sbin/shutdown -i0 -g0 -y shutdown and halt
19 OK> boot  rootmirrordisk -s Boot into single user mode on backout mirror
20 # mount /opt Need to mount /opt to check
21 # mount /tmp Need to mount /tmp
21 # df -k Check backout is OK.
22 Login as root@console
Go/Nogo Point (don’t continue if backout fails)
23 #/usr/sbin/shutdown -i0 -g0 -y shutdown and halt
24 OK> boot  -s Boot normal system into single user mode
25 Login as root@console
26 export TERM=vt100
27 export EDITOR=vi
28 # mount /opt Need to mount /opt to check
29 # mount /tmp Need to mount /tmp
30 # df -k Check normal OS is OK.
GO / NOGO Point (Do not continue if backout mirror boot fails)
Phase 2 Apply Patches  
1 # cd /var/tmp/PWP717326/patches
2 #patchadd 108528-29 Solaris 5.8 Kernel patch
3 #patchadd 108974-54 Solaris 5.8 sd patch
4 #patchadd 109657-11 Solaris 5.8 isp patch
5 #patchadd 109885-20 Solaris 5.8 glm driver patch
6 #patchadd 117000-05 SRM & VxFS kernel patch
7 #patchadd 117350-49 kernel patch fix
8 #patchadd 112392-08 VxVM version 3.5 patch
9 #showrev -p | grep 108528-29
10 #showrev -p | grep 108974-54
11 # showrev -p | grep 109657-11 Check 108528-54 installed
12 # showrev -p | grep 109885-20 Check 17350-47 installed
13 # showrev -p | grep 117000-05 Check 116681-02 installed
14 #showrev -p | grep 117350-49
15 #showrev -p | grep 112392-08
16 #/usr/sbin/shutdown -i0 -g0 -y Shutdown the machine
17 ok boot  -rs Reconfigure Reboot
18 exit Check if system comes to run level 3
19 Login as root@console
20 Check system boots correctly.
21 telnet to server and check login is successful
34
Phase 3 Install   Emulex lpfc Driver  
1 #/usr/sbin/shutdown -i0 -g0 -y Shutdown the machine
2 ok boot  -s Booting in Single User mode
3 pkgrm HBAnyware Removing the Dependency HBAnyware for lpfc
   
Upgrading the lpfc Drivers  
5 pkgrm lpfc Remove the existing lpfc drivers
6 cp -p /etc/path_to_inst.<date>  /etc/path_to_inst
7 cd /var/tmp/PWP717326/emulex
8 tar -xvf  lpfc-6.10gfX1-sparc.tar
9 pkgadd -d lpfc.1
10 cp -p /kernel/drv/sd.conf.<date>  /kernel/drv/sd.conf Copy the /usr/tmp/sd.conf.pkgrm file back to /kernel/drv/sd.conf
11 cp -p  /kernel/drv/lpfc.conf.<date> /kernel/drv/lpfc.conf Update the configuration parameters in /kernel/drv/lpfc.conf with the values from /usr/tmp/lpfc.conf.pkgrm
12 Installing HBAnyware
13 cd /var/tmp/PWP717326/emulex/
14 pkgadd -d HBAnyware
HBA  Fcode upgradation
/usr/sbin/lpfc/lputil

2. From the Main menu, enter 3, Firmware Maintenance.

3. From the list that appears, choose the HBA onto which you want to update boot code.

4. Enter 1, Load Firmware Image.

5. Enter the full path to the boot code image file. Boot code                                                images have a .PRG extension. The

new boot code is transfered to flash ROM.

6. Repeat steps 3 through 5 to update the boot code on additional HBAs.

HBA Fcode upgradation through lputil utility
Phase 4 Power path Upgradation
1 /opt/EMCPower/EMCpower/bin/powermt save

cp -p /etc/powermt.custom /etc/powermt.custom.saved

 

Backup
/etc/init.d/eccmad stop Stop EMC monitoring agent
2 pkgrm EMCpower Remove the older version
3 chmod +r /etc/powermt.custom.saved Requirements when upgrading
init 0 Shutdown to OBP
4  
5 OK> boot -s Boot the system to single user mode
6 # cd /var/tmp/PWP717326/powerpath Go to the  dir
7 # gunzip EMCPower.SOLARIS.4.5.0.tar.gz Gunzip the software
# tar -xvf EMCPower.SOLARIS.4.5.0.tar Untar the software
8 # pkgadd -d . Add the package
9 # init 0 Shutdown the host to OBP
OK> reboot — -r Boot the system to multiuser mode
10 Login via root@ console
11 configure PowerPath:

 # export PATH=$PATH:/etc

Configuring the powepath
#pwermt unmanage class=hphsx
12 #powermt save
13 #reboot
# pkginfo -l EMCpower Verify the powerpath is installed
14 # modinfo | grep emcp Verify the PowerPath kernel extension is loaded on the host
15 # powermt display dev=all Verify the PowerPath devices are configured on the host
# powermt check_registration    It should show  Key B3P3-HB43-CFMR-Q2A6-MX9V-O9P3

Product: PowerPath

Capabilities: All

16 if the above command is not showing licence then run following commands

 # emcpreg -install

 > Enter License Key:  B3P3-HB43-CFMR-Q2A6-MX9V-O9P3

Enter License
17 If the output of powermt display dev=all indicates that some storage system logical devices are not configured as Powerpath devices ( Go to next command otherwise no need to exceute powercf -q and powermt config command and reboot command )
18 # powercf -q Configure any missing logical devices
19 # powermt config Configure any missing logical devices
# reboot — -r Reboot the system
20 Login via root@ console
21 # powermt display dev=all Verify the PowerPath devices are configured on the host
# /etc/init.d/eccmad start Start EMC monitoring agent
22 # inq Check disk information
Phase 5 Modify /kernel/drv/lpfc.conf and /etc/system
Modify /kernel/drv/lpfc.conf
no-device-delay=0 no-device-delay set incorrectly to 1. Correct value is 0 seconds
scan-down=0 scan-down set incorrectly to 2. Correct value is 0 for FC-SW topology
Modify /etc/system file
vi /etc/system
set fcp:ssfcp_enable_auto_configuration=1
set ssd:ssd_max_throttle=20 Check if system comes to run level 3
forceload: drv/ssd
set sd:sd_io_time=0x3c
touch /reconfigure
# /usr/sbin/shutdown -i6 -g0 -y Reconfigure Reboot
 
Phase 6 Phase 5 – PVT and rejoin mirrors
Await successful completion of application PVT (If PVT fails, perform backout – Do Not Continue,contact SDM/NOM), If PVT passes then wait for 1 day to attch the mirrors.
# metattach d0 d2 Attach and Sync the backout root
# metattach d3 d5 Attach and Sync the backout swap
# metattach d6 d8 Attach and Sync the backout /var
# metattach d9 d11 Attach and Sync the backout /opt
# metattach d12 d14 Attach and Sync the backout /home
# metastat | grep -i sync Wait for background resync to finish