Solaris SAN Storage Multipath and Messages Check Script


 
Thread Tools Search this Thread
Operating Systems Solaris Solaris SAN Storage Multipath and Messages Check Script
# 1  
Old 04-17-2017
Solaris SAN Storage Multipath and Messages Check Script

Hi everybody,

i am working on the new script , its job discover the Storage Env ( especially MultiPATH ) and FC cards for solaris 11 sparc systems for now..
script is seem working ( but may contain any mistakes or bug ) on the oracle Qlogic fc cards on Emc_VMAx systems and Solaris 11 Sparc_64 systems...


examples ?
================


1-) interactive menu
---------------------

Code:
# ./solaris_san_fc_check n

--> selectable menu view ( can see some usable parameters in below )
=========================================================================================
Code:
      -------------------------------------------------
      | SOLARIS SPARC MPATH/HBA/SAN/DISK INFORMATIONs |
      -------------------------------------------------
      1-) HBA states [online/offline]:
      2-) HBA-LUN-PORT General Informations:
      3-) HBA-LUN-PORT-PATH Specific Informations: (WWN)

      4-) Storage[EMC/IBM/HITACHI] Disks [MPxIO]: (LABEL_NAME or DISK ID)
      5-) Storage[EMC/IBM/HITACHI] Disks [LABEL -> DISK ID MATCH]: (LABEL_NAME)
      6-) Storage[EMC/IBM/HITACHI -> Host WWN ]: (WWN)
      7-) Storage[EMC/IBM/HITACHI -> Remote WWN ]: (PWWN)
      8-) Storage[EMC/IBM/HITACHI -> WWN_PWWN_LUN ]: (LABEL_NAME or DISK ID)
      9-) Non MPxIO Disks List:
     10-) Disks Errors: (LABEL_NAME)
     11-) Extendend Infos [LUN-WWN-RWWN-NWWN-PATHS (ONLINE/OFFLINE)]: (LABEL_NAME or DISK ID)

     12-) Inq Infos [[EMC/IBM/HITACHI Device-Serial-WWN-Label]: (LABEL_NAME or DISK ID)
     13-) Inq Infos [DEVICE-VEND-PROD-REV-SER NUM-CAP(kb)]: (DISK ID)
     14-) Inq HBA Infos [HBA-Vendor-Port Type-Speed]: (Host WWN)

     15-) DMESG ERROR ANALYZER: '[dd][fs][mm][ ,;][dd][fs][mm]'

     [ ALL parameters is OPTIONAL (AVALIABLE PARAMETERS SPECIFIED in the PARENTHESES) ]
================================================================================

Usage -> ./solaris_san_fc_check [y|ny|yy|n : Re-Scan the system force [y]es or [n]o] [menu_nr: (1-15)] [parameters]
================================================================================

Select Storage Informations ... [1-15] [q/x] ?


NOTE : script tries to getting some informations from system on FIRST execution therefore maybe its take long time !! ( ex : 3-4-11 )



2-) non-interactive ( command-line )
-------------------------------------

Code:
# ./solaris_san_fc_check n 2

--> no ( use NO for getting the new infos ) -> use OLD informations but but if there is OLD informations.. ( which cached in tmp dir )
Code:
# ./solaris_san_fc_check 2

