scsidev utliity
Home Up SCSI queue handling New SCSI eh code Kernel Simulator scsidev utliity Linux SCSI error handling General SCSI Docs My TODO list for SCSI

 

The scsidev utility is a user-space alternative to devfs.

 

The general idea is that the utility is run every so often (perhaps at boot time), and this populates a /dev/scsi directory with device entries that have symbolic names that make sense to humans.

The problem we are trying to solve is device name drift, where device names change depending upon what other devices exist on the system. This is largely caused by the fact that we allocate names like /dev/sda, /dev/sdb in the order that we detect the devices at boot time.

We have talked about the possibilty of going to sparse minors, and in theory we would have the ability to choose mappings that would allow for unambiguous naming. Unfortunately on Intel platforms we still have 16-bit dev_t, which prevents the use of sparse minors. To top it off, using sparse minors might cause us to inadvertently make choices that would no longer be optimal with newer versions of the SCSI standard which might allow for larger number of SCSI ids.

Note that there isn't a requirement that we have sparse minors to solve the problem we need to solve. There are in effect two "names" for a given device. One is the human readable one in /dev, and the other one is the minor number. We can still dynamicly allocate minor numbers and yet generate human readable names which are unambiguous.

SVr5 solved this with names that have the SCSI ID encoded in the name of the device. The ID itself isn't sufficient - you need to specify which bus, the LUN, what channel, which host adapter. In other words lots of stuff. The names themselves aren't exactly easy to use and remember. In other words, this was a technical solution that wasn't human friendly.

Initially scsidev was an attempt to emulate this, but a later enhancement allowed for the definition of aliases. The aliases can be simple things like "/dev/cdwriter" which humans won't have trouble remembering, but as long as you set up the alias correctly you are guaranteed that the alias always points to the cd writer.

I (ERY) originally wrote scsidev long long ago in a land far far away. More recently, Kurt Garloff has updated it and re-released it. The latest version as of this writing is 2.0, and it works with 2.3 series kernels.

To obtain the latest scsidev, click here

 

If you have comments or suggestions, you can email me by clicking here

I do not read linux-kernel. All discussions, bug reports, etc, should either be reported directly to me, or to linux-scsi.

Last updated: 1/18/00.