Simpler Navigation for Servers and Operating Systems
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
BladeSystem Server Blades
cancel
Showing results for 
Search instead for 
Did you mean: 

Get WWN for SAS attached storage in RHEL 6

BradV
Valued Contributor

Get WWN for SAS attached storage in RHEL 6

Good Morning,

 

I have some BL460C G7's with a P700 attaching to an MSA2324sa.  The MSA2324 storage management utility is displaying the hosts with the WWN number presented from the SAS interface.  Does anyone know how to get this value from the host OS (Red Hat Enterprise Linux 6) so that I can correlate blades and host id's in the storage management utility?

 

Thanks!

4 REPLIES
Matti_Kurkela
Honored Contributor

Re: Get WWN for SAS attached storage in RHEL 6

Install the sg3_utils RPM ("yum install sg3_utils") and then run "sg_inq -i <disk_device>".

 

If you use dm-multipath, the "multipath -ll" command will display the WWN too.

MK
BradV
Valued Contributor

Re: Get WWN for SAS attached storage in RHEL 6

Thanks for the suggestion.  The problem with that is that it requires a volume to be presented to the host already.  My problem is that I have 6 new blades and thus 12 new host id's showing up in the storage management utility.  I don't have any way of knowing which host id corresponds to which blade.  I have similar setups, but they are using fibre channel.  On those, to determine the WWPN, I can do:

 

for f in 0 1; do
   echo "The WWPN for host port ${f} is:  `cat /sys/class/scsi_host/host${f}/device/fc_host/host${f}/port_name`"
done

 I would assume a similar setup is available for SAS, but I haven't found it yet.

 

I guess I might have to present a volume to one of the host ids and just start trying to see which blade it shows up on and keep repeating until I figure it out.

 

Thanks again!

Matti_Kurkela
Honored Contributor

Re: Get WWN for SAS attached storage in RHEL 6

Sorry, I misunderstood and thought you were looking for disk WWIDs.

 

But... when you have a SAS mezzanine card, isn't the corresponding I/O module a SAS switch? Then the configuration of the switch module might be the place to look. (I admit I haven't ever configured a SAS switch. The documentation says the configuration tool is called VSM for Virtual SAS Manager, and it's accessible through the OA.)

 

By the way, the pathname

/sys/class/scsi_host/host${f}/device/fc_host/host${f}/port_name

in your script is more complex than necessary. You can shorten it to:

/sys/class/fc_host/host${f}/port_name
MK
BradV
Valued Contributor

Re: Get WWN for SAS attached storage in RHEL 6

Ahh yes, I was getting lost in the soft links.  :)  Thanks!

 

I wound up going in to the Onboard Administrator and then to the interconnect bays.  I then just displayed the port mapping under the SAS switch.  That displayed the WWN for each SAS card (repeat on each switch to get the second connector WWN).  Armed with the number, I've been trying to search through the /sys file system to find the location, but haven't had any luck.  I've asked Red Hat if they know the location, but so far no answer.  Maybe SAS just doesn't get recorded?

 

If I get an answer, I'll post it.  :)

 

Regards,

 

Brad V