Posts

Showing posts from July, 2012

Udev unable to rename network interfaces

I struggled for a week having udev (on CentOS 6.3) do all kinds of silly things with the interfaces names on a server with 4 onboard 1G interfaces, an 2 dual port Mellanox ConnectX-3 cards. The short story is that udev was trying to preserve the names of the interfaces to be consistently numbered starting from eth0 and ending with eth7. The problem: the modules for the network cards do not always get probed/loaded in the same order. Udev does the module loading automatically and considering how heavily parallel it is, if the Mellanox driver gets loaded first and the onboard tg3 driver second, udev tries to swap eth eth0-eth3 interfaces with eth4-eth7. Most of the time this leaves a huge mess behind. I followed RedHat's advice to stop using the "eth" names but even then udev failed to rename one or two of the eth interfaces most of the time. Here comes the solution. Modify the 70-persistent-net.rules that udev generates, and add an extra rule for each matching interface w...