[pbs-devel] [PATCH proxmox-backup] api: add dedicated datastore disk schema

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Nov 29 09:56:24 CET 2023


Am 29/11/2023 um 09:24 schrieb Christian Ebner:
>> On 28.11.2023 18:49 CET Thomas Lamprecht <t.lamprecht at proxmox.com> wrote:
>> 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`.
> 

The base intention I get, and I think too that this could/should be
improved.

> 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.
> 

Why not STORAGE_NAME_SCHEMA then? As this is used as datastore name
is only for convenience and might not happen if one doesn't ticks the
"add as datastore" checkbox.
So having this naming hardwired to datastore or disk, while it isn't
necessarily related to either type, is IMO just not that ideal.

As description you could then use something like:

"Name of the Storage. Will be also used for any datastore name, if part of an transaction."

(not really ideal as it's worded a bit overly generic, but just to convey
the base idea).




More information about the pbs-devel mailing list