]> git.ipfire.org Git - thirdparty/systemd.git/commit
udev: allow persistent storage rules for ublk devices
authorUday Shankar <ushankar@purestorage.com>
Thu, 10 Oct 2024 20:29:10 +0000 (14:29 -0600)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 11 Oct 2024 08:29:26 +0000 (10:29 +0200)
commit225ddc4a72a425e4fdbfd26c887a8bf1d9b9c8ef
tree46c28827109722ac2dd8b6fee9ab196b7dbf9d53
parent5697bce82b1b37602255ac12e4a8f4a12305dc03
udev: allow persistent storage rules for ublk devices

Tools such as lsblk which query the udev database instead of probing
devices directly fail when run on ublk devices. For instance, in the
following commands, the partition type is missing, despite the fact that
/dev/ublkb0 was just partitioned with a single Linux filesystem type
partition.

$ lsblk /dev/ublkb0
NAME       MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
ublkb0     259:0    0 31.3G  0 disk
└─ublkb0p1 259:1    0 31.2G  0 part
$ lsblk -o pkname,parttype /dev/ublkb0
PKNAME PARTTYPE

ublkb0

This happens because ublk devices are missing from a couple of
whitelists in the udev rules which are responsible for populating the
database with the data lsblk is looking for. Add the ublk devices to
these whitelists.
rules.d/60-block.rules
rules.d/60-persistent-storage.rules.in