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 AAB6FB3653 for ; Wed, 29 Nov 2023 09:24:41 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 8D9B81D84 for ; Wed, 29 Nov 2023 09:24:41 +0100 (CET) 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)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Wed, 29 Nov 2023 09:24:40 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 249B442313 for ; Wed, 29 Nov 2023 09:24:40 +0100 (CET) Date: Wed, 29 Nov 2023 09:24:39 +0100 (CET) From: Christian Ebner To: Thomas Lamprecht , Proxmox Backup Server development discussion Message-ID: <665749042.845.1701246279052@webmail.proxmox.com> In-Reply-To: <0070de9f-876b-4a31-8b7a-c9f08c341a24@proxmox.com> References: <20231128152519.34316-1-c.ebner@proxmox.com> <0070de9f-876b-4a31-8b7a-c9f08c341a24@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Normal X-Mailer: Open-Xchange Mailer v7.10.6-Rev55 X-Originating-Client: open-xchange-appsuite X-SPAM-LEVEL: Spam detection results: 0 AWL 0.051 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy 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: Re: [pbs-devel] [PATCH proxmox-backup] api: add dedicated datastore disk schema X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Nov 2023 08:24:41 -0000 > On 28.11.2023 18:49 CET Thomas Lamprecht wrote: > > > Am 28/11/2023 um 16:25 schrieb Christian Ebner: > > Introduce a dedicated datastore disk schema for disks, to semantically > > distinguish between datastore name and datastore disk name. > > > > Further, adapt the systemd mount unit description accordingly. > > > > Signed-off-by: Christian Ebner > > --- > > pbs-api-types/src/datastore.rs | 6 ++++++ > > src/api2/node/disks/directory.rs | 8 ++++---- > > src/api2/node/disks/zfs.rs | 4 ++-- > > src/bin/proxmox_backup_manager/disk.rs | 10 +++++----- > > 4 files changed, 17 insertions(+), 11 deletions(-) > > > > diff --git a/pbs-api-types/src/datastore.rs b/pbs-api-types/src/datastore.rs > > index 1f619c9d..4150c6c6 100644 > > --- a/pbs-api-types/src/datastore.rs > > +++ b/pbs-api-types/src/datastore.rs > > @@ -102,6 +102,12 @@ pub const DATASTORE_SCHEMA: Schema = StringSchema::new("Datastore name.") > > .max_length(32) > > .schema(); > > > > +pub const DATASTORE_DISK_SCHEMA: Schema = StringSchema::new("Datastore disk name.") > > + .format(&PROXMOX_SAFE_ID_FORMAT) > > + .min_length(3) > > + .max_length(32) > > + .schema(); > > + > > this is not really helping me, while that might be because its late, I also think > that this needs a different name, as what is a datastore-disk here actually? The intention was to distinguish between the datastore itself and the disk, on which the datastore might be created upon, as these are 2 independent entities. Most of the time they will be referred to by the same name, as e.g. created by `proxmox-backup-manager disk fs create foo --disk sdd --add-datastore true`. I choose to refer to this as `datastore disk` as that is what the API methods in src/api2/node/disks/directory.rs are called. Unfortunately, that does not really match up with ZFS, as there the name refers to the zpool.