Find WWN and WWPN in Solaris

How do you find out WWN and WWPN of HBA in Solaris server?

Here is the quick way to get wwnn and wwpn in Solaris:
testuser@testsunsrv # /usr/sbin/prtconf -vp | grep -i wwn
            port-wwn:  210000e0.4m1e143f
            node-wwn:  200000e0.4m1e143f
            port-wwn:  210100e0.4m3e143f
            node-wwn:  200000e0.4m3e143f
            port-wwn:  21000003.fc2f1c36
            node-wwn:  20000003.fc2f1c36
            port-wwn:  210000e0.4m103794
            node-wwn:  200000e0.4m103794
            port-wwn:  210100e0.4m303794
            node-wwn:  200000e0.4m303794
            port-wwn:  210000e0.4m0a575b
            node-wwn:  200000e0.4m0a575b
            port-wwn:  210100e0.4m2a575b
            node-wwn:  200000e0.4m2a575b
            port-wwn:  210000e0.4m0a55ab
            node-wwn:  200000e0.4m0a55ab
            port-wwn:  210100e0.4m2a55ab
            node-wwn:  200000e0.4m2a55ab

testuser@testsunsrv #  prtpicl -v -c scsi-fcp | grep -i wwn
  :node-wwn      20  00  00  e0  4m  1e  14  3f
  :port-wwn      21  00  00  e0  4m  1e  14  3f
  :node-wwn      20  00  00  e0  4m  3e  14  3f
  :port-wwn      21  01  00  e0  4m  3e  14  3f
  :node-wwn      20  00  00  03  fc  2f  1c  36
  :port-wwn      21  00  00  03  fc  2f  1c  36
  :node-wwn      20  00  00  e0  4m  10  37  94
  :port-wwn      21  00  00  e0  4m  10  37  94
  :node-wwn      20  00  00  e0  4m  30  37  94
  :port-wwn      21  01  00  e0  4m  30  37  94
  :node-wwn      20  00  00  e0  4m  0a  57  5b
  :port-wwn      21  00  00  e0  4m  0a  57  5b
  :node-wwn      20  00  00  e0  4m  2a  57  5b
  :port-wwn      21  01  00  e0  4m  2a  57  5b
  :node-wwn      20  00  00  e0  4m  0a  55  ab
  :port-wwn      21  00  00  e0  4m  0a  55  ab
  :node-wwn      20  00  00  e0  4m  2a  55  ab
  :port-wwn      21  01  00  e0  4m  2a  55  ab
testuser@testsunsrv #

Just grep for "port-wwn" in the above command to see only WWPN. In most of the cases, WWPN is the required information for storage zoning.

testuser@testsunsrv #  prtpicl -v -c scsi-fcp | grep -i port-wwn
 Hope this helps..!

hpacucli - Check RAID Information from Linux Shell

Have you ever tried to check how the hardware RAID Array configured on server from your Linux Shell? Have you ever wanted to change or modify your Hardware RAID configurations without rebooting the server and without leaving your Linux shell?

hpacucli utility is there to help you, If your server is HP Hardware. hpacucli  (HP Array Configuration Utility CLI) is a command line based disk configuration program for Smart Array Controllers and RAID Array Controllers. You can download and  install hpacucli tool from HP website.

Quick Abbreviations:
chassisname = ch
controller = ctrl
logicaldrive = ld
physicaldrive = pd
drivewritecache = dwc

As root, just type "hpacucli" and you will be into hpacucli command line interface. Let me give you a quick example of what you can do with this hpacucli.

To Get the quick details about the RAID controller and its Health:
=> ctrl all show status

Smart Array P400 in Slot 9
   Controller Status: OK
   Cache Status: OK
   Battery Status: OK

=>
To get a quick idea of How the disks are grouped and which raid level used:

=> ctrl all show

Smart Array P400 in Slot 9           (sn: PXXXXXXXXXXXXX)

=> ctrl all show config

Smart Array P400 in Slot 9           (sn: P6YYYYYYYYYYYY)

   array A (SAS, Unused Space: 0 MB)

      logicaldrive 1 (68.3 GB, RAID 1, OK)

      physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 72 GB, OK)
      physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 72 GB, OK)

To Get complete details about how the raid configured in the server:

=> ctrl all show config detail

Smart Array P400 in Slot 9
   Bus Interface: PCI
   Slot: 9
   Serial Number: PXXXXXXXXX
   Cache Serial Number: PAXXXXXXXXT
   RAID 6 (ADG) Status: Enabled
   Controller Status: OK
   Chassis Slot:
   Hardware Revision: Rev D
   Firmware Version: 7.08
   Rebuild Priority: Medium
   Expand Priority: Medium
   Surface Scan Delay: 15 secs
   Post Prompt Timeout: 0 secs
   Cache Board Present: True
   Cache Status: OK
   Accelerator Ratio: 25% Read / 75% Write
   Drive Write Cache: Disabled
   Total Cache Size: 512 MB
   Battery Pack Count: 1
   Battery Status: OK
   SATA NCQ Supported: True

   Array: A
      Interface Type: SAS
      Unused Space: 0 MB
      Status: OK

      Logical Drive: 1
         Size: 68.3 GB
         Fault Tolerance: RAID 1
         Heads: 255
         Sectors Per Track: 32
         Cylinders: 17562
         Stripe Size: 128 KB
         Status: OK
         Array Accelerator: Enabled
         Unique Identifier: 600508XXXXXXXXXXXXXXXX0002
         Disk Name: /dev/cciss/c0d0
         Mount Points: /boot 103 MB, swap 8.0 GB
         Logical Drive Label: A08923XXX61630G9SVI3RJCC0A
         Mirror Group 0:
            physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 72 GB, OK)
         Mirror Group 1:
            physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 72 GB, OK)

      physicaldrive 1I:1:1
         Port: 1I
         Box: 1
         Bay: 1
         Status: OK
         Drive Type: Data Drive
         Interface Type: SAS
         Size: 72 GB
         Rotational Speed: 10000
         Firmware Revision: HPDA
         Serial Number:         PXXXXXXA
         Model: HP      DG072A4951
         PHY Count: 1
         PHY Transfer Rate: Unknown
      physicaldrive 1I:1:2
         Port: 1I
         Box: 1
         Bay: 2
         Status: OK
         Drive Type: Data Drive
         Interface Type: SAS
         Size: 72 GB
         Rotational Speed: 10000
         Firmware Revision: HPDA
         Serial Number:         PXXXXXXA
         Model: HP      DG072A4951
         PHY Count: 1
         PHY Transfer Rate: Unknown

=>
 Be sure to verify your version of hpacucli and refer the ReadMe always, before you trying to modify the configuration of RAID or Smart Array controllers.