]> git.proxmox.com Git - pve-storage.git/commitdiff
fix #1929: only check storage if user want to create one
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 25 Sep 2018 08:38:02 +0000 (10:38 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 3 Oct 2018 12:30:22 +0000 (14:30 +0200)
this is useful if a user wants to create similar storage on each host

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
PVE/API2/Disks/Directory.pm
PVE/API2/Disks/LVM.pm
PVE/API2/Disks/LVMThin.pm
PVE/API2/Disks/ZFS.pm

index f076ee7f5ef1b9b31a5656739479ed5a90848d4c..d76cf10174f165626a3502286bc2f7c26c240023 100644 (file)
@@ -202,7 +202,7 @@ __PACKAGE__->register_method ({
 
        $dev = PVE::Diskmanage::verify_blockdev_path($dev);
        PVE::Diskmanage::check_unused($dev);
-       PVE::Storage::check_available($name);
+       PVE::Storage::check_available($name) if $param->{add_storage};
 
        my $worker = sub {
            my $path = "/mnt/pve/$name";
index 82c150228a61ee70da523970fd02cb9c97fd2001..9556a2451e8d332be29eb698d0165d886ab680d2 100644 (file)
@@ -150,7 +150,7 @@ __PACKAGE__->register_method ({
 
        $dev = PVE::Diskmanage::verify_blockdev_path($dev);
        PVE::Diskmanage::check_unused($dev);
-       PVE::Storage::check_available($name);
+       PVE::Storage::check_available($name) if $param->{add_storage};
 
        my $worker = sub {
            PVE::Diskmanage::locked_disk_action(sub {
index 62d3b61ef42d3fa39e0fe6bb108bbf0ba4d10297..717897d8b3c94d8fee25ea97f7bdcb276aaac676 100644 (file)
@@ -104,7 +104,7 @@ __PACKAGE__->register_method ({
 
        $dev = PVE::Diskmanage::verify_blockdev_path($dev);
        PVE::Diskmanage::check_unused($dev);
-       PVE::Storage::check_available($name);
+       PVE::Storage::check_available($name) if $param->{add_storage};
 
        my $worker = sub {
            PVE::Diskmanage::locked_disk_action(sub {
index 19ccedffbdcccd10c911c154c6cfb4a3a4cf82b7..a44f57388302b2f1a79277e95560d27c85a811b3 100644 (file)
@@ -344,7 +344,7 @@ __PACKAGE__->register_method ({
            PVE::Diskmanage::check_unused($dev);
        }
 
-       PVE::Storage::check_available($name);
+       PVE::Storage::check_available($name) if $param->{add_storage};
 
        my $numdisks = scalar(@$devs);
        my $mindisks = {