[lkml]   [2002]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: /proc/scsi/map
Hi Doug,

On Mon, Jun 17, 2002 at 06:08:18PM -0400, Doug Ledford wrote:
> On Sat, Jun 15, 2002 at 03:36:06PM +0200, Kurt Garloff wrote:
> > Life would be easier if the scsi subsystem would just report which SCSI
> > device (uniquely identified by the controller,bus,target,unit tuple) belongs
> > to which high-level device. The information is available in the kernel.
> Umm, this patently fails to meet the criteria you posted of "stable device
> name". Adding a controller to a system is just as likely to blow this
> naming scheme to hell as it is to blow the traditional linux /dev/sd?
> scheme. IOW, even though the /proc/scsi/map file looks nice and usefull,
> it fails to solve the very problem you are trying to solve.

In case you just add controllers, you just need to make sure you get them the
same numbers again. A solution for this exists already:
* For a kernel where SCSI low-level drivers are loaded as modules,
you just need to keep the order constant
* For compiled in SCSI drivers, use scsihosts=

But actually, the patch is not meant to be the holy grail of persistent
device naming. But it enables userspace tools to collect information
* reliably
(fails so far due to possible open() failures with unknown
relation to the corresponding sg device (which could be opened))
* without too much trouble

Both things I consider important and useful.

The patch basically does provide two pieces of information:
* mapping between sg vs. other high level devices
* mapping CBTU to high-level devices
The latter one is enough for many setups, and the former can be used for
more elaborate solutions involving userspace tools more advanced than the
simple script I included in the patch.

If you want to go for the holy grail, you may either come up with a
unique address at hardware level (which does currently not exist for all
types dealt with by the SCSI subsystem) and make it available to SCSI mid
level or use signatures that allows you to find devices back. LVM, e.g.
does the latter.
But at this moment, I fear, neither of them are possible in all cases.

Kurt Garloff <> [Eindhoven, NL]
Physics: Plasma simulations <K.Garloff@TUE.NL> [TU Eindhoven, NL]
Linux: SCSI, Security <> [SuSE Nuernberg, DE]
(See mail header or public key servers for PGP2 and GPG public keys.)
[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2005-03-22 13:26    [W:0.170 / U:0.348 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site