pve6-usb-automount uses the mount option "sync" for mounting drives. This means no caches or other optimations are used for write operations. This can be especially slow on mechanical drives. The benefit is when the write process finishes the data was really written on disk and not in some cache. This is enabled by default to avoid data loss when someone just unplugs the drive.
You can try to enable async mode in the /usr/bin/pve6_usb_automount.py script. Just search for -o sync and change to async or delete this section and restart the pve6-usb-automount service, then unplug and plug in your disk again. You can see the mode by running the mount command.
thanks for this very useful tool. I have attached a 1.5TB HDD via USB3. It gets recognized and I find it in /media/sdb1/ and create backups from my two lxc containers. However, I cannot create a backup of my VM on this external drive.
INFO: starting new backup job: vzdump 305 --node proxmox --compress gzip --storage usb-sdb1 --remove 0 --mode stop
INFO: Starting Backup of VM 305 (qemu)
INFO: Backup started at 2021-01-12 14:32:37
INFO: status = stopped
INFO: backup mode: stop
INFO: ionice priority: 7
INFO: VM Name: ubuntu
INFO: include disk 'scsi0' 'local-lvm:vm-305-disk-0' 40G
INFO: include disk 'efidisk0' 'local-lvm:vm-305-disk-1' 4M
INFO: creating vzdump archive '/media/sdb1/dump/vzdump-qemu-305-2021_01_12-14_32_37.vma.gz'
INFO: starting kvm to execute backup task
kvm: vfio: Cannot reset device 0000:00:14.2, no available reset mechanism.
kvm: vfio: Cannot reset device 0000:00:14.0, no available reset mechanism.
kvm: vfio: Cannot reset device 0000:00:14.2, no available reset mechanism.
kvm: vfio: Cannot reset device 0000:00:14.0, no available reset mechanism.
ERROR: unable to open file '/media/sdb1/dump/vzdump-qemu-305-2021_01_12-14_32_37.vma.dat' - No such file or directory
INFO: aborting backup job
INFO: stopping kvm after backup task
trying to acquire lock...
OK
ERROR: Backup of VM 305 failed - unable to open file '/media/sdb1/dump/vzdump-qemu-305-2021_01_12-14_32_37.vma.dat' - No such file or directory
INFO: Failed at 2021-01-12 14:32:42
cp: cannot create regular file '/media/sdb1/dump/vzdump-qemu-305-2021_01_12-14_32_37.log': No such file or directory
INFO: Backup job finished with errors
TASK ERROR: job errors
-- Logs begin at Tue 2021-01-12 14:29:13 CET. --
Jan 12 14:32:42 proxmox pvedaemon[13299]: INFO: Backup job finished with errors
Jan 12 14:32:42 proxmox pvedaemon[13299]: job errors
Jan 12 14:32:42 proxmox pvedaemon[1043]: <root@pam> end task UPIDroxmox:000033F3:000051D0:5FFDA4F5:vzdump:305:root@pam: job errors
Jan 12 14:32:43 proxmox systemd[1]: systemd-rfkill.service: Succeeded.
total 16
drwxr-xr-x 4 root root 4096 Jan 12 14:32 .
drwxr-xr-x 6 root root 4096 Jan 12 14:40 ..
drwxr-xr-x 2 root root 4096 Jan 12 14:16 vzdump-qemu-305-2021_01_12-14_16_55.tmp
drwxr-xr-x 2 root root 4096 Jan 12 14:32 vzdump-qemu-305-2021_01_12-14_32_37.tmp
It is possible to copy, also big files, to this drive via console, so I assume it is some specific conflict here. Please also not that it is possible to create a backup of this same VM to my local drive. Also, after the error message the external drive is not visible in Proxmox anymore and the mountpoint /media/sdb1 is empty. At that point I can only restart the Proxmox host and then later attach the drive in order to make it show up again.
I think I found a possible reason and it is due to the fact that I am passing through 2 devices to the guest VM: the IGPU and the bluetooth module. The latter one (00:14:3) shares the same prefix of the address as the USB controller (00:14:0). As a consequence all USB devices are no longer accessible to the host when the VM starts and, which I also did no know when starting a backup. I can verify this with "lsub" which gives results before the VM starts, but the output is empty after it starts.
Upon removing hostpci0: 00:14,pcie=1 from the VM and restarting the host, the backups runs fine. In the error message of my previous post you can also see some messages related to this:
kvm: vfio: Cannot reset device 0000:00:14.2, no available reset mechanism.
kvm: vfio: Cannot reset device 0000:00:14.0, no available reset mechanism.
kvm: vfio: Cannot reset device 0000:00:14.2, no available reset mechanism.
kvm: vfio: Cannot reset device 0000:00:14.0, no available reset mechanism.
Since I created that part of the config with the Proxmox UI, I wonder if there is a better way to specifically pass through just device 00:14.3 rather than 00:14 and will investigate here a bit more. But when doing that by adding hostpci0: 00:14.3,pcie=1 I do not seem to get the bluetooth passed through.
As a side note 00:14.3 is in a different IOMMU group as the other devices from 00:14
Does this map to the GUID of the USB devices so as to always mount it as the same name? If not, could you extend it to do so? I simply want reliability in naming for certain drives.
Also could you please extend its functionality to 1) allow us to custom name volumes and 2) select if we don't want certain volumes mounted??
For example, when I insert some drives that are GPT and have an EFI partition/volume, I do not want those to automatically show up. It would be nice to have a way to select those to not show up when auto-mounting.
I use this tool on Proxmox 6.4-13.
How can I cleanly remove this tool?
I already did it with apt remove pve6-usb-automount as well as that
"deb https://apt.iteas.at/iteas buster main"> "removed from" /etc/apt/sources.list.d/iteas.list ".
However, this doesn't seem to be enough and my system won't boot afterwards.
And outputs an error with "pve6-usb-automount".
I use this tool on Proxmox 6.4-13.
How can I cleanly remove this tool?
I already did it with apt remove pve6-usb-automount as well as that
"deb https://apt.iteas.at/iteas buster main"> "removed from" /etc/apt/sources.list.d/iteas.list ".
However, this doesn't seem to be enough and my system won't boot afterwards.
And outputs an error with "pve6-usb-automount".
Hmm, ok schein dann nicht richtig deinstalliert worden zu sein. Du musst dein System, sofern es immer noch nicht bootet im RecoveryMode hochfahren und den Automounter mit --purge deinstallieren. Dann wird auch jeglichen Config sauber gelöscht.
Hmm, ok schein dann nicht richtig deinstalliert worden zu sein. Du musst dein System, sofern es immer noch nicht bootet im RecoveryMode hochfahren und den Automounter mit --purge deinstallieren. Dann wird auch jeglichen Config sauber gelöscht.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.