Hello everyone,
I recently migrated a physical IBM server to a proxmox VM
I would like to re-use the IBM RDX device with removable disks as daily backup target.
First of all, I mounted the /dev/sdd1 device into a /backup folder and configured as a storage entry (type Directory, VZDump selected)
Then I created a specific backup entry in the proxmox GUI, selecting a the folder-mounted backup target.
Everything works as expected.
Now, I would like to automatically mount the device when the backup starts and unmount+eject it when the backup completes successfully.
My first attempt of a custom script (configured in /etc/vzdump.conf) is the following:
Unfortunately the backup fails with this error:
After the error, I can see that the device is correctly mounted.
If I immediately run the backup again, it works:
What could I be missing?
I recently migrated a physical IBM server to a proxmox VM
I would like to re-use the IBM RDX device with removable disks as daily backup target.
First of all, I mounted the /dev/sdd1 device into a /backup folder and configured as a storage entry (type Directory, VZDump selected)
Then I created a specific backup entry in the proxmox GUI, selecting a the folder-mounted backup target.
Everything works as expected.
Now, I would like to automatically mount the device when the backup starts and unmount+eject it when the backup completes successfully.
My first attempt of a custom script (configured in /etc/vzdump.conf) is the following:
Code:
#!/bin/bash
if [ "$1" == "backup-start" ]; then
echo "mounting RDX..."
mount /dev/sdd1 /backup
sleep 10
echo "...done"
exit 0
fi
if [ "$1" == "backup-end" ]; then
if mountpoint -q /backup; then
echo "RDX is mounted. unmounting..."
umount /backup
echo "...done"
echo "Ejecting RDX..."
eject /dev/sdd
echo "...done"
exit 0
else
echo "RDX is not mounted. error"
exit 1
fi
fi
Unfortunately the backup fails with this error:
Code:
INFO: starting new backup job: vzdump 108 --compress lzo --mailto xxxx@xxxx --node pve2 --storage cassetta --remove 0 --mode snapshot
INFO: Starting Backup of VM 108 (qemu)
INFO: status = running
INFO: update VM 108: -lock backup
INFO: VM Name: zucchetti-clone
INFO: include disk 'scsi0' 'large:vm-108-disk-0' 1000G
INFO: include disk 'efidisk0' 'large:vm-108-disk-1' 128K
INFO: backup mode: snapshot
INFO: ionice priority: 7
INFO: mounting RDX...
INFO: ...done
ERROR: Backup of VM 108 failed - unable to open '/backup/dump/vzdump-qemu-108-2019_01_20-14_53_09.tmp/qemu-server.conf' at /usr/share/perl5/PVE/VZDump/QemuServer.pm line 188.
INFO: Backup job finished with errors
TASK ERROR: job errors
After the error, I can see that the device is correctly mounted.
If I immediately run the backup again, it works:
Code:
INFO: starting new backup job: vzdump 108 --remove 0 --mode snapshot --storage cassetta --node pve2 --compress gzip --mailto xxxx@xxxx
INFO: Starting Backup of VM 108 (qemu)
INFO: status = running
INFO: update VM 108: -lock backup
INFO: VM Name: zucchetti-clone
INFO: include disk 'scsi0' 'large:vm-108-disk-0' 1000G
INFO: include disk 'efidisk0' 'large:vm-108-disk-1' 128K
INFO: backup mode: snapshot
INFO: ionice priority: 7
INFO: mounting RDX...
INFO: mount: /dev/sdd1 is already mounted or /backup busy
INFO: /dev/sdd1 is already mounted on /backup
INFO: ...done
INFO: creating archive '/backup/dump/vzdump-qemu-108-2019_01_20-15_14_13.vma.gz'
INFO: started backup task '9743e502-343b-4e0f-8eed-07ff4221e6ef'
INFO: status: 0% (739835904/1073746018304), sparse 0% (460558336), duration 3, read/write 246/93 MB/s
......
What could I be missing?
Last edited: