[systemd-devel] eth2: Failed to rename network interface 6 from 'eth2' to 'eno1': File exists
Mantas Mikulėnas
grawity at gmail.com
Thu Jan 6 09:00:45 UTC 2022
On Thu, Jan 6, 2022 at 10:42 AM Harald Dunkel <harald.dunkel at aixigo.com>
wrote:
> On 2022-01-05 21:48:11, Michael Biebl wrote:
> > Am Mi., 5. Jan. 2022 um 13:50 Uhr schrieb Mantas Mikulėnas <
> grawity at gmail.com>:
> >> It does, yes, but note this part:
> >>
> >> Jan 03 11:30:14 nasl002b.example.com kernel: igb 0000:02:00.2 eth4:
> renamed from eth2
> >> Jan 03 11:30:14 nasl002b.example.com kernel: igb 0000:02:00.3 eth5:
> renamed from eth3
> >>
> >> Here the kernel-assigned names (eth2, eth3) are being renamed to custom
> names (eth4, eth5). That's not something systemd or udev does by default.
> It suggests that you likely have old "70-persistent-net" udev rules (or
> something similar) that assign custom eth* names separately from the
> slot-based "predictable" naming – perhaps a leftover from Debian 7.
> >>
> >> These interfaces aren't being skipped due to an earlier conflict – they
> are intentionally skipped by 80-net-setup-link.rules because they already
> have a custom 'NAME=' assigned by an earlier rule, so the "predictable"
> name is not applied to avoid breaking existing configuration.
> >
> > Yes, please check if you have a leftover file
> > /etc/udev/rules.d/70-persistent-net.rules
> > See also the relevant NEWS entry in /usr/share/doc/udev/NEWS.Debian.gz
> >
>
> You are right about Debian 7 wrt 70-persistent-net.rules, but for Debian
> 10 I had used net.ifnames=0. It was changed to 1 after(!) the upgrade to
> Debian 11:
>
That's really irrelevant to what I was saying. The net.ifnames= option only
disables the "predictable naming" udev helper; it does nothing about custom
udev rules that directly set NAME= on network interfaces (and are
apparently setting NAME="eth4" on your system).
Grep your entire /etc for those interface names (starting with /etc/udev),
find out where they're defined, and remove them – that should bring the
enp* names back. (Also grep for "eno1" just in case.)
As for 'index' and 'acpi_index' attributes, they're in /sys on the parent
PCI device of the network interface (e.g.
/sys/class/net/eth2/../../{acpi_,}index or
/sys/bus/pci/devices/0000:02:00.2/{acpi_,}index), another way to see them
is `udevadm info -a /sys/class/net/eth2`.
--
Mantas Mikulėnas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20220106/1a996a5c/attachment-0001.htm>
More information about the systemd-devel
mailing list