]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/API2/Disks/LVMThin.pm
api: disk: work around udev bug to ensure its database is updated
[pve-storage.git] / PVE / API2 / Disks / LVMThin.pm
index 81d91a616034615f35514fd26004e497a0a92676..2fd84845654ffd50c7b74b2df5f9f25b52892b8d 100644 (file)
@@ -132,6 +132,12 @@ __PACKAGE__->register_method ({
                    $name
                ]);
 
+               # FIXME: Remove once we depend on systemd >= v249.
+               # Work around udev bug https://github.com/systemd/systemd/issues/18525 to ensure the
+               # udev database is updated.
+               eval { run_command(['udevadm', 'trigger', $dev]); };
+               warn $@ if $@;
+
                if ($param->{add_storage}) {
                    my $storage_params = {
                        type => 'lvmthin',