--> default ( use OLD ( DEFAULT : if OLD informations usable then use it ) informations..
Code:
# ./solaris_san_fc_check y 2

--> yes ( use YES for getting new infos but if there is NOT OLD informations ) ->
Code:
# ./solaris_san_fc_check yy 2

--> yesyes ( FORCE use YES for getting new infos ) -> non-interactive with NEW informations
......

Some outputs :
=================================
Code:
# ./solaris_san_fc_check n 2

System HBA Info
-----------------------------------------------------------------
                      8 X FC_port ( Total )
                       [ c3 c7 c8 c9 c10 c21 c22 c23 ]

                      8 X FC_port ( Connected )
                       [ c3 c7 c8 c9 c10 c21 c22 c23 ]

                      2 X FC_port inactive ( Unconfigure )
                       [ c3 c8 ]

                      2 X FC_port disconnected ( Disconnected )
                       [ c3 c8 ]

                      6 X FC_port initialized state ( Configured )
                       [ c7 c9 c10 c21 c22 c23 ]

						...........................

Code:
# ./solaris_san_fc_check 3|more

FC Port WWN XXXXXXXXXXXXXXXX  -> PCIE3.[1] <-   ( online )
##############################################################################################################
FC HBA (Host)           Path             Remote                             LUN:                      Label
Port WWN             Channel                WWN
##############################################################################################################
XXXXXXXXXXXXXXXX          c7         YYYYYYYYYYYYYYYY      c0t60000xxxxxxxxxxxxxxxxxxxxxxxxxxxxd0s2   testLBL1
                                                           c0t60000xxxxxxxxxxxxxxxxxxxxxxxxxxxxd0s2   testLBL1
                                                           c0t60000xxxxxxxxxxxxxxxxxxxxxxxxxxxxd0s2   testLBL1
														   ...........................

Code:
# ./solaris_san_fc_check 4|more
###############################################################################################################
Disk/Vendor_Product/Size                     Label Name         WWPN,LUN                WWN             STATE
###############################################################################################################
============================================
c0t60000xxxxxxxxxxxxxxxxxxxxxxxxxxxd0         testLBL1                       8 x Path
[EMC_SYMMETRIX]
(262147.500 MB)
============================================
/devices/pci@380/pci@1/pci@0/pci@7/SUNW,qlc@0/fp@0,0          YYYYYYYYYYYYYYYY,f    xxxxxxxxxxxxxxxx    ONLINE
/devices/pci@380/pci@1/pci@0/pci@7/SUNW,qlc@0/fp@0,0          YYYYYYYYYYYYYYYY,f    xxxxxxxxxxxxxxxx    ONLINE
/devices/pci@380/pci@1/pci@0/pci@7/SUNW,qlc@0/fp@0,0          YYYYYYYYYYYYYYYY,f    xxxxxxxxxxxxxxxx	ONLINE
/devices/pci@380/pci@1/pci@0/pci@7/SUNW,qlc@0/fp@0,0          YYYYYYYYYYYYYYYY,f    xxxxxxxxxxxxxxxx	ONLINE
...........................

Code:
# ./solaris_san_fc_check 5 testLBL1

testLBL1 (8 x disk device)
===========================
c0t60000xxxxxxxxxxxxxxxxxxxxxxxxxxxd0
c0t60000xxxxxxxxxxxxxxxxxxxxxxxxxxxd0
c0t60000xxxxxxxxxxxxxxxxxxxxxxxxxxxd0
c0t60000xxxxxxxxxxxxxxxxxxxxxxxxxxxd0
c0t60000xxxxxxxxxxxxxxxxxxxxxxxxxxxd0
c0t60000xxxxxxxxxxxxxxxxxxxxxxxxxxxd0
c0t60000xxxxxxxxxxxxxxxxxxxxxxxxxxxd0
c0t60000xxxxxxxxxxxxxxxxxxxxxxxxxxxd0


( my favourite )
Code:
# ./solaris_san_fc_check 11 testLBL1
.....
.....

Disk Boundary
--------------------------------------------------------------------------------------------------------------
MPATH LUN ID                                  Vendor                          Size                  Label_Name
--------------------------------------------------------------------------------------------------------------
c0t60000xxxxxxxxxxxxxxxxxxxxxxxxxxxd0s2       EMC_SYMMETRIX                 524295.000 MB            testLBL1
==============================================================================================================

================================================================================
PCI Addres    Path              HBA Device
HBA           Channel                Path
================================================================================
PCIE7[1]      /dev/cfg/c10  /devices/pci@340/pci@1/pci@0/pci@6/SUNW,qlc@0,1/fp@0,0
================================================================================
                                                  |
                                                  |
                                                  ===================================================
                                                  Host WWN                Remote WWN           Status
                                                  ===================================================
                                                  210000xxxxxxxxxx     50000yyyyyyyyyyy,xx     ONLINE
                                                  210000xxxxxxxxxx     50000yyyyyyyyyyy,xx     ONLINE
                                                  210000xxxxxxxxxx     50000yyyyyyyyyyy,xx     ONLINE
                                                  210000xxxxxxxxxx     50000yyyyyyyyyyy,xx     ONLINE

...............
..................


-> messages parser
Code:
# ./solaris_san_fc_check 15 1/mar

Error Message part
--------------------------------------------------------------------------------

Mar 15 04:45:42 xxxxxxx scsi: [ID 107833 kern.warning] WARNING: /scsi_vhci/ssd@gc0t60000xxxxxxxxxxxxxxxxxxxxxxxxxxx (ssd108):
Mar 15 04:45:42 xxxxxxx         drive offline
----------------------------------------------------------------------


----------------------------------------------------------------------------------------
                         ->>>>>> ERROR ANALYSIS ->>>>>>
----------------------------------------------------------------------------------------

Logical Path
==================================================
Disk logical path cannot be found for [ c0t60000xxxxxxxxxxxxxxxxxxxxxxxxxxx ] !!
======================================================================

Disk Label
==================================================
Disk label not detected [ c0t60000xxxxxxxxxxxxxxxxxxxxxxxxxxx ] !!
======================================================================

SSD/Disk
==================================================
Disk ctd name not detected [ ssd108 ] !!
======================================================================
						
	
                END_END_END_END_END
----------------------------------------------------------------------


* i think and wonder , when it works on the other systems , will it get the some errors ( big probably ) ??


->> if you have a system like below


* Solaris ( Sparc ) 10 on older systems ( sun fire / fujitsu / netra / sun blade env ) and maybe other Solaris ( x86 -> rackmount / netra ) platforms ?
* have other storage systems ( fujitsu , hitachi , dell ... )
* have other hba cards ( native drivers ( like non-oracle emulex triggers may be gives some errors related "luxadm errors" ? )
* have other raid cards ( i dont know which utility runs for the "non-LSI SCSI raid controller ( which i have "sas2ircu" ) cards ? )



i want to share this for that may will be usefull some points and we can improves together..
can you test it for functions of the script and can you share if you get the errors while testing this functions..


thanks already all @unix.com family
ygemici @unix.com
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

Solaris 10, adding new LUN from SAN storage

Hello to all, Actually, currently on my Solaris box, I've a LUN (5TB space) from a EMC storage which is working fine, and a partition with ZFS filesystem is created for that LUN. as further you'll see in the logs, the "c4t6006016053802E00E6A9196B6506E211d0s2" is the current configured LUN in the... (4 Replies)
Discussion started by: Anti_Evil
4 Replies

2. Emergency UNIX and Linux Support

Oracle/Xen/OVM/OCFS2/Multipath/SAN Problems

Setup: Multiple Virtual Machines running OEL5 / Oracle RDBMS 11.2 OVM 2 / Xen 3.4.0 Cluster consisting of 3 Machines Shared SAN Storage synced with OCFS2 SAN connected with 4GB FC on 4 Paths per LUN SAN target are 2 EMC Clariion mirroring each other The problems we're facing are that... (6 Replies)
Discussion started by: pludi
6 Replies

3. AIX

New to San Storage

Can anyone recommend a good book on san storage basics and how it communicates with an AIX server? (1 Reply)
Discussion started by: NycUnxer
1 Replies

4. Shell Programming and Scripting

Script to check the SAN paths.

Hello All, We have a script which when run on the host gives us the status of the internal and SAN attached disks, its paths and other information. The output of which is as follows: Nm DEVICE VEND PROD LunID SYM DevID DISKGROUP SIZE N E... (3 Replies)
Discussion started by: mahive
3 Replies

5. UNIX for Advanced & Expert Users

Shell script to check the SAN dual path.

Hello, I would like to create a shell script which would check whether the hosts have SAN dual path or not. If yes, then I should get a success message, else should get a list of hosts on which SAN dual path is not working. Thanks.. (4 Replies)
Discussion started by: mahive
4 Replies

6. UNIX for Dummies Questions & Answers

Storage from SAN

hi guys I installed Centos 5.5 (local disk). I am using 2 HBAs Now I mapped 5 LUNs from a Storage. I will be using LVM just to test I assigned a LUN I've read I have to use multipath to avoid my Centos see the LUN twice I enabled mdmpd and multipathd... something else I should do? ... (8 Replies)
Discussion started by: kopper
8 Replies

7. Red Hat

how do we check SAN storage?

Hello, I am using LINUX OS. I want to check what is the SAN storage size. How do i check this in server? Any help is really appreciated.. (3 Replies)
Discussion started by: govindts
3 Replies

8. Solaris

SAN Storage to solaris 10 server

Hi, I have configured our SAN Storage to be connected to our new SUN T5220. On the SAn it looks all fine on the server I do not see any connection: cfgadm -al Ap_Id Type Receptacle Occupant Condition c1 scsi-bus connected ... (4 Replies)
Discussion started by: manni2
4 Replies

9. Filesystems, Disks and Memory

Switching SAN storage

Hi, I have an existing SUN server that has a SAN storage installed on it. It also has softwares like Appwrox(scheduler), Taradata (database client), Samba Share and a few more installed on it. Now suppose that I have a new unix server server and i switch the same SAN store from the old unix... (1 Reply)
Discussion started by: myloginid
1 Replies
Login or Register to Ask a Question