mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: david@lang.hm
To: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: Ondrej Zajicek <santiago@crfreenet.org>,
	Jan Engelhardt <jengelh@computergmbh.de>,
	Michael Tokarev <mjt@tls.msk.ru>,
	Herbert Rosmanith <kernel@wildsau.enemy.org>,
	linux-kernel@vger.kernel.org
Subject: Re: renaming kernel devices [was: VIA EPIA EK: strange eth dev numbering]
Date: Fri, 3 Aug 2007 21:33:25 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0708032127010.6905@asgard.lang.hm> (raw)
In-Reply-To: <46B345E1.1010404@s5r6.in-berlin.de>

On Fri, 3 Aug 2007, Stefan Richter wrote:

> david@lang.hm wrote:
>> On Thu, 2 Aug 2007, Ondrej Zajicek wrote:
>>> On Thu, Aug 02, 2007 at 01:47:23PM +0200, Jan Engelhardt wrote:
>>>> It does not rename ethX to the "next free" one, but to a _persistent_ one.
>>>> If it were a "next free" thing, then removing a card would shuffle all
>>>> your eth around again (and invalidate your iptables rules at the same
>>>> time, to note).
>>>
>>> It is questionable what is _persistent_ . MAC-based names are persistent
>>> with regard to adding and removing of other cards, 'Plain' names are persistent
>>> with regard to replacing that card with different item (of a same kind).
>>>
>>> I am very happy that (using 'plain' names) i can send technician to
>>> replace broken NIC in our routers without need for configuration
>>> change.
>>
>> this is a very important point, and with the distros (and many kernel
>> people) treating udev as a requirement this is going to bite a lot of
>> people.
>
> Two notes:
>
>  1. Udev doesn't restrict you to any one naming scheme.  If you want
> something else than a MAC based scheme, e.g. a PCI topology based
> scheme, udev most certainly can do that for you.  But the kernel can't.
>
>  2. Consider udev a kernel extension in userspace, with the benefit of
> configurability and scriptability, features that kernel extensions in
> kernelspace can't offer.  Of course this gain of features doesn't come
> at zero cost:  You need a minimal userspace environment at boot time.
>
> Quoting myself from http://marc.info/?l=linux-scsi&m=118613786003162:
>
> There is a variety of possible naming schemes:
>
>  - Naming by order of discovery.
>  - Naming by vendor/model name strings.
>  - Naming by universally unique identifier.
>  - Naming by topology.
>  - ...
>
> Only the simplest of these schemes (naming by order of discovery) is
> hardwired into the kernel portion of the Linux OS.  The other naming
> schemes are (or can be) implemented in the userland portion of the Linux OS.
>
> There is only the most primitive naming scheme implemented in the kernel
> because naming policy, like most other kinds of policy, is better left
> to userland.  The kernel is a too restricted framework to implement such
> things.  The kernel lacks runtime-configuration files, scripting
> interfaces, et cetera.

I understand the flexibility that this provides, unfortunantly (IMHO) 
default udev rules (or at least what many distros are shipping by default) 
changes from this simple naming scheme in a way that hides the fact from 
the user. This means that many users will not even realize the change in 
policy until the hardware changes and things don't act the way they were 
expected to. In my case it was removing 3 quad cards from a machine and 
finding that there was no eth0 on the box, instead there was a eth12, this 
is fairly benign. what would have caused me significant problems would 
have been having a card fail in a production box, have it replaced and 
then found that the interfaces were now eth4-eth22 instead of eth0-eth18. 
having the interfaces named differently on different boxes with identical 
hardware based on the history of what has been plugged into the boxes in 
the past is not what sysadmins expect.

David Lang

  reply	other threads:[~2007-08-04  4:36 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-02 10:20 VIA EPIA EK: strange eth dev numbering Herbert Rosmanith
2007-08-02 10:26 ` Michael Tokarev
2007-08-02 10:42   ` Herbert Rosmanith
2007-08-02 10:49     ` Jan Engelhardt
2007-08-02 10:56       ` Herbert Rosmanith
2007-08-02 11:23         ` renaming kernel devices [was: VIA EPIA EK: strange eth dev numbering] Michael Tokarev
2007-08-02 11:47           ` Jan Engelhardt
2007-08-02 12:56             ` Michael Tokarev
2007-08-02 13:30               ` Jan Engelhardt
2007-08-02 13:36                 ` Michael Tokarev
2007-08-02 14:37                   ` Ondrej Zajicek
2007-08-02 13:43                 ` Herbert Rosmanith
2007-08-02 14:51             ` Ondrej Zajicek
2007-08-03  4:45               ` david
2007-08-03 15:12                 ` Stefan Richter
2007-08-04  4:33                   ` david [this message]
2007-08-04  9:16                     ` Stefan Richter
2007-08-04 17:06                       ` david
2007-08-02 11:47         ` VIA EPIA EK: strange eth dev numbering Jan Engelhardt
2007-08-02 12:00           ` Herbert Rosmanith
2007-08-02 12:06             ` Jan Engelhardt
2007-08-02 13:07           ` Michael Tokarev
2007-08-02 13:38             ` Jan Engelhardt
2007-08-02 18:37               ` Jan Engelhardt
2007-08-02 22:00                 ` Kay Sievers
2007-08-02 22:39                   ` Jan Engelhardt
2007-08-02 22:49                     ` Kay Sievers
2007-08-03  7:46                       ` Jan Engelhardt
2007-08-02 11:12       ` Herbert Rosmanith
2007-08-02 10:44 ` Jan Engelhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0708032127010.6905@asgard.lang.hm \
    --to=david@lang.hm \
    --cc=jengelh@computergmbh.de \
    --cc=kernel@wildsau.enemy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjt@tls.msk.ru \
    --cc=santiago@crfreenet.org \
    --cc=stefanr@s5r6.in-berlin.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®