[pbs-devel] [PATCH proxmox-backup 10/15] debian: add udev rule for removable datastores

Hannes Laimer h.laimer at proxmox.com
Thu Aug 19 13:03:38 CEST 2021


Adds an udev rules that triggers the mounting of a removable datastore
if the corresponding device is plugged in.
---
 debian/proxmox-backup-server.udev | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/debian/proxmox-backup-server.udev b/debian/proxmox-backup-server.udev
index afdfb2bc..23b93464 100644
--- a/debian/proxmox-backup-server.udev
+++ b/debian/proxmox-backup-server.udev
@@ -16,3 +16,6 @@ SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="1", ENV{ID_SCSI_SER
   SYMLINK+="tape/by-id/scsi-$env{ID_SCSI_SERIAL}-sg"
 
 LABEL="persistent_storage_tape_end"
+
+# triggers the mounting of a removable datastore if the corresponding device is plugged in
+ACTION=="add", SUBSYSTEM=="block", RUN+="/usr/sbin/proxmox-backup-manager send-command mount-removable --args $env{ID_FS_UUID}"
-- 
2.30.2






More information about the pbs-devel mailing list