#1093674 Recent changes in device naming broke multiple applications

Package:
udev
Source:
udev
Description:
/dev/ and hotplug management daemon
Submitter:
Petter H
Date:
2025-01-22 02:27:02 UTC
Severity:
normal
#1093674#5
Date:
2025-01-21 05:22:21 UTC
From:
To:
At some point between mid October 2024 and now (20 Jan 2025), multiple
device naming behaviors changed in Debian stable, breaking networking
configuration and libpam-mount (probably other things are broken as
well). Output from df also changed.

df now outputs e.g., /dev/dm-2 instead of /dev/mapper/_dev_sdb in its
first column for a luks encrypted disk.

df -h | grep /mnt

old:
/dev/mapper/_dev_sdb   932G  530G  402G  57% /mnt

new:
/dev/dm-3              932G  530G  402G  57% /mnt

df output change broke a script (the df behavior prior to the breaking
change [above] was reversed from this script line):
   old script line before device naming changes that affected df:
     devmapper_dev="$(df "$TARGET_MNTPOINT" | awk
'/^\/dev\/mapper\//{print $1}')"


libpam-mount is broken (presumably) by the same change that changed the
output of df.  So, umount no longer will automatically close the luks
device when running umount.

This used to be sufficient, after installing libpam-mount:
(given a disk, /dev/sdb that is encrypted with luks, with a filesystem
created on top)
mount /dev/sdb /mnt
(prompted for luks password)
...
umount /mnt
(at this point, before the breaking change, the luks device was auto
closed, by libpam-mount)
Now it is necessary to manually run, after 'umount /mnt':
cryptsetup luksClose _dev_sdb


Also, during the same period, network devices named 'usbN' suddenly
changed to being called 'ethN', breaking existing network configuration
(using net.ifnames=0).

Because the root issue appears to be device naming behavior changes for
all these issues, I am assuming the root cause is a udev change. If you
feel this bug belongs somewhere else, please re-assign.

Linux nim 6.1.0-30-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.124-1
(2025-01-12) x86_64 GNU/Linux

libc6:amd64    2.36-9+deb12u9
coreutils      9.1-1

udev upgrade history between last known working state, and current
broken state:
2025-01-11  15:21:06  udev:amd64 (252.31-1~deb12u1, 252.33-1~deb12u1)
2024-11-09  17:29:35  udev:amd64 (252.30-1~deb12u2, 252.31-1~deb12u1)

#1093674#10
Date:
2025-01-22 02:16:09 UTC
From:
To:
Updating one of the affected machines to Trixie restored original device
naming behavior for encrypted volumes.

df output on upgraded system:

df -a /mnt
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/_dev_sdb 976746200 589563584 386680320  61% /mnt

With device naming restored, libpam-mount now, again, automatically
closes  the underlying luks volume when umounting the filesystem.


However, usb network device naming remains changed from usbN to ethN
(e.g., when USB tethering a phone).

udev           257.2-1

Linux nim 6.12.9-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.9-1
(2025-01-10) x86_64 GNU/Linux

No other changes to system besides dist-upgrade to Trixie.