[lkml]   [2003]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Does sysfs really provides persistent hardware path to devices?
On Mon, Jul 28, 2003 at 08:44:43PM +0400, Andrey Borzenkov wrote:
> On Saturday 26 July 2003 20:50, Greg KH wrote:
> > On Sat, Jul 26, 2003 at 08:36:13PM +0400, Andrey Borzenkov wrote:
> > > So apparently I cannot rely on sysfs to get reliable persistent
> > > information about physical location of devices.
> >
> > That is correct, but you can get pretty close :)
> >
> sure, I know. The more annoying is how difficult is to step over this "close"
> :)

The kernel isn't going to do this. It's a user space issue.

> > > the point is - I want to create aliases that would point to specific
> > > slots. I.e. when I plug USB memory stick in upper slot on front panel I'd
> > > like to always create the same device alias for it.
> >
> > Look at the udev announcement I posted to linux-kernel yesterday to see
> > how to do this.
> >
> I know udev.
> udev does not answer my question. It operates on logical device (bus) numbers.
> My question was how to name devices based on physical position
> *independently* of logical numbers they get.

You don't know udev then :)
This is exactly what udev solves. Please read the paper I posted a link
to, it should answer your questions.

> Question: how to configure udev so that "database" always refers to LUN 0 on
> target 0 on bus 0 on HBA in PCI slot 1.

If you can't rely on scsi position, then you need to look for something
that uniquely describes the device. Like a filesystem label, or a uuid
on the device. udev can handle this (well I'm still working on the
filesystem label, but others have already done the hard work for that to
be intregrated easily.)


greg k-h
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:47    [W:0.085 / U:0.856 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site