* Re: How to disable persistent network device names?
2009-07-23 10:49 How to disable persistent network device names? Frank Steiner
@ 2009-07-23 15:56 ` Karl O. Pinc
2009-07-24 6:37 ` Frank Steiner
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Karl O. Pinc @ 2009-07-23 15:56 UTC (permalink / raw)
To: linux-hotplug
On 07/23/2009 05:49:55 AM, Frank Steiner wrote:
> Hi,
> after switching from SLES 10 to 11 I saw that I couldn't use
> FORCE_PERSISTENT_NAMES=no anymore.
>
> How can we prevent persistent network device names? There are some
> problems with this:
>
> 1) If 70-persistent-net.rules is removed, it is recreated with totally
> strange values. E.g. I have file with
>
> SUBSYSTEM="net", ACTION="add", DRIVERS="?*",
> ATTR{address}="00:1b:21:0e:3e:68", ATTR{type}="1", KERNEL="eth*",
> NAME="eth0"
>
> Now I remove the file (we have a diskless environment where those
> files
> can get removed due to a local disk change) and call "udevadm
> trigger".
> The new 70-persistent-net.rules now contains:
>
> SUBSYSTEM="net", ACTION="add", DRIVERS="?*",
> ATTR{address}="00:1b:21:0e:3e:68", ATTR{type}="1", KERNEL="eth*",
> NAME="eth_s6_0"
Here your mac addresses are probably changing. Are you using the
forcedeth driver? (See below.)
> 2) When a mainboard is exchanged, the MACs change. But on the next
> boot
> I still want the new NICs to be eth0 and eth1, in the order
> in which they are recognized by the bios.
> It doesn't make sense if those new cards become eth2 and eth3
> because the old, non-existing NICs are listed in the rules file
> with
> their MACs.
>
> So how can we prevent this? Why was the FORCE_PERSISTENT_NAMES option
> removed?
>
> Persistent device names might be nice for laptops with wlan or usb
> network devices.
> For our site with 120 PCs and Servers with it's bad because I can't
> care about 120
> rules file to make sure they all are always ok before the next boot. I
> just want to
> get rid of the feature :-)
This is the standard recommendation from the debian irc channel.
You may need to modify just how much of the mac address you keep
and how much you wildcard. Note that there may be a more
appropriate technique, this just leapt to mind.
------------------<snip>----------------------
dpkg(~dpkg@dpkg.bot.oftc.net)] forcedeth is probably the open-source
nVidia
Ethernet driver, for nForce motherboards. Found in 2.4.23
and later
kernels. Ask me about <forcedeth mac>. See also <mcp67>,
<rtl8211c>.
[msg(dpkg)] forcedeth mac
[dpkg(~dpkg@dpkg.bot.oftc.net)] If you're using the <forcedeth> driver
and your
network card keeps changing its name each time (eth0, then
eth1, then
eth2, etc), edit /etc/udev/rules.d/70-persistent-net.rules
(Lenny) or
/etc/udev/rules.d/z25_persistent-net.rules (Etch), remove
all but one
entry, and replace the MAC address with "00:00:6c:*". See
also <z25>.
Karl <kop@meme.com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: How to disable persistent network device names?
2009-07-23 10:49 How to disable persistent network device names? Frank Steiner
2009-07-23 15:56 ` Karl O. Pinc
@ 2009-07-24 6:37 ` Frank Steiner
2009-07-24 6:50 ` Olaf
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Frank Steiner @ 2009-07-24 6:37 UTC (permalink / raw)
To: linux-hotplug
Hi,
thanks for your help. But I'm not using the forcedeth driver, and wildcards
wouldn't help me, unfortunately, because we have many hosts with dual-port
cards and MAC addresses like
eth0: xxxx.68
eth1: xxxx.69
:-(
cu,
Frank
--
Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/
Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/
LMU, Amalienstr. 17 Phone: +49 89 2180-4049
80333 Muenchen, Germany Fax: +49 89 2180-99-4049
* Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. *
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: How to disable persistent network device names?
2009-07-23 10:49 How to disable persistent network device names? Frank Steiner
2009-07-23 15:56 ` Karl O. Pinc
2009-07-24 6:37 ` Frank Steiner
@ 2009-07-24 6:50 ` Olaf
2009-07-24 7:08 ` Frank Steiner
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Olaf @ 2009-07-24 6:50 UTC (permalink / raw)
To: linux-hotplug
Frank Steiner wrote:
> Hi,
> after switching from SLES 10 to 11 I saw that I couldn't use
> FORCE_PERSISTENT_NAMES=no anymore.
>
> How can we prevent persistent network device names? There are some
> problems with this:
>
Did you try removing the persistent net generator rule file? (usually
75-persistent-net-generator.rules)
Don't know where that is located in SLES, might be in /etc/udev/rules.d
or /lib/udev/rules.d
Olaf
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: How to disable persistent network device names?
2009-07-23 10:49 How to disable persistent network device names? Frank Steiner
` (2 preceding siblings ...)
2009-07-24 6:50 ` Olaf
@ 2009-07-24 7:08 ` Frank Steiner
2009-07-24 7:54 ` Olaf
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Frank Steiner @ 2009-07-24 7:08 UTC (permalink / raw)
To: linux-hotplug
Hi,
Olaf wrote
> Did you try removing the persistent net generator rule file? (usually
> 75-persistent-net-generator.rules)
> Don't know where that is located in SLES, might be in /etc/udev/rules.d
> or /lib/udev/rules.d
that would work, yes! But with the next udev update that file would be
back and if I missed that, the rule files could get created by the
next "udevadm trigger" call (from whereever). So this is a work-around,
but not reliable, clean solution, I guess.
I also though that removing the 70-persistent-* rules on every boot
before boot.udev runs would help, but I've least one hosts that still
creates renamed network devices other than eth0 and eth1 (see my other
email on the list), so this doesn't help either.
cu,
Frank
--
Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/
Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/
LMU, Amalienstr. 17 Phone: +49 89 2180-4049
80333 Muenchen, Germany Fax: +49 89 2180-99-4049
* Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. *
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: How to disable persistent network device names?
2009-07-23 10:49 How to disable persistent network device names? Frank Steiner
` (3 preceding siblings ...)
2009-07-24 7:08 ` Frank Steiner
@ 2009-07-24 7:54 ` Olaf
2009-07-24 8:07 ` Frank Steiner
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Olaf @ 2009-07-24 7:54 UTC (permalink / raw)
To: linux-hotplug
Hi Frank,
>> Did you try removing the persistent net generator rule file? (usually
>> 75-persistent-net-generator.rules)
>> Don't know where that is located in SLES, might be in /etc/udev/rules.d
>> or /lib/udev/rules.d
>
> that would work, yes! But with the next udev update that file would be
> back and if I missed that, the rule files could get created by the
> next "udevadm trigger" call (from whereever). So this is a work-around,
> but not reliable, clean solution, I guess.
OK, in that case you could create your own rule to bypass the net-generator.
Put something like this in 69-bypass-persistent-net.rules:
SUBSYSTEM="net", ACTION="add", NAME="%k"
> I also though that removing the 70-persistent-* rules on every boot
> before boot.udev runs would help, but I've least one hosts that still
> creates renamed network devices other than eth0 and eth1 (see my other
> email on the list), so this doesn't help either.
The persistent net generator recreates the persistent-net if it does not
exist.
Olaf
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: How to disable persistent network device names?
2009-07-23 10:49 How to disable persistent network device names? Frank Steiner
` (4 preceding siblings ...)
2009-07-24 7:54 ` Olaf
@ 2009-07-24 8:07 ` Frank Steiner
2009-07-24 10:27 ` Frank Steiner
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Frank Steiner @ 2009-07-24 8:07 UTC (permalink / raw)
To: linux-hotplug
Olaf wrote
> OK, in that case you could create your own rule to bypass the net-generator.
>
> Put something like this in 69-bypass-persistent-net.rules:
> SUBSYSTEM="net", ACTION="add", NAME="%k"
I will try that, thanks!
--
Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/
Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/
LMU, Amalienstr. 17 Phone: +49 89 2180-4049
80333 Muenchen, Germany Fax: +49 89 2180-99-4049
* Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. *
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: How to disable persistent network device names?
2009-07-23 10:49 How to disable persistent network device names? Frank Steiner
` (5 preceding siblings ...)
2009-07-24 8:07 ` Frank Steiner
@ 2009-07-24 10:27 ` Frank Steiner
2009-07-24 10:40 ` Olaf
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Frank Steiner @ 2009-07-24 10:27 UTC (permalink / raw)
To: linux-hotplug
Hi Olaf,
Olaf wrote
> OK, in that case you could create your own rule to bypass the net-generator.
>
> Put something like this in 69-bypass-persistent-net.rules:
> SUBSYSTEM="net", ACTION="add", NAME="%k"
I tried this, with and without removing the 70-persistent-net.rules,
but still my test host comes up with eth_s2_0 and eth_s2_1, so the
kernel must tell udev those names.
But in /var/log/boot.msg I find this (quoting only about eth0 here):
<6>e1000: eth0: e1000_probe: Intel(R) PRO/1000 Network Connection
...
<6>eth0 renamed to eth_s2_0 by udevd [274]
<6>udev: renamed network interface eth0 to eth_s2_0
So udev must have some other rule telling it to rename those devices.
After I have removed 70-persistent-net.rules (and it is not re-created
when rebooting) I don't know where this could come from :-(
Do you have any idea?
cu,
Frank
--
Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/
Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/
LMU, Amalienstr. 17 Phone: +49 89 2180-4049
80333 Muenchen, Germany Fax: +49 89 2180-99-4049
* Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. *
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: How to disable persistent network device names?
2009-07-23 10:49 How to disable persistent network device names? Frank Steiner
` (6 preceding siblings ...)
2009-07-24 10:27 ` Frank Steiner
@ 2009-07-24 10:40 ` Olaf
2009-07-24 10:46 ` Frank Steiner
2009-07-24 11:54 ` Frank Steiner
9 siblings, 0 replies; 11+ messages in thread
From: Olaf @ 2009-07-24 10:40 UTC (permalink / raw)
To: linux-hotplug
Hi Frank,
> Olaf wrote
>
>> OK, in that case you could create your own rule to bypass the net-generator.
>>
>> Put something like this in 69-bypass-persistent-net.rules:
>> SUBSYSTEM="net", ACTION="add", NAME="%k"
>
> I tried this, with and without removing the 70-persistent-net.rules,
> but still my test host comes up with eth_s2_0 and eth_s2_1, so the
> kernel must tell udev those names.
>
> But in /var/log/boot.msg I find this (quoting only about eth0 here):
>
> <6>e1000: eth0: e1000_probe: Intel(R) PRO/1000 Network Connection
> ...
> <6>eth0 renamed to eth_s2_0 by udevd [274]
> <6>udev: renamed network interface eth0 to eth_s2_0
>
> So udev must have some other rule telling it to rename those devices.
> After I have removed 70-persistent-net.rules (and it is not re-created
> when rebooting) I don't know where this could come from :-(
> Do you have any idea?
Could be something from the SLES initramfs?
I don't have/use SLES so I really don't know where the rename to
eth_s2_* comes from, sorry.
Olaf
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: How to disable persistent network device names?
2009-07-23 10:49 How to disable persistent network device names? Frank Steiner
` (7 preceding siblings ...)
2009-07-24 10:40 ` Olaf
@ 2009-07-24 10:46 ` Frank Steiner
2009-07-24 11:54 ` Frank Steiner
9 siblings, 0 replies; 11+ messages in thread
From: Frank Steiner @ 2009-07-24 10:46 UTC (permalink / raw)
To: linux-hotplug
Olaf wrote
> Could be something from the SLES initramfs?
> I don't have/use SLES so I really don't know where the rename to
> eth_s2_* comes from, sorry.
Good idea. I see that udevd starts anbd the renaming happens before
/etc/init.d/boot.udev is even started, so the initramfs is a good
candidate.
Thanks for the hint, I'll post if I find a solution!
cu,
Frank
--
Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/
Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/
LMU, Amalienstr. 17 Phone: +49 89 2180-4049
80333 Muenchen, Germany Fax: +49 89 2180-99-4049
* Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. *
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: How to disable persistent network device names?
2009-07-23 10:49 How to disable persistent network device names? Frank Steiner
` (8 preceding siblings ...)
2009-07-24 10:46 ` Frank Steiner
@ 2009-07-24 11:54 ` Frank Steiner
9 siblings, 0 replies; 11+ messages in thread
From: Frank Steiner @ 2009-07-24 11:54 UTC (permalink / raw)
To: linux-hotplug
Olaf wrote
> Could be something from the SLES initramfs?
> I don't have/use SLES so I really don't know where the rename to
> eth_s2_* comes from, sorry.
You had the right idea! I was using a initrd on this host and the
mkinitrd script copies the 70-persistent-net.rules into the initrd
if it finds this file. I guess while I was trying around with the
udev rules, a new kernel was installed (happens automatically after
a reboot) and took the wrong file for its initrd.
Now with this solved, I can go on with your bypass-rules to be
independent of the MACs.
Thanks a lot for your help!!
cu,
Frank
--
Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/
Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/
LMU, Amalienstr. 17 Phone: +49 89 2180-4049
80333 Muenchen, Germany Fax: +49 89 2180-99-4049
* Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. *
^ permalink raw reply [flat|nested] 11+ messages in thread