all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup] api: config: allow creation of removable datastore at `/`
@ 2025-09-02  4:51 Hannes Laimer
  0 siblings, 0 replies; only message in thread
From: Hannes Laimer @ 2025-09-02  4:51 UTC (permalink / raw)
  To: pbs-devel

Not allowing `/` only really makes sense for normal datastores,
because this `/` does not refer to the root of the system, but to the
root of the fs on the device.

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
---
 src/api2/config/datastore.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/api2/config/datastore.rs b/src/api2/config/datastore.rs
index e86ded0db..3b03c0466 100644
--- a/src/api2/config/datastore.rs
+++ b/src/api2/config/datastore.rs
@@ -115,7 +115,7 @@ pub(crate) fn do_create_datastore(
 ) -> Result<(), Error> {
     let path: PathBuf = datastore.absolute_path().into();
 
-    if path.parent().is_none() {
+    if path.parent().is_none() && datastore.backing_device.is_none() {
         bail!("cannot create datastore in root path");
     }
 
-- 
2.47.2



_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-09-02  4:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-02  4:51 [pbs-devel] [PATCH proxmox-backup] api: config: allow creation of removable datastore at `/` Hannes Laimer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal