From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 98D057BD7A for ; Wed, 13 Jul 2022 12:48:30 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 9019318B6 for ; Wed, 13 Jul 2022 12:48:00 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Wed, 13 Jul 2022 12:47:59 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id A5F7042165 for ; Wed, 13 Jul 2022 12:47:59 +0200 (CEST) From: Aaron Lauterer To: pve-devel@lists.proxmox.com Date: Wed, 13 Jul 2022 12:47:55 +0200 Message-Id: <20220713104758.651614-1-a.lauterer@proxmox.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.017 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - Subject: [pve-devel] [PATCH storage 0/3] disks: add checks, allow add_storage on other nodes X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2022 10:48:30 -0000 This series deals mainly with 2 things, adding more checks prior to actually setting up a new local storage to avoid leaving behind half provisioned disks in case a storage (lvm, zfs, ...) of the same name already exists. Secondly, to change the behavior regarding the "Add Storage" flag. It allows to keep in enabled and will create the local storage and add the node to the nodes list of the PVE storage config if there already exists one in the cluster. The first patch is a prerequisite to be able to check if a mount path for the Directory storage type is already mounted. The second patch implements the actual checks. The third patch adds the changed behavior for the "Add Storage" part. More in the actual patches. Aaron Lauterer (3): diskmanage: add mounted_paths disks: die if storage name is already in use disks: allow add_storage for already configured local storage PVE/API2/Disks/Directory.pm | 37 ++++++++++++++++++++++----------- PVE/API2/Disks/LVM.pm | 33 +++++++++++++++++++---------- PVE/API2/Disks/LVMThin.pm | 33 +++++++++++++++++++---------- PVE/API2/Disks/ZFS.pm | 33 ++++++++++++++++++++--------- PVE/Diskmanage.pm | 13 ++++++++++++ PVE/Storage.pm | 41 +++++++++++++++++++++++++++++++++++++ 6 files changed, 146 insertions(+), 44 deletions(-) -- 2.30.2