[SOLVED] NIC Upgrade and /etc/udev/rules.d/70-persistent-net.rules

mattlach

Renowned Member
Mar 23, 2016
181
21
83
Boston, MA
Hey all,

I have been running a somewhat complex network setup on my server for some time:
2x Copper Gigabit Ethernet on Server Board
4x Copper Gigabit Ethernet (Intel 4x PRO/1000 NIC)
1x 10GBaseT Intel 82598EB

I'm not going to go into the details of what they are used for, as it is not relevant to this question, but the end result is I have a lot of Ethernet device names to manage

Today I am working on a project to replace the old Intel 10GBase-T NIC with a dual Intel X-520 fiber NIC.

So, my problem is as follows:

The existing Ethernet devices were configured years ago when Proxmox was on Debian Jessie. They are all listed in /etc/udev/rules.d/70-persistent-net.rules, and get device names eth0 through eth6. I ahve since upgraded the server to the latest versions of Proxmox and the underlying Debian base.

Now that I have pulled the old 10GBaseT adapter and replaced it with th edual port x520, for consistency's sake I was hoping its two ports would become eth6 and eth7. No such luck. Now on the new version of Debian that Proxmox is based on it is using the fancy new device names and calling the two ports enp6s0f0 and enp6s0f1.

So, I remembered that the last time I needed to change Ethernet device names I had to edit /etc/udev/rules.d/70-persistent-net.rules, so took a look at that file. It is unchanged after removing the old NIC and inserting the old one. The old Intel 10GBase-T adapter is still listed there with it's old MAC Address.

The descriptive text in the file says that the only part of it that is user modifiable is the NAME= string, but that's not going to work for me as the devices I want to edit are not listed. The description in the file says it is automatically generated by the /lib/udev/write_net_rules, but that script does not exist.

I tried manually looking up the numerical PCI device strings using lspci -n and the mac addresses and creating my own lines, ignoring the comments in the file, but this had no effect. After a reboot, all of my legacy installed Ethernet devices are still named eth0 - eth5, and the two new ports are enp6s0f0 and enp6s0f1.

Does anyone have any suggestions regarding how to fix this? Ideally I'd like all of the devices to have old fashioned eth0 type names, configurable by me, but I'd be OK with new style names as well. I really just don't want the unholy mix I have between the two right now.

Any suggestions welcome!
 
FollowUp:

On a whim I decided to make a back up copy of my existing 70-persistent-net.rules file, and delete the one in the /etc/udev/rules.d location and reboot to see what happened.

My theory was that without this file assigning Ethernet device names, all of the devices would instead use the new naming conventions. This was almost accurate.

All devices except two of them now use the new naming conventions for some reason, so I am still stuck with a mixed naming convention setup.

Can anyone explain this?

interfaces.png
How can I make the remaining two old name devices (eth2 & eth3) take on their new style names?

Much obliged,

--Matt
 
Sigh.

So, to get the machine working temporarily until I have all these devices figured out, I edited /etc/network/interfaces and used the new device names, followed by a reboot.

After reboot, I now have yet another old naming convention device, eth1, instead of its recent name, enp13s0f0...

I don't understand why they are not all just using new udev names now, and why it changes when I reboot....
 
DOH.

I figured it out.

I forgot I needed to run "update-initramfs -u" after makinga changes to udev config files to make everything work right.

Rebooted, and now everything uses the new (hopefully static) device names...

I'll leave this thread up here in case anyone else runs into the same problem in the future.
 
My English is not good, this is what I use google to translate, if there is anything wrong, please forgive me.:p
On my Dell Server, the newly installed PVE 6, and also use the intel 520 network card, but only in lspci -k | sed -n' / Ethernet /, / Kernel / p', see 10Gb 520, but under the ip a command, can't see the 520 network card, ask this question, how to solve it.20191101233126.png20191101233149.png
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!