* Sysfs does not recognise tape devices ?
@ 2003-11-05 12:25 Surekha.PC
2003-11-05 21:25 ` Kai Makisara
0 siblings, 1 reply; 6+ messages in thread
From: Surekha.PC @ 2003-11-05 12:25 UTC (permalink / raw)
To: linux-scsi
Hi,
I have a iSCSI setup with scsi disk and tape configured as iSCSI
targets. The disks are recognised with sysfs, but tape device entries
are not getting created.
Is this a bug in sysfs?
TIA,
surekha
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Sysfs does not recognise tape devices ?
2003-11-05 12:25 Sysfs does not recognise tape devices ? Surekha.PC
@ 2003-11-05 21:25 ` Kai Makisara
2003-11-06 5:24 ` Surekha.PC
2003-11-06 23:00 ` Douglas Gilbert
0 siblings, 2 replies; 6+ messages in thread
From: Kai Makisara @ 2003-11-05 21:25 UTC (permalink / raw)
To: Surekha.PC; +Cc: linux-scsi
On Wed, 5 Nov 2003, Surekha.PC wrote:
>
> Hi,
>
> I have a iSCSI setup with scsi disk and tape configured as iSCSI
> targets. The disks are recognised with sysfs, but tape device entries
> are not getting created.
>
The tapes should be visible as SCSI devices in, e.g.,
/sys/bus/scsi/devices/. You can find disks in /sys/block. The tapes belong
to /sys/cdev but it is a very new addition to sysfs and the code to show
the tapes there has not been done yet. It should be very easy based on
Doug Gilberts code for sg but the feature freeze will prevent adding it
to the official kernel for some time.
--
Kai
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Sysfs does not recognise tape devices ?
2003-11-05 21:25 ` Kai Makisara
@ 2003-11-06 5:24 ` Surekha.PC
2003-11-07 11:21 ` Christoph Hellwig
2003-11-06 23:00 ` Douglas Gilbert
1 sibling, 1 reply; 6+ messages in thread
From: Surekha.PC @ 2003-11-06 5:24 UTC (permalink / raw)
To: 'Kai Makisara'; +Cc: linux-scsi
Kai,
Thanks for the information.
The "/sys/bus/scsi/devices/" shows tape device attributes except for
device name. This is important w.r.t iSCSI devices where we use "udev"
to create device nodes from sysfs lookup. Can you please let me know how
soon the feature unfreeze will happen and when this feature can be made
part of the 2.6 kernel?
Thanks,
Surekha
-----Original Message-----
From: Kai Makisara [mailto:Kai.Makisara@kolumbus.fi]
Sent: Thursday, November 06, 2003 2:56 AM
To: Surekha.PC
Cc: linux-scsi@vger.kernel.org
Subject: Re: Sysfs does not recognise tape devices ?
On Wed, 5 Nov 2003, Surekha.PC wrote:
>
> Hi,
>
> I have a iSCSI setup with scsi disk and tape configured as iSCSI
> targets. The disks are recognised with sysfs, but tape device entries
> are not getting created.
>
The tapes should be visible as SCSI devices in, e.g.,
/sys/bus/scsi/devices/. You can find disks in /sys/block. The tapes
belong to /sys/cdev but it is a very new addition to sysfs and the code
to show the tapes there has not been done yet. It should be very easy
based on Doug Gilberts code for sg but the feature freeze will prevent
adding it to the official kernel for some time.
--
Kai
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Sysfs does not recognise tape devices ?
2003-11-05 21:25 ` Kai Makisara
2003-11-06 5:24 ` Surekha.PC
@ 2003-11-06 23:00 ` Douglas Gilbert
2003-11-09 21:23 ` Kai Makisara
1 sibling, 1 reply; 6+ messages in thread
From: Douglas Gilbert @ 2003-11-06 23:00 UTC (permalink / raw)
To: Kai Makisara; +Cc: Surekha.PC, linux-scsi
Kai Makisara wrote:
> On Wed, 5 Nov 2003, Surekha.PC wrote:
>
>
>>Hi,
>>
>>I have a iSCSI setup with scsi disk and tape configured as iSCSI
>>targets. The disks are recognised with sysfs, but tape device entries
>>are not getting created.
>>
>
> The tapes should be visible as SCSI devices in, e.g.,
> /sys/bus/scsi/devices/. You can find disks in /sys/block. The tapes belong
> to /sys/cdev but it is a very new addition to sysfs and the code to show
> the tapes there has not been done yet. It should be very easy based on
> Doug Gilberts code for sg but the feature freeze will prevent adding it
> to the official kernel for some time.
Kai,
It would be interesting to see what model you propose for
/sys/cdev and st. I felt that the cdev mechanism
was "three-quarter baked" when I used it for sg. It is flat
with no obvious support for driver parameters (unless I set
up a dummy "device" like /sys/cdev/major/sg/<driver_params>).
For a tape device the /sys/class/scsi_device/<h:c:t:l>/device
directory should have a symlink called "tape" but what to?
The st driver has a one to many mapping here; multiple
symlinks?
Until the st driver uses the cdev interface, linux in lk 2.6
will be limited to a maximum of 32 tape drives.
Doug Gilbert
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Sysfs does not recognise tape devices ?
2003-11-06 5:24 ` Surekha.PC
@ 2003-11-07 11:21 ` Christoph Hellwig
0 siblings, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2003-11-07 11:21 UTC (permalink / raw)
To: Surekha.PC; +Cc: 'Kai Makisara', linux-scsi
On Thu, Nov 06, 2003 at 10:54:03AM +0530, Surekha.PC wrote:
>
> Kai,
>
> Thanks for the information.
> The "/sys/bus/scsi/devices/" shows tape device attributes except for
> device name. This is important w.r.t iSCSI devices where we use "udev"
> to create device nodes from sysfs lookup. Can you please let me know how
> soon the feature unfreeze will happen and when this feature can be made
> part of the 2.6 kernel?
Note that the name shows in sysfs really is an internal identifier for the
kernel. If you want to populate your /dev/iscsi tree using udev calling
mknod with the dev_t from the dev attribute might be a much better choice.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Sysfs does not recognise tape devices ?
2003-11-06 23:00 ` Douglas Gilbert
@ 2003-11-09 21:23 ` Kai Makisara
0 siblings, 0 replies; 6+ messages in thread
From: Kai Makisara @ 2003-11-09 21:23 UTC (permalink / raw)
To: Douglas Gilbert; +Cc: Kai Makisara, Surekha.PC, linux-scsi
On Fri, 7 Nov 2003, Douglas Gilbert wrote:
> Kai Makisara wrote:
...
> > The tapes should be visible as SCSI devices in, e.g.,
> > /sys/bus/scsi/devices/. You can find disks in /sys/block. The tapes belong
> > to /sys/cdev but it is a very new addition to sysfs and the code to show
> > the tapes there has not been done yet. It should be very easy based on
> > Doug Gilberts code for sg but the feature freeze will prevent adding it
> > to the official kernel for some time.
>
> Kai,
> It would be interesting to see what model you propose for
> /sys/cdev and st. I felt that the cdev mechanism
> was "three-quarter baked" when I used it for sg. It is flat
> with no obvious support for driver parameters (unless I set
> up a dummy "device" like /sys/cdev/major/sg/<driver_params>).
>
One possibility might be to add a link from each device to the driver
directory in /sys/bus/scsi/drivers/. I guess the correct kobject could be
found following pointers from struct scsi_device.
I would like to see a little more structure in /sys/cdev. The flat layout
makes the directory very crowded when more drivers start using it. My
understanding, ba is that the current layout may not be the final one.
> For a tape device the /sys/class/scsi_device/<h:c:t:l>/device
> directory should have a symlink called "tape" but what to?
> The st driver has a one to many mapping here; multiple
> symlinks?
>
In the first version of cdev support (just sent to linux-scsi) I made the
link "tape" to point to the non-rewind mode 0 tape. It leads to the
correct directory but the user must then generate the names leading to the
other devices using the same drive. Multiple links would be another
possibility but I think it would only move generating the different names
to the SCSI device directory.
All of these problems would be solved if the character device model would
allow collections of devices. Each tape drive would be a subdirectory
containing the entries for the different devices corresponding to this
drive. I think there are other character devices that would benefit from
this, too.
On the other hand, the character devices contain a very diverse set of
devices. Maybe it is not useful to try to define any structure among them.
--
Kai
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-11-09 21:23 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-05 12:25 Sysfs does not recognise tape devices ? Surekha.PC
2003-11-05 21:25 ` Kai Makisara
2003-11-06 5:24 ` Surekha.PC
2003-11-07 11:21 ` Christoph Hellwig
2003-11-06 23:00 ` Douglas Gilbert
2003-11-09 21:23 ` Kai Makisara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).