Linux SCSI subsystem development
 help / color / mirror / Atom feed
* How To Get WWN and Device Mapping
@ 2009-06-19 23:54 Paul Lung (paul.lung@loglogic.com)
  2009-06-20  0:21 ` James Bottomley
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Lung (paul.lung@loglogic.com) @ 2009-06-19 23:54 UTC (permalink / raw)
  To: linux-scsi@vger.kernel.org

Hi,

I'm using 2.6.25.14 kernel with the qla2xxx driver turned on for a SAN, and I tried to use SCLI from QLogic to get the linux device->wwn mapping. However, SCLI does not seem to be able to detect any LUNs with the driver in 2.6.25 kernel. I then found that doing a scsi_id on a device(say, ./block/sde)  will give me the wwn, with an extra number in the front. However, further research seems to indicate that scsi_id does not always give back the wwn. It's is totally dependent on the physical device being queried. 

So, is there any way to reliably get the WWN of a linux device? The qla2xxx driver must have gotten the wwn of all the drives on the SAN. Is this information "published" anywhere?

Thank you very much for your time.

Paul Lung

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How To Get WWN and Device Mapping
  2009-06-19 23:54 How To Get WWN and Device Mapping Paul Lung (paul.lung@loglogic.com)
@ 2009-06-20  0:21 ` James Bottomley
  2009-06-23 17:36   ` Paul Lung (paul.lung@loglogic.com)
  0 siblings, 1 reply; 5+ messages in thread
From: James Bottomley @ 2009-06-20  0:21 UTC (permalink / raw)
  To: Paul Lung (paul.lung@loglogic.com); +Cc: linux-scsi@vger.kernel.org

On Fri, 2009-06-19 at 16:54 -0700, Paul Lung (paul.lung@loglogic.com)
wrote:
> Hi,
> 
> I'm using 2.6.25.14 kernel with the qla2xxx driver turned on for a
> SAN, and I tried to use SCLI from QLogic to get the linux device->wwn
> mapping. However, SCLI does not seem to be able to detect any LUNs
> with the driver in 2.6.25 kernel.

You'll need to ask qlogic about their tools.

>  I then found that doing a scsi_id on a device(say, ./block/sde)  will
> give me the wwn, with an extra number in the front.

man scsi_id will tell you what this is and why it's there.

>  However, further research seems to indicate that scsi_id does not
> always give back the wwn. It's is totally dependent on the physical
> device being queried. 

For WWN this is true ... the device must export it properly via the
correct VPD inquiry for it to be displayed ... although most fibre
devices do nowadays.

> So, is there any way to reliably get the WWN of a linux device? The
> qla2xxx driver must have gotten the wwn of all the drives on the SAN.
> Is this information "published" anywhere?

I think you're confusing WWN and WWPN ... it's the latter the fibre has
to know. If it's the WWPN you're after, it's the fc_transport port_name
attribute (either of the rport or the target).

James


> 
> Thank you very much for your time.
> 
> Paul Lung--
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: How To Get WWN and Device Mapping
  2009-06-20  0:21 ` James Bottomley
@ 2009-06-23 17:36   ` Paul Lung (paul.lung@loglogic.com)
  2009-06-23 18:42     ` Douglas Gilbert
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Lung (paul.lung@loglogic.com) @ 2009-06-23 17:36 UTC (permalink / raw)
  To: James Bottomley; +Cc: linux-scsi@vger.kernel.org

Hi James,

Thank you for the reply. I'm actually looking for the WWN. The reason is I want to setup multipath, and for that I would want to know which mapped devices on my linux box actually point to the same disk. The disk array I'm using for multipath has two controllers, and therefore two WWPNs. So using WWPN would not work for this purpose.

Paul Lung

-----Original Message-----
From: James Bottomley [mailto:James.Bottomley@HansenPartnership.com] 
Sent: Friday, June 19, 2009 5:21 PM
To: Paul Lung (paul.lung@loglogic.com)
Cc: linux-scsi@vger.kernel.org
Subject: Re: How To Get WWN and Device Mapping

