[SOLVED] USB passthrough: device shows up but hard disk is not listed

jerry4on

New Member
Jul 24, 2019
5
3
1
36
Hi all,

I met a problem when I passthrough the usb device that supports to insert two 3.5 inch hard disks.

I can successfully passthrough the usb device, verified by `lsusb` (the first line "JMicron ...")

Code:
root@ubuntu-vm:~# lsusb
Bus 003 Device 002: ID 152d:9561 JMicron Technology Corp. / JMicron USA Technology Corp.
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

However, the block device is not listed:
Code:
root@ubuntu-vm:~# lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0   10G  0 disk
└─sda1   8:1    0   10G  0 part /
sr0     11:0    1  883M  0 rom

I tried stop and restart the vm, tried using both bus-port and vendor: product format. Still the same result. The hard disks is listed by `lsblk` in host when the vm is stopped.

Any inputs are welcome!

PVE version 5.4-3
More info about the guest vm:

Code:
cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.2 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.2 LTS"
VERSION_ID="18.04"
HOME_URL="xxxx"
SUPPORT_URL="xxx"
BUG_REPORT_URL="xxx"
PRIVACY_POLICY_URL="xxx"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
(remove external links as new user is not allowed :~)
Code:
uname -a
Linux ubuntu-vm 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
 
Last edited:
dmesg when restart
[ 1.424081] usb 1-1: new full-speed USB device number 2 using uhci_hcd
[ 1.636534] usb 3-1: new SuperSpeed USB device number 2 using xhci_hcd
[ 1.659034] usb 3-1: New USB device found, idVendor=152d, idProduct=9561
[ 1.659700] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=5
[ 1.660416] usb 3-1: Product: JMS56x Series
[ 1.661100] usb 3-1: Manufacturer: JMicron
[ 1.661758] usb 3-1: SerialNumber: 00000000000000000000
[ 1.666057] usbcore: registered new interface driver usb-storage
[ 1.670446] usb 3-1: Not enough host controller resources for new device state.
[ 1.671271] xhci_hcd 0000:01:1b.0: xHCI xhci_drop_endpoint called with disabled ep (ptrval)
[ 1.672720] xhci_hcd 0000:01:1b.0: xHCI xhci_drop_endpoint called with disabled ep (ptrval)
[ 1.674148] xhci_hcd 0000:01:1b.0: xHCI xhci_drop_endpoint called with disabled ep (ptrval)
[ 1.700296] uas: probe of 3-1:1.0 failed with error -12
[ 1.701094] usbcore: registered new interface driver uas
[ 1.724493] usb 1-1: not running at top speed; connect to a high speed hub
[ 1.753692] usb 1-1: New USB device found, idVendor=0627, idProduct=0001
[ 1.754439] usb 1-1: New USB device strings: Mfr=1, Product=3, SerialNumber=5
[ 1.755206] usb 1-1: Product: QEMU USB Tablet
[ 1.755922] usb 1-1: Manufacturer: QEMU
[ 1.756653] usb 1-1: SerialNumber: 42
[ 1.763974] hidraw: raw HID events driver (C) Jiri Kosina
[ 1.770199] usbcore: registered new interface driver usbhid
[ 1.770963] usbhid: USB HID core driver
[ 1.773434] input: QEMU QEMU USB Tablet as /devices/pci0000:00/0000:00:01.2/usb1/1-1/1-1:1.0/0003:0627:0001.0001/input/input5
[ 1.775322] hid-generic 0003:0627:0001.0001: input,hidraw0: USB HID v0.01 Mouse [QEMU QEMU USB Tablet] on usb-0000:00:01.2-1/input0
[ 1.888037] tsc: Refined TSC clocksource calibration: 3411.117 MHz
[ 1.888824] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x312b542b0b6, max_idle_ns: 440795263815 ns
[ 7.776226] random: fast init done
[ 10.000128] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[ 10.000236] sd 2:0:0:0: Attached scsi generic sg1 type 0
[ 10.000245] sd 2:0:0:0: Power-on or device reset occurred
[ 10.000945] sd 2:0:0:0: [sda] 20971520 512-byte logical blocks: (10.7 GB/10.0 GiB)
[ 10.000980] sd 2:0:0:0: [sda] Write Protect is off
[ 10.000981] sd 2:0:0:0: [sda] Mode Sense: 63 00 00 08
[ 10.001044] sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 10.003590] sda: sda1

