linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* question on udev device naming before root is mounted
@ 2014-02-07  2:44 David Avery
  2014-02-07  3:28 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: David Avery @ 2014-02-07  2:44 UTC (permalink / raw)
  To: linux-hotplug

Can the device names for hard drives be forced before root is mounted
in so much so that udev rules can force via a device serial number to
be a specific /dev/sdX device name.

Looking at my pci and bios boot order I shouldn't even need to do this
but I think the defaults of udev or the sysfs?? are to move USB
devices to latter drive letters.

I am booting from a USB 16GB flash drive and would prefer the device
be sda but even if I could force it to be sdz, and force my sata
drives to be specific drive letters based on their serial numbers so
that I can create a hotswap raid array and be confident that once my
drives are installed they won't move around to different device names.
I think this information would be useful to a lot of people who have
simply given up in the past, and after weeks I was at the point of
giving up but Greg's email bot has given me one more ounce of juice to
keep trying. I really would prefer to not bother him directly but I
have a sneaking suspicion what I'm trying to accomplish isn't
possible.

I have this thread: http://ubuntuforums.org/showthread.php?t"02219
on Ubuntuforums.org where I'm trying to find out if this is possible:

I really appreciate any help, and please forgive my demeanor in my
thread on the ubuntuforums page I have a personality that takes an
acquired taste.

If there is any information needed that I haven't provided in the post
at the link above please let me know and I would be happy to provide
it.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: question on udev device naming before root is mounted
  2014-02-07  2:44 question on udev device naming before root is mounted David Avery
@ 2014-02-07  3:28 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2014-02-07  3:28 UTC (permalink / raw)
  To: linux-hotplug

On Thu, Feb 06, 2014 at 06:44:11PM -0800, David Avery wrote:
> Can the device names for hard drives be forced before root is mounted
> in so much so that udev rules can force via a device serial number to
> be a specific /dev/sdX device name.

No you can't, sorry.  Please use the persistant names instead, the ones
in /dev/disk/ for this.

> Looking at my pci and bios boot order I shouldn't even need to do this
> but I think the defaults of udev or the sysfs?? are to move USB
> devices to latter drive letters.

You don't know what device is going to be discovered first, and they can
be reordered on different boots all the time.  Use the /dev/disk/ links
instead.

> I am booting from a USB 16GB flash drive and would prefer the device
> be sda but even if I could force it to be sdz, and force my sata
> drives to be specific drive letters based on their serial numbers so
> that I can create a hotswap raid array and be confident that once my
> drives are installed they won't move around to different device names.

Then use the /dev/disk/ links, that way they can always be confident,
that is what they are there for.

Just ignore the kernel names, they mean nothing, use the /dev/disk/ ones
instead, as they will always be correct.

Hope this helps,

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-07  3:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-07  2:44 question on udev device naming before root is mounted David Avery
2014-02-07  3:28 ` Greg KH

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).