Sysfs does not recognise tape devices ?
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
Quoted 7 lines · Surekha.PC
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.
Signature · 1 line
Kai
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:[email protected]]
Sent: Thursday, November 06, 2003 2:56 AM
To: Surekha.PC
Cc: [email protected]
Subject: Re: Sysfs does not recognise tape devices ?
Quoted 7 lines · Surekha.PC
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.
Signature · 1 line
Kai
Quoted 10 lines · Kai Makisara
Quoted 6 lines · Surekha.PC
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.
Quoted 6 lines
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/cdevbut 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
Quoted 9 lines · Surekha.PC
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.
Quoted 1 line · Douglas Gilbert
Kai Makisara wrote:
...
Quoted 7 lines
Quoted 6 lines
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/cdevbut 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.
Quoted 7 lines
Kai,
It would be interesting to see what model you propose for/sys/cdevand 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.
Quoted 5 lines
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.
Signature · 1 line
Kai