Any ideas?
 
I unplug the device from USB 3 port of the host, and plug into a USB 2 port of the host. Now it works. but speed is very slow.

dmesg as below. Any input is welcome to make it work with USB3 mode.
[ 2.173436] usb 1-1: New USB device found, idVendor=152d, idProduct=9561
[ 2.174170] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=5
[ 2.174920] usb 1-1: Product: JMS56x Series
[ 2.175656] usb 1-1: Manufacturer: JMicron
[ 2.176398] usb 1-1: SerialNumber: 00000000000000000000
[ 2.185289] usbcore: registered new interface driver usb-storage
[ 2.190407] scsi host3: uas
[ 2.191230] usbcore: registered new interface driver uas
[ 2.194279] scsi 3:0:0:0: Direct-Access WDC WD30 EURS-73TLHY0 0105 PQ: 0 ANSI: 6
[ 2.202615] scsi 3:0:0:1: Direct-Access WDC WD30 EURS-73TLHY0 0105 PQ: 0 ANSI: 6
[ 6.328210] random: fast init done
[ 10.488202] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[ 10.488289] sd 2:0:0:0: Power-on or device reset occurred
[ 10.488337] sd 2:0:0:0: Attached scsi generic sg1 type 0
[ 10.488685] sd 3:0:0:0: Attached scsi generic sg2 type 0
[ 10.488846] sd 2:0:0:0: [sda] 20971520 512-byte logical blocks: (10.7 GB/10.0 GiB)
[ 10.488889] sd 2:0:0:0: [sda] Write Protect is off
[ 10.488891] sd 2:0:0:0: [sda] Mode Sense: 63 00 00 08
[ 10.488974] sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 10.489017] sd 3:0:0:1: Attached scsi generic sg3 type 0
[ 10.491690] sda: sda1
[ 10.492449] sd 2:0:0:0: [sda] Attached SCSI disk
[ 10.494914] sd 3:0:0:0: [sdb] 5860533168 512-byte logical blocks: (3.00 TB/2.73 TiB)
[ 10.495367] sd 3:0:0:1: [sdc] 5860533168 512-byte logical blocks: (3.00 TB/2.73 TiB)
[ 10.495910] sd 3:0:0:0: [sdb] Write Protect is off
[ 10.495912] sd 3:0:0:0: [sdb] Mode Sense: 67 00 10 08
[ 10.496364] sd 3:0:0:1: [sdc] Write Protect is off
[ 10.496366] sd 3:0:0:1: [sdc] Mode Sense: 67 00 10 08
[ 10.497910] sd 3:0:0:0: [sdb] Write cache: enabled, read cache: enabled, supports DPO and FUA
[ 10.498365] sd 3:0:0:1: [sdc] Write cache: enabled, read cache: enabled, supports DPO and FUA
[ 10.501153] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[ 10.501869] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[ 10.593679] sdb: sdb1
[ 10.594296] sdc: sdc1
[ 10.608306] sd 3:0:0:1: [sdc] Attached SCSI disk
[ 10.608898] sd 3:0:0:0: [sdb] Attached SCSI disk
 
Resolved!!!

I have to disable UAS driver and use 'usb-storage' only to make it work:
Code:
root@ubuntu-vm:/etc/modprobe.d# cat blacklist-uas.conf
blacklist uas
root@ubuntu-vm:/etc/modprobe.d# cat usb-storage-quirks.conf
options usb-storage quirks=152d:9561:u
root@ubuntu-vm:/etc/modprobe.d# update-initramfs -u
root@ubuntu-vm:/etc/modprobe.d# shutdown -r now

as referred here: https://unix.stackexchange.com/questions/441668/debian-usb3-hdd-uas-i-o-errors

Hope it useful if you encounter same problem.

Related working `dmesg` for your reference:
[ 1.636358] usb 3-1: new SuperSpeed USB device number 2 using xhci_hcd
[ 1.658809] usb 3-1: New USB device found, idVendor=152d, idProduct=9561
[ 1.659493] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=5
[ 1.660206] usb 3-1: Product: JMS56x Series
[ 1.660887] usb 3-1: Manufacturer: JMicron
[ 1.661558] usb 3-1: SerialNumber: 00000000000000000000
[ 1.665817] usb 3-1: UAS is blacklisted for this device, using usb-storage instead
[ 1.666550] usb-storage 3-1:1.0: USB Mass Storage device detected
[ 1.667462] usb-storage 3-1:1.0: Quirks match for vid 152d pid 9561: 800000
[ 1.668310] scsi host3: usb-storage 3-1:1.0
 
Last edited:
Resolved!!!

I have to disable UAS driver and use 'usb-storage' only to make it work:
Code:
root@ubuntu-vm:/etc/modprobe.d# cat blacklist-uas.conf
blacklist uas
root@ubuntu-vm:/etc/modprobe.d# cat usb-storage-quirks.conf
options usb-storage quirks=152d:9561:u
root@ubuntu-vm:/etc/modprobe.d# update-initramfs -u
root@ubuntu-vm:/etc/modprobe.d# shutdown -r now

as referred here: https://unix.stackexchange.com/questions/441668/debian-usb3-hdd-uas-i-o-errors

Hope it useful if you encounter same problem.

Related working `dmesg` for your reference:
THANK YOU!

I migrated from VMWare to Proxmox, and one of my 5 external (Seagate BUP Slim) USB drives was failing to mount and I thought I lost a lot of important files, but the errors led me here and following these exact steps has fixed it! It must be something with how VMWare and Proxmox differ in their connectivity to these USB enclosures, but I no longer care as it's working just fine now :). Now to get better redundancy for my disks so the next time I run into one of these one in a million issues, it saves me from some stress!
 
Sorry for the late reply... I have your same issue with a terramaster enclosure.
I tried to blacklist uas and to pass usb-storage option.

Code:
/etc/modprobe.d/uas-blacklist.conf

blacklist uas
options usb-storage quirks=174c:55aa:u

174c and 55aa are the vendor and prodid found with usb-devices

I update initramfs but on reboot i still get:

Code:
[g9 ssh][me]:~>lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/9p, 20000M/x2
    |__ Port 2: Dev 2, If 0, Class=Mass Storage, Driver=uas, 10000M
    |__ Port 9: Dev 3, If 0, Class=Hub, Driver=hub/4p, 5000M
        |__ Port 3: Dev 6, If 0, Class=Mass Storage, Driver=uas, 5000M
        |__ Port 1: Dev 4, If 0, Class=Mass Storage, Driver=uas, 5000M
        |__ Port 4: Dev 7, If 0, Class=Mass Storage, Driver=uas, 5000M
        |__ Port 2: Dev 5, If 0, Class=Mass Storage, Driver=uas, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
    |__ Port 14: Dev 3, If 0, Class=Wireless, Driver=btusb, 12M
    |__ Port 14: Dev 3, If 1, Class=Wireless, Driver=btusb, 12M

So as far as I understand uas driver is still in use, but I can't figure out why
 
Last edited:
Hi everyone! I has the box too. But i can't do HDD's stop spin.
The HDD's goto slepping after 10 mins but after next ~10-20 mins the hdd poweron after 10 mins the hdd poweroff and it endless cycle.
[224441.107818] usb 2-1: New USB device found, idVendor=152d, idProduct=0565, bcdDevice= 0.09
[224441.107829] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=5
[224441.107832] usb 2-1: Product: JMS56x Series
[224441.107834] usb 2-1: Manufacturer: JMicron
[224441.107836] usb 2-1: SerialNumber: RANDOM__81E359879645
[259201.909850] usb 2-1: USB disconnect, device number 4
I used the man:
https://wiki.archlinux.org/title/Hdparm

user@pve:~$ cat /etc/udev/rules.d/69-hdparm.rules
Code:
ACTION=="add", SUBSYSTEM=="block", KERNEL=="sdb", RUN+="/usr/bin/hdparm -B 127 -S 120 /dev/sdb"
ACTION=="add", SUBSYSTEM=="block", KERNEL=="sdd", RUN+="/usr/bin/hdparm -B 255 -S 0 /dev/sdd"
ACTION=="add", SUBSYSTEM=="block", KERNEL=="sdc", RUN+="/usr/bin/hdparm -B 255 -S 0 /dev/sdc"

cat /etc/udev/rules.d/50-usb_power_save.rules
Code:
# whitelist for usb autosuspend
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="152d", ATTR{idProduct}=="0565", ATTR{power/autosuspend}="-1"

sudo hdparm -I /dev/sdc
Code:
/dev/sdc:

ATA device, with non-removable media
        Model Number:      Hitachi HDS722020ALA330
        Serial Number:      JK1121YAGA755S
        Firmware Revision:  JKAOA3EA
        Transport:          Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6; Revision: ATA8-AST T13 Project D1697 Revision 0b
Standards:
        Used: unknown (minor revision code 0x0029)
        Supported: 8 7 6 5
        Likely used: 8
Configuration:
        Logical        max    current
        cylinders      16383  16383
        heads          16      16
        sectors/track  63      63
        --
        CHS current addressable sectors:    16514064
        LBA    user addressable sectors:  268435455
        LBA48  user addressable sectors:  3907029168
        Logical/Physical Sector size:          512 bytes
        device size with M = 1024*1024:    1907729 MBytes
        device size with M = 1000*1000:    2000398 MBytes (2000 GB)
        cache/buffer size  = 29999 KBytes (type=DualPortCache)
        Form Factor: 3.5 inch
        Nominal Media Rotation Rate: 7200
Capabilities:
        LBA, IORDY(can be disabled)
        Queue depth: 32
        Standby timer values: spec'd by Standard, no device specific minimum
        R/W multiple sector transfer: Max = 16  Current = 0
        Advanced power management level: disabled
        DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
            Cycle time: min=120ns recommended=120ns
        PIO: pio0 pio1 pio2 pio3 pio4
            Cycle time: no flow control=120ns  IORDY flow control=120ns
Commands/features:
        Enabled Supported:
                SMART feature set
                Security Mode feature set
          *    Power Management feature set
          *    Write cache
          *    Look-ahead
          *    Host Protected Area feature set
          *    WRITE_BUFFER command
          *    READ_BUFFER command
          *    DOWNLOAD_MICROCODE
                Advanced Power Management feature set
                Power-Up In Standby feature set
          *    SET_FEATURES required to spinup after power up
                SET_MAX security extension
          *    48-bit Address feature set
          *    Device Configuration Overlay feature set
          *    Mandatory FLUSH_CACHE
          *    FLUSH_CACHE_EXT
          *    SMART error logging
          *    SMART self-test
                Media Card Pass-Through
          *    General Purpose Logging feature set
          *    WRITE_{DMA|MULTIPLE}_FUA_EXT
          *    64-bit World wide name
          *    URG for READ_STREAM[_DMA]_EXT
          *    URG for WRITE_STREAM[_DMA]_EXT
          *    WRITE_UNCORRECTABLE_EXT command
          *    Segmented DOWNLOAD_MICROCODE
          *    Gen1 signaling speed (1.5Gb/s)
          *    Gen2 signaling speed (3.0Gb/s)
          *    Native Command Queueing (NCQ)
          *    Host-initiated interface power management
          *    Phy event counters
          *    NCQ priority information
                Non-Zero buffer offsets in DMA Setup FIS
                DMA Setup Auto-Activate optimization
                Device-initiated interface power management
                In-order data delivery
          *    Software settings preservation
          *    SMART Command Transport (SCT) feature set
          *    SCT Write Same (AC2)
          *    SCT Error Recovery Control (AC3)
          *    SCT Features Control (AC4)
          *    SCT Data Tables (AC5)
Security:
        Master password revision code = 65534
                supported
        not    enabled
        not    locked
        not    frozen
        not    expired: security count
        not    supported: enhanced erase
        8min for SECURITY ERASE UNIT.
Logical Unit WWN Device Identifier: 5000cca221c4a69d
        NAA            : 5
        IEEE OUI        : 000cca
        Unique ID      : 221c4a69d
Checksum: correct

user@pve:~$ sudo hdparm -I /dev/sdd
Code:
/dev/sdd:

ATA device, with non-removable media
        Model Number:      WDC WD1002FAEX-00Y9A0
        Serial Number:      WD-WCAW30902173
        Firmware Revision:  05.01D05
        Transport:          Serial, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6
Standards:
        Supported: 8 7 6 5
        Likely used: 8
Configuration:
        Logical        max    current
        cylinders      16383  16383
        heads          16      16
        sectors/track  63      63
        --
        CHS current addressable sectors:    16514064
        LBA    user addressable sectors:  268435455
        LBA48  user addressable sectors:  1953525168
        Logical/Physical Sector size:          512 bytes
        device size with M = 1024*1024:      953869 MBytes
        device size with M = 1000*1000:    1000204 MBytes (1000 GB)
        cache/buffer size  = unknown