On Fri, 2009-06-19 at 16:54 -0700, Paul Lung (paul.lung@loglogic.com)
wrote:
> Hi,
> 
> I'm using 2.6.25.14 kernel with the qla2xxx driver turned on for a
> SAN, and I tried to use SCLI from QLogic to get the linux device->wwn
> mapping. However, SCLI does not seem to be able to detect any LUNs
> with the driver in 2.6.25 kernel.

You'll need to ask qlogic about their tools.

>  I then found that doing a scsi_id on a device(say, ./block/sde)  will
> give me the wwn, with an extra number in the front.

man scsi_id will tell you what this is and why it's there.

>  However, further research seems to indicate that scsi_id does not
> always give back the wwn. It's is totally dependent on the physical
> device being queried. 

For WWN this is true ... the device must export it properly via the
correct VPD inquiry for it to be displayed ... although most fibre
devices do nowadays.

> So, is there any way to reliably get the WWN of a linux device? The
> qla2xxx driver must have gotten the wwn of all the drives on the SAN.
> Is this information "published" anywhere?

I think you're confusing WWN and WWPN ... it's the latter the fibre has
to know. If it's the WWPN you're after, it's the fc_transport port_name
attribute (either of the rport or the target).

James


> 
> Thank you very much for your time.
> 
> Paul Lung--
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How To Get WWN and Device Mapping
  2009-06-23 17:36   ` Paul Lung (paul.lung@loglogic.com)
@ 2009-06-23 18:42     ` Douglas Gilbert
  2009-06-23 18:51       ` Giridhar Malavali
  0 siblings, 1 reply; 5+ messages in thread
From: Douglas Gilbert @ 2009-06-23 18:42 UTC (permalink / raw)
  To: Paul Lung (paul.lung@loglogic.com)
  Cc: James Bottomley, linux-scsi@vger.kernel.org

Paul,
Does 'lsscsi -tL' give you what you want in the
node_name entry?

That is for the target, 'lsscsi -tHL' would be for
the initiator.

Doug Gilbert


Paul Lung (paul.lung@loglogic.com) wrote:
> Hi James,
> 
> Thank you for the reply. I'm actually looking for the WWN. The reason is I want to setup multipath, and for that I would want to know which mapped devices on my linux box actually point to the same disk. The disk array I'm using for multipath has two controllers, and therefore two WWPNs. So using WWPN would not work for this purpose.
> 
> Paul Lung
> 
> -----Original Message-----
> From: James Bottomley [mailto:James.Bottomley@HansenPartnership.com] 
> Sent: Friday, June 19, 2009 5:21 PM
> To: Paul Lung (paul.lung@loglogic.com)
> Cc: linux-scsi@vger.kernel.org
> Subject: Re: How To Get WWN and Device Mapping
> 
> On Fri, 2009-06-19 at 16:54 -0700, Paul Lung (paul.lung@loglogic.com)
> wrote:
>> Hi,
>>
>> I'm using 2.6.25.14 kernel with the qla2xxx driver turned on for a
>> SAN, and I tried to use SCLI from QLogic to get the linux device->wwn
>> mapping. However, SCLI does not seem to be able to detect any LUNs
>> with the driver in 2.6.25 kernel.
> 
> You'll need to ask qlogic about their tools.
> 
>>  I then found that doing a scsi_id on a device(say, ./block/sde)  will
>> give me the wwn, with an extra number in the front.
> 
> man scsi_id will tell you what this is and why it's there.
> 
>>  However, further research seems to indicate that scsi_id does not
>> always give back the wwn. It's is totally dependent on the physical
>> device being queried. 
> 
> For WWN this is true ... the device must export it properly via the
> correct VPD inquiry for it to be displayed ... although most fibre
> devices do nowadays.
> 
>> So, is there any way to reliably get the WWN of a linux device? The
>> qla2xxx driver must have gotten the wwn of all the drives on the SAN.
>> Is this information "published" anywhere?
> 
> I think you're confusing WWN and WWPN ... it's the latter the fibre has
> to know. If it's the WWPN you're after, it's the fc_transport port_name
> attribute (either of the rport or the target).
> 
> James
> 
> 
>> Thank you very much for your time.
>>
>> Paul Lung--
>> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How To Get WWN and Device Mapping
  2009-06-23 18:42     ` Douglas Gilbert
