[pve-devel] applied: [PATCH storage 02/10] api: disk: work around udev bug to ensure its database is updated

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Sep 30 18:08:30 CEST 2021


On 28.09.21 13:39, Fabian Ebner wrote:
> There is a udev bug [0] which can ultimately lead to the udev database
> for certain devices not being actively updated. Determining whether a
> disk is used or not in get_disks() (in part) relies upon lsblk, which
> queries the udev database. Ensure the information is updated by
> manually calling 'udevadm trigger' for the changed devices.
> 
> It's most important for the 'directory' API path, as mounting depends
> on the '/dev/disk/by-uuid'-symlink to be generated.
> 
> [0]: https://github.com/systemd/systemd/issues/18525
> 
> Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
> ---
>  PVE/API2/Disks.pm           | 11 ++++++++++-
>  PVE/API2/Disks/Directory.pm |  6 ++++++
>  PVE/API2/Disks/LVM.pm       |  8 +++++++-
>  PVE/API2/Disks/LVMThin.pm   |  6 ++++++
>  PVE/API2/Disks/ZFS.pm       |  6 ++++++
>  5 files changed, 35 insertions(+), 2 deletions(-)
> 
>

applied, thanks! albeit putting that into a method and only calling it like:

PVE::Diskmanage::workaround_stale_udev_db_bug(); # FIXME: remove in PVE 8.x

would have been slightly nicer, or at least more concise.
But anyhow, no biggie -> applied.





More information about the pve-devel mailing list