5
0
mirror of git://git.proxmox.com/git/pve-storage.git synced 2025-02-03 13:47:16 +03:00
Aaron Lauterer 55553bd432 disks: die if storage name is already in use
If a storage of that type and name already exists (LVM, zpool, ...) but
we do not have a Proxmox VE Storage config for it, it is possible that
the creation will fail midway due to checks done by the underlying
storage layer itself. This in turn can lead to disks that are already
partitioned. Users would need to clean this up themselves.

By adding checks early on, not only checking against the PVE storage
config, but against the actual storage type itself, we can die early
enough, before we touch any disk.

For ZFS, the logic to gather pool data is moved into its own function to
be called from the index API endpoint and the check in the create
endpoint.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
2022-09-13 10:05:16 +02:00
2022-08-16 13:56:56 +02:00
2022-06-15 10:49:22 +02:00
2021-11-09 17:02:29 +01:00
Description
No description provided
2.1 MiB
Languages
Perl 99.2%
Makefile 0.7%