[pbs-devel] [PATCH proxmox-backup] api: config: allow creation of removable datastore at `/`

Hannes Laimer h.laimer at proxmox.com
Tue Sep 2 06:51:56 CEST 2025


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





More information about the pbs-devel mailing list