USB drive slow after connection

hobsoni

Member
Jul 22, 2022
20
1
8
I have a USB drive, formatted to ext4 that I use under proxmox for backup of my VMs.

Normally backup proceeds at between 250 and 300 Mbps (USB3 speed).

However, if I disconnect the USB drive, and reconnect (same cable, same port) I have to get it recognised by running "mount -a" in the cluster's shell. That appears to work OK, but afterwards, backups run as between 2.5 and 3.0 Mbps. This is not a typo. It is less than 1% of the speed.

If I reboot, all starts to work properly again.

This is my fstab file.

Code:
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/pve/root / ext4 errors=remount-ro 0 1
UUID=0E21-1B07 /boot/efi vfat defaults 0 1
/dev/pve/swap none swap sw 0 0
proc /proc proc defaults 0 0

# and the usb drive
/dev/sdb1 /mnt/usb_storage  ext4  defaults 0 0
root@cyllene:~#

How can I get the USB drive to be recognised properly (preferably automatically), and work as intended?
 
I'm still unable to solve this. I have tried everything I can think of.

I have found that the USB drive may be impacted by;
/etc/fstab
/etc/pve/storage.cfg
/etc/pve/jobs.cfg

Can anyone shed any light on this, or direct me to a way of solving this issue?
 
Are you sure it is mounting the correct disk? "/dev/sdb1" isn't a unique identifier and your disk may be called sdc, sdd, sde or whatever after unplugging and reconnecting it.
Would be better if you mount it using a unique identifier like its part-UUID or "/dev/disk/by-id/usb-YourDiskIdentifier-part1".

And fstab will only mount that disk once at boot. And it will prevent booting when the external disk isn't connected.
You might want to test some other mounting methods. Tools like autofs for example can automount usb disks each time you connect it to the server.
 
Last edited: