I struggling now for hours.
I want to mount an external disk before backup and unmount it afterward. The mounting works fine as expected, but the unmounting not. It prints that it was unmounted:
Hopefully, someone knows, what is going wrong here.
I have the following hook script for the backup job:
I want to mount an external disk before backup and unmount it afterward. The mounting works fine as expected, but the unmounting not. It prints that it was unmounted:
INFO: umount: /mnt/seagate (/dev/sdc2) unmounted
. But in /proc/mounts
it still appears and if I'm clicking on the dataset in PVE the disk spins up and all information is displayed. When I do the umount manually everything works. Also, my shell script which does the same umount -> hd-idle
(was copied) works. But not inside the hook-script.Hopefully, someone knows, what is going wrong here.
I have the following hook script for the backup job:
Bash:
#!/bin/bash
set -o errexit
case "${1}" in
job-end)
sleep 20s
umount /mnt/seagate
echo "Partition /dev/sdc2 ausgehangen."
sleep 10s #Notwendig, damit hd-idle funktioniert
hd-idle -t /dev/sdc
echo "Festplatte /dev/sdc in Standby versetzt."
;;
job-start)
mount -t ntfs-3g /dev/sdc2 /mnt/seagate
echo "Partition /dev/sdc2 in /mmt/seagate/ eingehangen."
;;
esac