VUSB
-
Hello team,
Are there any limitations or different behaviors when connecting an external hard drive of 4 TB or more via USB to the XCP-NG host (using a disk dock, for example)?
In my current usage scenario (at home, in this case), the goal is to connect the external hard drive to a virtual machine that will also serve as a NAS.
The disk is detected correctly at the host level with the 'lsblk' command, as well as with Xen commands and in the Xen Orchestra VUSB section. However, even when attached to the VM (running Debian 12), no device is recognized.
Is there any official documentation regarding VUSB, its associated limitations, and its usage context? I've come across various information about the USB part, but it remains somewhat unclear.
(VUSB, USB Passthrough etc...)I will run the test again tonight with screenshots/logs to provide clearer information.
-
Have you checked https://docs.xcp-ng.org/compute/#️-usb-passthrough ?
-
I just created another thread here, I'm seeing similar behavior.
https://xcp-ng.org/forum/topic/9025/usb-external-sata-enclosure-problems?_=1715782369050For now, my workaround is to create a drive passthrough SR.
https://forums.lawrencesystems.com/t/xenserver-hard-drive-whole-disk-passthrough-with-xcp-ng/3433 -
It does not work.
Hard drive USB 3 : JMicron + WD RED DISK
VM + guest tools : Debian 12xe pusb-list uuid ( RO) : efcc6bc4-8ab1-ebea-f751-3ee97c510e0c path ( RO): 2-3 vendor-id ( RO): 152d vendor-desc ( RO): JMicron Technology Corp. / JMicron USA Technology Corp. product-id ( RO): 1561 product-desc ( RO): JMS561U two ports SATA 6Gb/s bridge serial ( RO): DB98765432143 version ( RO): 3.00 description ( RO): JMicron Technology Corp. / JMicron USA Technology Corp._JMS561U two ports SATA 6Gb/s bridge_DB98765432143 speed ( RO): 5000.000** uuid ( RO) : fc634f43-c49c-43d6-0b52-979c55f32e52 path ( RO): 1-5 vendor-id ( RO): 138a vendor-desc ( RO): Validity Sensors, Inc. product-id ( RO): 0050 product-desc ( RO): Swipe Fingerprint Sensor serial ( RO): e01e4221389a version ( RO): 1.10 description ( RO): Validity Sensors, Inc._Swipe Fingerprint Sensor_e01e4221389a speed ( RO): 12.000 uuid ( RO) : f6f144f7-a024-912b-4905-691edf0eda0c path ( RO): 1-8 vendor-id ( RO): 04f2 vendor-desc ( RO): Chicony Electronics Co., Ltd product-id ( RO): b413 product-desc ( RO): serial ( RO): version ( RO): 2.00 description ( RO): Chicony Electronics Co., Ltd speed ( RO): 480.000
xe pusb-param-set uuid=efcc6bc4-8ab1-ebea-f751-3ee97c510e0c passthrough-enabled=true
xe usb-group-list PUSB-uuids=efcc6bc4-8ab1-ebea-f751-3ee97c510e0c uuid ( RO) : 8ee2b032-b3e1-0e00-7d6f-8dce946504b5 name-label ( RW): Group of 152d 1561 USBs name-description ( RW):
xe vusb-create usb-group-uuid=8ee2b032-b3e1-0e00-7d6f-8dce946504b5 vm-uuid=05bd68b3-d8f9-2587-436f-1e332dfbc4a7
xe vm-start uuid=05bd68b3-d8f9-2587-436f-1e332dfbc4a7
LOG Hôte :
[sam. mai 18 20:56:09 2024] block tde: sector-size: 512/512 capacity: 88080384 [sam. mai 18 20:56:09 2024] device vif6.0 entered promiscuous mode [sam. mai 18 20:56:10 2024] device tap6.0 entered promiscuous mode [sam. mai 18 20:56:10 2024] usb 2-3: reset SuperSpeed Gen 1 USB device number 3 using xhci_hcd [sam. mai 18 20:56:10 2024] sd 3:0:0:0: [sdc] Synchronizing SCSI cache [sam. mai 18 20:56:10 2024] sd 3:0:0:0: [sdc] Synchronize Cache(10) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK [sam. mai 18 20:56:10 2024] usb 2-3: reset SuperSpeed Gen 1 USB device number 3 using xhci_hcd [sam. mai 18 20:56:10 2024] scsi host3: uas [sam. mai 18 20:56:10 2024] scsi 3:0:0:0: Direct-Access SABRENT 0104 PQ: 0 ANSI: 6 [sam. mai 18 20:56:10 2024] sd 3:0:0:0: Attached scsi generic sg2 type 0 [sam. mai 18 20:56:10 2024] sd 3:0:0:0: [sdc] 976754646 4096-byte logical blocks: (4.00 TB/3.64 TiB) [sam. mai 18 20:56:10 2024] sd 3:0:0:0: [sdc] Write Protect is off [sam. mai 18 20:56:10 2024] sd 3:0:0:0: [sdc] Mode Sense: 53 00 00 08 [sam. mai 18 20:56:10 2024] sd 3:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [sam. mai 18 20:56:12 2024] sd 3:0:0:0: [sdc] tag#0 uas_zap_pending 0 uas-tag 1 inflight: CMD [sam. mai 18 20:56:12 2024] sd 3:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 01 00 [sam. mai 18 20:56:12 2024] sd 3:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK [sam. mai 18 20:56:12 2024] sd 3:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 01 00 [sam. mai 18 20:56:12 2024] print_req_error: I/O error, dev sdc, sector 0 [sam. mai 18 20:56:12 2024] Buffer I/O error on dev sdc, logical block 0, async page read [sam. mai 18 20:56:12 2024] ldm_validate_partition_table(): Disk read failed. [sam. mai 18 20:56:12 2024] sdc: unable to read partition table [sam. mai 18 20:56:13 2024] sd 3:0:0:0: [sdc] Read Capacity(16) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK [sam. mai 18 20:56:13 2024] sd 3:0:0:0: [sdc] Sense not available. [sam. mai 18 20:56:13 2024] sd 3:0:0:0: [sdc] Read Capacity(10) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK [sam. mai 18 20:56:13 2024] sd 3:0:0:0: [sdc] Sense not available. [sam. mai 18 20:56:13 2024] sd 3:0:0:0: [sdc] 0 4096-byte logical blocks: (0 B/0 B) [sam. mai 18 20:56:13 2024] sd 3:0:0:0: [sdc] Attached SCSI disk [sam. mai 18 20:56:14 2024] usb 2-3: reset SuperSpeed Gen 1 USB device number 3 using xhci_hcd [sam. mai 18 20:56:14 2024] scsi host3: uas [sam. mai 18 20:56:14 2024] scsi 3:0:0:0: Direct-Access SABRENT 0104 PQ: 0 ANSI: 6 [sam. mai 18 20:56:14 2024] sd 3:0:0:0: Attached scsi generic sg2 type 0 [sam. mai 18 20:56:14 2024] sd 3:0:0:0: [sdc] Spinning up disk... [sam. mai 18 20:56:15 2024] ..ready [sam. mai 18 20:56:16 2024] sd 3:0:0:0: [sdc] Read Capacity(16) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK [sam. mai 18 20:56:16 2024] sd 3:0:0:0: [sdc] Sense not available. [sam. mai 18 20:56:16 2024] sd 3:0:0:0: [sdc] Read Capacity(10) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK [sam. mai 18 20:56:16 2024] sd 3:0:0:0: [sdc] Sense not available. [sam. mai 18 20:56:16 2024] sd 3:0:0:0: [sdc] 0 512-byte logical blocks: (0 B/0 B) [sam. mai 18 20:56:16 2024] sd 3:0:0:0: [sdc] 0-byte physical blocks [sam. mai 18 20:56:16 2024] sd 3:0:0:0: [sdc] Write Protect is off [sam. mai 18 20:56:16 2024] sd 3:0:0:0: [sdc] Mode Sense: 00 07 6f 05 [sam. mai 18 20:56:16 2024] sd 3:0:0:0: [sdc] Asking for cache data failed [sam. mai 18 20:56:16 2024] sd 3:0:0:0: [sdc] Assuming drive cache: write through [sam. mai 18 20:56:17 2024] sd 3:0:0:0: [sdc] Read Capacity(16) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK [sam. mai 18 20:56:17 2024] sd 3:0:0:0: [sdc] Sense not available. [sam. mai 18 20:56:17 2024] sd 3:0:0:0: [sdc] Read Capacity(10) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK [sam. mai 18 20:56:17 2024] sd 3:0:0:0: [sdc] Sense not available. [sam. mai 18 20:56:17 2024] sd 3:0:0:0: [sdc] Write Protect is on [sam. mai 18 20:56:17 2024] sd 3:0:0:0: [sdc] Mode Sense: 18 f8 f7 0d [sam. mai 18 20:56:18 2024] sd 3:0:0:0: [sdc] Attached SCSI disk [sam. mai 18 20:56:18 2024] usb 2-3: reset SuperSpeed Gen 1 USB device number 3 using xhci_hcd [sam. mai 18 20:56:18 2024] scsi host3: uas [sam. mai 18 20:56:18 2024] scsi 3:0:0:0: Direct-Access SABRENT 0104 PQ: 0 ANSI: 6 [sam. mai 18 20:56:18 2024] sd 3:0:0:0: Attached scsi generic sg2 type 0 [sam. mai 18 20:56:18 2024] sd 3:0:0:0: [sdc] Spinning up disk... [sam. mai 18 20:56:19 2024] .ready [sam. mai 18 20:56:19 2024] sd 3:0:0:0: [sdc] 976754646 4096-byte logical blocks: (4.00 TB/3.64 TiB) [sam. mai 18 20:56:19 2024] sd 3:0:0:0: [sdc] Write Protect is off [sam. mai 18 20:56:19 2024] sd 3:0:0:0: [sdc] Mode Sense: 53 00 00 08 [sam. mai 18 20:56:19 2024] sd 3:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA [sam. mai 18 20:56:19 2024] sd 3:0:0:0: [sdc] Attached SCSI disk [sam. mai 18 20:56:29 2024] device tap6.0 left promiscuous mode [sam. mai 18 20:56:30 2024] vif vif-6-0 vif6.0: Guest Rx ready
We see that there is a problem reading the total capacity of the disk? Everything works correctly when you plug the external box into a Linux workstation (debian 12 desktop gnome)
However, no problem mounting the disk on the host, it is only to attach it to the VM.
I also changed the disk in doubt with another of the same capacity (4TB WD RED) and even problematic.
I have an old disk dock, I will also do the test, and see if I have the same problems -
Tested too, I can successfully attach the disk to the VM, but there are input/output problems.
I will see about putting a smaller capacity disk in the case (250 GB for example) knowing that the case is new
-
A little feedback regarding my problem that some may have in the future in the case of purchasing an external box which will be connected to an XCP-NG host.
It turns out that the Sabrent brand box that I bought will not work with XCP-NG, there would be quite a few basic problems. To see if with a more recent kernel in the next XCP version this resolves the problem or not.
I tried the bypass with a uas blacklist without success the box remains blacklisted :
touch /etc/modprobe.d/blacklist-usb.conf echo "blacklist uas" > /etc/modprobe.d/blacklist-usb.conf reboot
But none with an old box (5 storage spaces in USB3) which is not black listed.
Subject on the site Kernel.org (Kernel 4.18.12) :
https://bugzilla.kernel.org/show_bug.cgi?id=201421
https://lore.kernel.org/all/CA+icZUXHnc-Qd9NhwxFx3+LQakNTWmS_RRYsTAY8-gO8wc219Q@mail.gmail.com/Amazon (user feedback with similar problems) :
https://www.amazon.com/gp/customer-reviews/R1PSQWXUTUMLADI will therefore keep this enclosure for another use with a machine having a more recent kernel (6.1) where this will not be an issue.
I will test it with a version of CentOS 7 with a kernel version close to the current one to see if I encounter the same issues.