change tape drive lock path

New kernel has stricter checks on tmpfs with stick-bit on directories, so some
commands (i.e. proxmox-tape changer status) fails when executed as root, because
permission checks fails when locking the drive.

This patch move the drive locks to /run/proxmox-backup/drive-lock.

Note: This is incompatible to old locking mechmanism, so users may not
run tape backups during update (or running backup can fail).
This commit is contained in:
Dietmar Maurer
2021-07-12 17:23:38 +02:00
committed by Thomas Lamprecht
parent 49e47c491b
commit a0cd0f9cec
3 changed files with 22 additions and 3 deletions

View File

@ -45,6 +45,7 @@ async fn run() -> Result<(), Error> {
proxmox_backup::tape::create_tape_status_dir()?;
proxmox_backup::tape::create_drive_state_dir()?;
proxmox_backup::tape::create_changer_state_dir()?;
proxmox_backup::tape::create_drive_lock_dir()?;
if let Err(err) = generate_auth_key() {
bail!("unable to generate auth key - {}", err);