[pbs-devel] [PATCH v2 proxmox-backup 02/15] config: add uuid+mountpoint to DataStoreConfig

Hannes Laimer h.laimer at proxmox.com
Mon Aug 30 13:14:52 CEST 2021


Expand the DataStoreConfig to also save the uuid and the
mount-point for removable datastores, a datastore is removable iff both
are set.
---
 src/config/datastore.rs | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/src/config/datastore.rs b/src/config/datastore.rs
index cfa03547..b225b20f 100644
--- a/src/config/datastore.rs
+++ b/src/config/datastore.rs
@@ -80,6 +80,16 @@ pub const DIR_NAME_SCHEMA: Schema = StringSchema::new("Directory name").schema()
             optional: true,
             type: bool,
         },
+        "backing-device": {
+            description: "The UUID of the device, iff the datastore is removable.",
+            optional: true,
+            type: String,
+        },
+        "backing-device-mount-point": {
+            description: "The mount point of the device, iff the datastore is removable.",
+            optional: true,
+            type: String,
+        },
     }
 )]
 #[derive(Serialize,Deserialize,Updater)]
@@ -117,6 +127,12 @@ pub struct DataStoreConfig {
     /// Send notification only for job errors
     #[serde(skip_serializing_if="Option::is_none")]
     pub notify: Option<String>,
+    /// The UUID of the device(iff removable)
+    #[serde(skip_serializing_if="Option::is_none")]
+    pub backing_device: Option<String>,
+    /// The mount point of the device(iff removable)
+    #[serde(skip_serializing_if="Option::is_none")]
+    pub backing_device_mount_point: Option<String>,
 }
 
 fn init() -> SectionConfig {
-- 
2.30.2






More information about the pbs-devel mailing list