]> git.proxmox.com Git - pve-storage.git/blobdiff - PVE/API2/Disks/LVMThin.pm
api: disks: create: re-check disk after fork/lock
[pve-storage.git] / PVE / API2 / Disks / LVMThin.pm
index 4d303f8daa89dbb0fdc35ceb8fb29ade1eebe62e..81d91a616034615f35514fd26004e497a0a92676 100644 (file)
@@ -108,6 +108,8 @@ __PACKAGE__->register_method ({
 
        my $worker = sub {
            PVE::Diskmanage::locked_disk_action(sub {
+               PVE::Diskmanage::assert_disk_unused($dev);
+
                PVE::Storage::LVMPlugin::lvm_create_volume_group($dev, $name);
                my $pv = PVE::Storage::LVMPlugin::lvm_pv_info($dev);
                # keep some free space just in case