public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* iSCSI device naming issues
@ 2004-07-01 13:58 Surekha.PC
  2004-07-01 15:57 ` Mike Anderson
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Surekha.PC @ 2004-07-01 13:58 UTC (permalink / raw)
  To: 'SCSI Mailing List'


Whenever an iSCSI device is configured in the system, a hotplug
event is generated which invokes udev for device node creation.
iSCSI driver has a CALLOUT rule for udev to generate a unique
name for iSCSI devices.

The iSCSI callout program receives a sysfs device path like
/sys/block/sdc whenever a block device is added. From the device
symlink under /sys/block/sdc, it obtains the corresponding device
path under /sys/devices/.. . It extracts the device quadruple
(c,b,t,l) and identifies iSCSI device by parsing the path
/sys/class/scsi_host/iscsi/c:b:t:l. For c:b:t:l as 0:0:0:0,
iSCSI device name will be /udev/iscsib0t0l0.
P.S: <hostX> is replaced by "iscsi" above to lookup for iSCSI devices.

So, we are overwriting <hostX> as "iscsi" to help in device lookup,
which is not a good idea as pointed by Mike Christie and trying to
find out best way to achieve the same. Here are few options:
 
1) Having an iSCSI pseudo bus.
This will create a fake iscsi bus as "/sys/bus/iscsi" and all devices
will be under this pseudo bus. This can be used to lookup iSCSI
devices. I don't see any other use of this fake bus. Is it still
ok to pursue with this approach?
 
2) Having an attribute for iSCSI host which displays the name of
iSCSI driver as shown:

$cat /sys/class/scsi_host/hostX/hostname
"iSCSI SFnet Driver"

This can be used for lookup purpose. Is this acceptable?
 
3) Make use of scsi_id.
scsi_id can be used to get unique name instead of parsing sysfs
path for device name creation. However scsi_id is helpful only
for block devices, and there is no way to handle unique naming
for tape devices. So this will not make a complete solution.

Thoughts?



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

end of thread, other threads:[~2004-07-07  9:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-01 13:58 iSCSI device naming issues Surekha.PC
2004-07-01 15:57 ` Mike Anderson
2004-07-01 17:29   ` udev naming of st devices [was Re: iSCSI device naming issues] Patrick Mansfield
2004-07-04 19:57 ` iSCSI device naming issues Arjan van de Ven
2004-07-07  9:05   ` Surekha.PC
2004-07-04 20:11 ` Christoph Hellwig

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