Udev Question
C M Reinehr
cmr at amsent.com
Sat Jun 19 12:53:27 PDT 2010
Thursday what should have been a relatively simple problem became much more
interesting owing the udev system.
I have two identical servers -- identical hardware & running exactly the same
version of Debian Linux (Lenny) with almost identical software (same system
software but different applications).
Both use a Tyan Thunder motherboard which came with three ethernet ports: two
Broadcom gigabit Ethernet ports plus one Intel 10/100 Ethernet port. For five
years, when booting, the system (udev?) would discover first one of the
Broadcom ports and name it eth0, then the Intel port as eth1 & finally the
remaining Broadcom port as eth2. My /etc/network/interfaces file was
configured accordingly to assign static IP numbers and set up routes (copy
below) per their MAC numbers.
Thursday, while performing some minor software maintenance I rebooted one of
the servers -- running my accounting software -- or, at least, attempted to
reboot one of the servers. It wouldn't boot. The lights & fans powered up but
no POST screen. This was a critical server: no accounting software, no sales
order entry, no sales, no money, etc.
After fooling with that for a while and deciding that the system was down for
the count (probably with a failing power supply) I decided the simplest &
fasted way of recovering was to remove the hard drives from the dead server &
swap them for the hard drives of the running server (SCSI RAID enclosures
with hot-swapable drives). I didn't hot swap them, but powered everything
down, swapped the drives & restarted the good server.
All was right with the world until I discovered that I had no network
connectivity -- which meant I was back to being screwed, again. After about
two hours of fumbling in the dark I finally figured out what was happening.
Udev was now assigning my network ports as eth3, eth4 & eth5, instead of 0,
1, & 2. Since this didn't match was was configured in interfaces, the ports
were not being initialized. After editing the interfaces file accordingly, I
had network access again and this behavior repeated itself through several
subsequent reboots.
Finally, my question is why was udev reassigning the port names? Here's a
snippet of the dmesg file:
[ 40.526949] ACPI: PCI Interrupt 0000:03:08.0[A] -> GSI 18 (level, low) ->
IRQ 18
[ 40.630945] e100: eth0: e100_probe: addr 0xfeafb000, irq 18, MAC addr
00:e0:81:29:ae:1b
[ 40.630945] tg3.c:v3.92.1 (June 9, 2008)
[ 40.630945] ACPI: PCI Interrupt 0000:02:09.0[A] -> GSI 24 (level, low) ->
IRQ 24
[ 40.647089] udev: renamed network interface eth0 to eth3
[ 40.651233] eth0: Tigon3 [partno(BCM95704A7) rev 2003 PHY(5704)]
(PCIX:100MHz:64-bit) 10/100/1000Base-T Ethernet 00:e0:81:29:ae:5e
[ 40.651410] eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] WireSpeed[1]
TSOcap[1]
[ 40.651562] eth0: dma_rwctrl[769f4000] dma_mask[64-bit]
[ 40.654946] ACPI: PCI Interrupt 0000:02:09.1[B] -> GSI 25 (level, low) ->
IRQ 25
[ 40.671169] usb 1-2: new full speed USB device using ohci_hcd and address 2
[ 40.677140] eth1: Tigon3 [partno(BCM95704A7) rev 2003 PHY(5704)]
(PCIX:100MHz:64-bit) 10/100/1000Base-T Ethernet 00:e0:81:29:ae:5f
[ 40.677318] eth1: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] WireSpeed[1]
TSOcap[1]
[ 40.677470] eth1: dma_rwctrl[769f4000] dma_mask[64-bit]
[ 40.680862] udev: renamed network interface eth0 to eth4
[ 40.708863] udev: renamed network interface eth1 to eth5
If I'm reading this correctly, each port was initially assigned the usual
eth0, 1 or 2, but then almost immediately renamed eth3, 4 or 5.
Here is my interfaces file:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The first 100/1000 kbps ethernet nic
auto eth4
iface eth4 inet static
address 192.168.168.11
netmask 255.255.255.0
hwaddress ether 00:E0:81:29:AE:5F
gateway 192.168.168.168
# The 10/100 kbps ethernet nic
auto eth3
iface eth3 inet static
address 192.168.168.10
netmask 255.255.255.0
hwaddress ether 00:E0:81:29:AE:1B
pointopoint 192.168.168.13
up route add -host 192.168.168.13 dev $IFACE
down route del -host 192.168.168.13 dev $IFACE
# The second 100/1000 kbps ethernet nic
auto eth5
iface eth5 inet static
address 192.168.168.12
netmask 255.255.255.0
hwaddress ether 00:E0:81:29:AE:5E
pointopoint 192.168.168.9
up route add -host 192.168.168.9 dev $IFACE
down route del -host 192.168.168.9 dev $IFACE
I almost left out, that since the MAC addresses were different I had to edit
the interfaces file to correct for that, but that didn't cause or correct the
udev renaming.
If you've read this far, then very sincerely, thanks for your patience and any
insights you may have. I'm up and running, but I really would like to
understand what is happening here.
Thanks!
Mike Reinehr
--
Debian 'Lenny' - Registered Linux User #241964
--------
"More laws, less justice." -- Marcus Tullius Ciceroca, 42 BC
More information about the Linux-users
mailing list