@ 2009-06-23 18:51       ` Giridhar Malavali
  0 siblings, 0 replies; 5+ messages in thread
From: Giridhar Malavali @ 2009-06-23 18:51 UTC (permalink / raw)
  To: dgilbert@interlog.com
  Cc: Paul Lung (paul.lung@loglogic.com), James Bottomley,
	linux-scsi@vger.kernel.org

cat /sys/class/fc_remote_ports/rport-x:x-x/port-name will get you the  
information.

Thanks,
Giridhar.M.B


On Jun 23, 2009, at 11:42 AM, Douglas Gilbert wrote:

> Paul,
> Does 'lsscsi -tL' give you what you want in the
> node_name entry?
>
> That is for the target, 'lsscsi -tHL' would be for
> the initiator.
>
> Doug Gilbert
>
>
> Paul Lung (paul.lung@loglogic.com) wrote:
>> Hi James,
>>
>> Thank you for the reply. I'm actually looking for the WWN. The  
>> reason is I want to setup multipath, and for that I would want to  
>> know which mapped devices on my linux box actually point to the  
>> same disk. The disk array I'm using for multipath has two  
>> controllers, and therefore two WWPNs. So using WWPN would not work  
>> for this purpose.
>>
>> Paul Lung
>>
>> -----Original Message-----
>> From: James Bottomley [mailto:James.Bottomley@HansenPartnership.com]
>> Sent: Friday, June 19, 2009 5:21 PM
>> To: Paul Lung (paul.lung@loglogic.com)
>> Cc: linux-scsi@vger.kernel.org
>> Subject: Re: How To Get WWN and Device Mapping
>>
>> On Fri, 2009-06-19 at 16:54 -0700, Paul Lung (paul.lung@loglogic.com)
>> wrote:
>>> Hi,
>>>
>>> I'm using 2.6.25.14 kernel with the qla2xxx driver turned on for a
>>> SAN, and I tried to use SCLI from QLogic to get the linux device- 
>>> >wwn
>>> mapping. However, SCLI does not seem to be able to detect any LUNs
>>> with the driver in 2.6.25 kernel.
>>
>> You'll need to ask qlogic about their tools.
>>
>>> I then found that doing a scsi_id on a device(say, ./block/sde)   
>>> will
>>> give me the wwn, with an extra number in the front.
>>
>> man scsi_id will tell you what this is and why it's there.
>>
>>> However, further research seems to indicate that scsi_id does not
>>> always give back the wwn. It's is totally dependent on the physical
>>> device being queried.
>>
>> For WWN this is true ... the device must export it properly via the
>> correct VPD inquiry for it to be displayed ... although most fibre
>> devices do nowadays.
>>
>>> So, is there any way to reliably get the WWN of a linux device? The
>>> qla2xxx driver must have gotten the wwn of all the drives on the  
>>> SAN.
>>> Is this information "published" anywhere?
>>
>> I think you're confusing WWN and WWPN ... it's the latter the fibre  
>> has
>> to know. If it's the WWPN you're after, it's the fc_transport  
>> port_name
>> attribute (either of the rport or the target).
>>
>> James
>>
>>
>>> Thank you very much for your time.
>>>
>>> Paul Lung--
>>> To unsubscribe from this list: send the line "unsubscribe linux- 
>>> scsi" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux- 
>> scsi" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux- 
> scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-06-23 18:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-19 23:54 How To Get WWN and Device Mapping Paul Lung (paul.lung@loglogic.com)
2009-06-20  0:21 ` James Bottomley
2009-06-23 17:36   ` Paul Lung (paul.lung@loglogic.com)
2009-06-23 18:42     ` Douglas Gilbert
2009-06-23 18:51       ` Giridhar Malavali

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox