How to disable USB Attached Storage (UAS)
USB Attached Storage (UAS) is now commonly found for USB 3.0 storage devices. However, this sometimes causes issues with non-compliant adapters requiring it to be disabled. Issues with having UAS enabled include slow write performance, or having the device randomly drop off until the USB connection is reset.
Finding the USB device ID
To disable UAS for a specific USB device, find the USB device associated with the drive. This can be accomplished by either reviewing the dmesg kernel logs or using lsusb. For example, this Seagate expansion drive has the device ID 0bc2:3343:
# lsusb
Bus 004 Device 002: ID 0bc2:3343 Seagate RSS LLC Desktop
Disabling UAS
After knowing the device ID, there are three ways to disable UAS.
Manually reload the kernel module (temporary)
A temporary solution: Temporarily reload the usb-storage kernel module with the quirks.
Unload the usb-storage kernel module and re-load it with a quirk parameter specifying which device to not enable UAS on.
# lsusb
Bus 002 Device 005: ID 0bc2:3343 Seagate RSS LLC
# rmmod usb-storage
# modprobe usb-storage quirks=0bc2:3343:u
Re-attach the USB device again. This time, dmesg should say that a quirk was detected for this device:
[947347.271519] usb 2-3.2: New USB device found, idVendor=0bc2, idProduct=3343, bcdDevice= 1.00
[947955.635329] usb-storage 2-3.2:1.0: Quirks match for vid 0bc2 pid 3343: 800000
Disable permanently with modprobe.d
Create a new file in /etc/modprobe.d/disable-uas.conf with the following contents:
usb-storage quirks=0bc2:3322:u
Reboot the machine. When the kernel module is loaded again, it should be aware of the quirk.
Disable permanently with kernel cmdline arguments
Change your bootloader so that the quirk values are passed to the kernel.
Edit /etc/default/grub and add the following to GRUB_CMDLINE_LINUX:
usb-storage.quirks=0bc2:3322:u
Rebuild the grub configs with grub2-mkconfig -o /boot/grub2/grub.cfg and reboot.