[SOLVED] Swap a 1 NIC PCI with a 2 NIC PCI

trigg3r

Active Member
Aug 3, 2019
41
3
28
23
I have a 2 sever PVE cluster. Both have 3 NIC: eth0 for corosync, eth1 for VMs storage and for backup traffic and eth2 for LAN connection. I want to add one more NIC to separate storage and backup traffic but one server doesn't has an available PCI slot. So I'm planin to buy a new PCI with 2 NIC. What I'm asking for is: what's problem for the PVE NIC configuration when I swap the current 1 NIC PCI card with the new 2 NIC PCI card?
 
This depends on a few things:
* If you've set up the PVE-Node before predictable network-names (i.e. your nics are still called eth0, eth1, eth2 ....) - you need to edit the udev-file (/etc/udev/rules.d/70-....rules - don't exactly remember the snippet name) where the nics get their index based on the mac-address.
* If your system uses predictable network-interface names (see [0] - i.e. your nics are called eno1, enp1s2f3,...) - there are (sadly) two possible outcomes:
* your original nic-name is then taken by one of the two ports and you don't need to do anything (apart from plugging cable into the right port) and have a new interface available and unused
* the nics get renamed and you need to do a match from old to new names (ethtool -p <nicname> can help)

In any case do make sure that you have access to the box when doing this (if you do the swap yourself that's given, but if it's in a datacenter make sure you have a IPMI, or remote console)

I hope this helps!


[0] https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
 
You're welcome - Good luck with the swap! :)
 
Everything went fine, but ...

you need to edit the udev-file

One of the two PVE servers has NIC names sets in /etc/udev/rules.d/70-persistent-net.rules. So I add a row for the new NIC:

Code:
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="xx:xx:xx:xx:xx:xx", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="xx:xx:xx:xx:xx:xx", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="xx:xx:xx:xx:xx:xx", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"
# THE NEW ONE
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="xx:xx:xx:xx:xx:xx", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3"

But after reboot it is renamed:

Bash:
dmesg | grep eth

Code:
[    1.017832] r8169 0000:08:00.0 eth0: ...
[    1.018153] r8169 0000:08:01.0 eth1: ...
[    1.018500] r8169 0000:08:02.0 eth2: ...
[    1.062249] r8169 0000:08:00.0 enp8s0: renamed from eth0
[    1.266156] e1000e 0000:00:1f.6 eth0: ...

it seem that, for some reason, /etc/udev/rules.d/70-persistent-net.rules does not works ...
 
did it work out after running `update-initramfs -k all -u`? - If yes please mark the thread as 'SOLVED'
Thanks!
 

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!