public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Christian Ebner <c.ebner@proxmox.com>
To: Thomas Lamprecht <t.lamprecht@proxmox.com>,
	Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>
Subject: Re: [pbs-devel] [PATCH proxmox-backup] api: add dedicated datastore disk schema
Date: Wed, 29 Nov 2023 09:24:39 +0100 (CET)	[thread overview]
Message-ID: <665749042.845.1701246279052@webmail.proxmox.com> (raw)
In-Reply-To: <0070de9f-876b-4a31-8b7a-c9f08c341a24@proxmox.com>

> On 28.11.2023 18:49 CET Thomas Lamprecht <t.lamprecht@proxmox.com> 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 <c.ebner@proxmox.com>
> > ---
> >  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.




  reply	other threads:[~2023-11-29  8:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-28 15:25 Christian Ebner
2023-11-28 17:49 ` Thomas Lamprecht
2023-11-29  8:24   ` Christian Ebner [this message]
2023-11-29  8:56     ` Thomas Lamprecht
2023-11-29  9:13       ` Christian Ebner
2023-11-29  9:21         ` Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=665749042.845.1701246279052@webmail.proxmox.com \
    --to=c.ebner@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    --cc=t.lamprecht@proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal