Umount removable datastore device after sync

nikybiasion

Renowned Member
May 28, 2012
24
5
68
I'm trying to use the sync-on-mount feature of PBS 4.0 to sync backups to external disks.

The idea is to connect a USB disk, perform the sync, and then disconnect it. The operation is carried out by non-qualified personnel, simply by connecting and disconnecting the USB disks.

Everything would work, but I've noticed that when the disk is disconnected, the mount point remains active at /mnt/datastore/usbX. This causes each newly connected device to be detected as a new device, like /dev/sdc, sdd, sde, and so on.

What should I do to properly disconnect the mount point? In a previous script, I used to stop the proxmox-backup service, unmount the drive, and then restart the service. Do I need to continue doing it this way?