Skip to contentSkip to conversation

Where and how does network device renaming happen?

DISCUSSION Frank Steiner 2 participants 3 messages Jul 24, 2009

lore
Share & tools
lore
#0 lore raw

Hi,

somewhat related to my former mail, but it's more a general question for understanding the renaming process.

We've one hosts that always creates a 70-persistent-net.rules file with SUBSYSTEM="net",..., ATTR{type}="1", KERNEL="eth_s*", NAME="eth_s2_1" SUBSYSTEM="net",..., ATTR{type}="1", KERNEL="eth_s*", NAME="eth_s2_0"

for it's two onboard network cards. When we remove the file and reboot the hosts, the file gets created with the same values.

All other hosts with the same mainboard and hardware config create their file with KERNEL="eth*", NAME="eth0" etc. I tried to understand what /lib/udev/write_net_rules does, but I can't figure out why on this host the script thinks that the device names eth0 and eth1 are already taken. There are not other rules about network devices, so who is taking eth0/1 so that the script thinks it must rename the devices?

Can someone explain the renaming process a little bit? How can I debug who is taking the devices names on this host? Is there a way to change that? Of course I can change the rule files, but I want to understand *why* it is created with eth_s2_0 instead of eth0.

cu,
Frank

Signature · 5 lines
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. *
#1 lore raw
Quoted 8 lines · Frank Steiner

We've one hosts that always creates a 70-persistent-net.rules file with SUBSYSTEM="net",..., ATTR{type}="1", KERNEL="eth_s*", NAME="eth_s2_1" SUBSYSTEM="net",..., ATTR{type}="1", KERNEL="eth_s*", NAME="eth_s2_0"

Can someone explain the renaming process a little bit? How can I debug who is taking the devices names on this host? Is there a way to change that? Of course I can change the rule files, but I want to understand *why* it is created with eth_s2_0 instead of eth0.

Seems you have installed biosdevname, which you probably shouldn't if you don't want a different namespace.

Kay

#2 lore raw
In reply to Frank Steiner

Kay Sievers wrote

Quoted 7 lines
Quoted 3 lines · Frank Steiner

We've one hosts that always creates a 70-persistent-net.rules file with SUBSYSTEM="net",..., ATTR{type}="1", KERNEL="eth_s*", NAME="eth_s2_1" SUBSYSTEM="net",..., ATTR{type}="1", KERNEL="eth_s*", NAME="eth_s2_0"

Quoted 7 lines
Quoted 4 lines

Can someone explain the renaming process a little bit? How can I debug who is taking the devices names on this host? Is there a way to change that? Of course I can change the rule files, but I want to understand *why* it is created with eth_s2_0 instead of eth0.

Seems you have installed biosdevname, which you probably shouldn't if you don't want a different namespace.

That's right, it's indeed installed (comes by default in the package set we are using). I'll remove it!

For this special host it turned out that the 70-persistent-net.rules file specifying those strange names was transferred into the initrd, so the devices were renamed in the initrd already, and thus, the names the kernel was returning were eth_s2_x.

Thanks for your help!
cu,
Frank

Signature · 5 lines
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. *