Predict if nic name may change on kernel update?

VictorSTS

Distinguished Member
Oct 7, 2019
1,078
598
158
Spain
I've already updated some clusters and single node PVE to 8.2 + kernel 6.8.x (9 systems in total, 5 different hardware configs). Only one of those systems changed the nic name. It was the first I tried in the lab and changed from eno1 to eno1np0.

I currently check why the kernel gives some name to a given device with:
Code:
udevadm test-builtin net_id /sys/class/net/<NIC_NAME> 2>/dev/null

The last five servers I've updated use 3 different Supermicro motherboards and all NICs got their names from either ID_NET_NAME_SLOT o ID_NET_NAME_PATH and none of them changed their names from kernel 6.5 to 6.8 (and neither did when they got updated from PVE7 to PVE8).

Is there any way to predict if a NIC name may change on a kernel update? Most production servers have out of band console access, but a few don't and I'm planning on how to do those updates safely when the time comes.

Thanks!
 
Thanks, but that is not what I'm asking. I'm fully aware of the various methods to tell the kernel to use a given name for a NIC or a given naming scheme. What I'm asking is if there's a reliable way to tell beforehand if using any those methods may be needed for a given machine.