Capabilities:
        LBA, IORDY(can be disabled)
        Queue depth: 32
        Standby timer values: spec'd by Standard, with device specific minimum
        R/W multiple sector transfer: Max = 16  Current = 0
        Recommended acoustic management value: 128, current value: 254
        DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6
            Cycle time: min=120ns recommended=120ns
        PIO: pio0 pio1 pio2 pio3 pio4
            Cycle time: no flow control=120ns  IORDY flow control=120ns
Commands/features:
        Enabled Supported:
                SMART feature set
                Security Mode feature set
          *    Power Management feature set
          *    Write cache
          *    Look-ahead
          *    Host Protected Area feature set
          *    WRITE_BUFFER command
          *    READ_BUFFER command
          *    NOP cmd
          *    DOWNLOAD_MICROCODE
                Power-Up In Standby feature set
          *    SET_FEATURES required to spinup after power up
                SET_MAX security extension
                Automatic Acoustic Management feature set
          *    48-bit Address feature set
          *    Mandatory FLUSH_CACHE
          *    FLUSH_CACHE_EXT
          *    SMART error logging
          *    SMART self-test
          *    General Purpose Logging feature set
          *    64-bit World wide name
          *    {READ,WRITE}_DMA_EXT_GPL commands
          *    Segmented DOWNLOAD_MICROCODE
          *    Gen1 signaling speed (1.5Gb/s)
          *    Gen2 signaling speed (3.0Gb/s)
          *    Gen3 signaling speed (6.0Gb/s)
          *    Native Command Queueing (NCQ)
          *    Host-initiated interface power management
          *    Phy event counters
          *    NCQ priority information
                DMA Setup Auto-Activate optimization
          *    Software settings preservation
          *    SMART Command Transport (SCT) feature set
          *    SCT Write Same (AC2)
          *    SCT Features Control (AC4)
          *    SCT Data Tables (AC5)
                unknown 206[12] (vendor specific)
                unknown 206[13] (vendor specific)
Security:
        Master password revision code = 65534
                supported
        not    enabled
        not    locked
        not    frozen
        not    expired: security count
                supported: enhanced erase
        166min for SECURITY ERASE UNIT. 166min for ENHANCED SECURITY ERASE UNIT.
Logical Unit WWN Device Identifier: 50014ee205708a91
        NAA            : 5
        IEEE OUI        : 0014ee
        Unique ID      : 205708a91
Checksum: correct
IO to the hdd = 0, test it - user@pve:~$ sudo dstat -tdD /dev/sdb --top-io
 
Sorry for the late reply... I have your same issue with a terramaster enclosure.
I tried to blacklist uas and to pass usb-storage option.

Code:
/etc/modprobe.d/uas-blacklist.conf

blacklist uas
options usb-storage quirks=174c:55aa:u

174c and 55aa are the vendor and prodid found with usb-devices

I update initramfs but on reboot i still get:

Code:
[g9 ssh][me]:~>lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/9p, 20000M/x2
    |__ Port 2: Dev 2, If 0, Class=Mass Storage, Driver=uas, 10000M
    |__ Port 9: Dev 3, If 0, Class=Hub, Driver=hub/4p, 5000M
        |__ Port 3: Dev 6, If 0, Class=Mass Storage, Driver=uas, 5000M
        |__ Port 1: Dev 4, If 0, Class=Mass Storage, Driver=uas, 5000M
        |__ Port 4: Dev 7, If 0, Class=Mass Storage, Driver=uas, 5000M
        |__ Port 2: Dev 5, If 0, Class=Mass Storage, Driver=uas, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
    |__ Port 14: Dev 3, If 0, Class=Wireless, Driver=btusb, 12M
    |__ Port 14: Dev 3, If 1, Class=Wireless, Driver=btusb, 12M

So as far as I understand uas driver is still in use, but I can't figure out why
hub model
I update my own message to say that the problem wasn't the driver, but the power. I found another thread online where the terramaster enclosure was mentioned and the guy said he resolved putting a powered usb hub between the pc and the usb enclosure and it worked!
I link here the usb hub link
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!