public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* WWN on FC LUN targets
@ 2004-07-27 20:55 Rock Gordon
  2004-07-28  0:54 ` Bryan Henderson
  0 siblings, 1 reply; 7+ messages in thread
From: Rock Gordon @ 2004-07-27 20:55 UTC (permalink / raw)
  To: linux-scsi

Hi,

I am looking at ways to find out particular WWN (world
wide names) for SCSI target LUNs connected to HBAs or
FC switches through either of the four modes available
(P2P, Fabric, AL and Fabric-AL)

Also, is there a programming interface to do this
across all available hardware? If that's not possible,
then other solutions are most welcome.

I want to be able to convert particular WWNs into
local major/minor number combination for my datacenter
SAN so that I can mount particular LUNs from any
server without worrying about changes in the device
naming conventions.

PS: can devfs solve this problem across a deployment
of 128-port FC switche connected to about 50 storage
LUNs (all FC-capable P2P linked RAID5 storage units)?
(please note that hotplug and unplug activity goes on
happening over the remaining nodes)

PS1: Please CC me since I'm not on the list (I wonder
why :) )

Thanks and regards,
Rocky


	
		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 

^ permalink raw reply	[flat|nested] 7+ messages in thread
* RE: WWN on FC LUN targets
@ 2004-07-28 14:22 David Peterson (Eng)
  2004-07-28 15:46 ` Rock Gordon
  0 siblings, 1 reply; 7+ messages in thread
From: David Peterson (Eng) @ 2004-07-28 14:22 UTC (permalink / raw)
  To: Bryan Henderson, Rock Gordon; +Cc: linux-scsi

If supported by the device, use the Device Identification VPD page
(0x83) to identify the Logical Unit. See SPC-3.
The preferred identifier type is NAA (which is a Worldwide_Name). Annex
D in FCP-2/FCP-3 may also be of assistance to you.

...Dave 

-----Original Message-----
From: linux-scsi-owner@vger.kernel.org
[mailto:linux-scsi-owner@vger.kernel.org] On Behalf Of Bryan Henderson
Sent: Tuesday, July 27, 2004 7:54 PM
To: Rock Gordon
Cc: linux-scsi@vger.kernel.org
Subject: Re: WWN on FC LUN targets

>I am looking at ways to find out particular WWN (world wide names) for 
>SCSI target LUNs

LUNS don't actually have fibre channel WWNs.  And neither do SCSI
logical units, which is probably what you meant (a LUN is a logical unit
number). 
WWNs come in two flavors - World Wide Node Name (WWNN), which identifies
a SCSI target, and World Wide Port Name (WWPN), which identifies a port
on a target.  Neither of those is what you want, since you probably have
multiple logical units per target.

If you're like most FC users, your LUNs aren't stable even within a
target, so you can't use a combination of WWNN and LUN either.

So what people use is either SCSI device serial number or SCSI device
ID. 
The latter is newer and better.  There are device IDs for targets,
ports, and logical units.  There are device IDs in each of various name
spaces, some defined by public standards.  You can read all about that
in SCSI specifications.  Device IDs are part of the Vital Product Data
(VPD).

The basic programming interface to get that information is the SCSI
INQUIRY command.

People have written programs to do the INQUIRY and give you the results
in usable form and even create the device special files named after the
device IDs.  I'm afraid I can't name one at the moment, but I hope
someone else on the list chimes in with the specifics.

You could do this with devfs, but you'd be happier doing it with a user
space program that just queries the devices at all the relevant
major/minor number combinations and creates the /dev files you want.
And the same for responding to hotplug events.  In Linux 2.6, that
process is even formalized in 'udev'.

This is, by the way, something people have been doing for years.  It's
only starting to become standard so that everyone doesn't have to write
his own.

>I can mount particular [logical units] from any server without worrying

>about changes in the device naming conventions.

Of course, naming conventions are the least of your problems.  When you
try to use the /dev/sda etc. names, they will change every time the
slightest thing in your system changes -- recabling, adding adapter
cards, changing adapter card brand, creating new LUs, and on and on.
And they will be different on every system.

-
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] 7+ messages in thread

end of thread, other threads:[~2004-08-04 17:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-27 20:55 WWN on FC LUN targets Rock Gordon
2004-07-28  0:54 ` Bryan Henderson
2004-08-01  9:05   ` Douglas Gilbert
2004-08-04 17:04     ` Rock Gordon
  -- strict thread matches above, loose matches on Subject: below --
2004-07-28 14:22 David Peterson (Eng)
2004-07-28 15:46 ` Rock Gordon
2004-07-28 17:09   ` Bryan Henderson

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