As a Linux enthusiast venturing into the world of Raspberry Pi, I recently encountered an intriguing issue while trying to utilize a 4TB HDD connected via USB 3.0. While the drive worked flawlessly when plugged into a USB 2.0 port, it remained invisible when connected to the faster USB 3.0 port.
[ 1423.007653] usb 2-2: SerialNumber: 0123456789ABCDEF
[ 1423.020119] scsi host0: uas
[ 1423.026589] scsi 0:0:0:0: Direct-Access JMicron Generic 0508 PQ : 0 ANSI: 6
[ 1423.027759] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 1423.029003] sd 0:0:0:0: [sda] 7814035055 512-byte logical blocks: (4.00 TB/3. 64 TiB)
[ 1423.029017] sd 0:0:0:0: [sda] 4096-byte physical blocks
[ 1423.029705] sd 0:0:0:0: [sda] Write Protect is off
[ 1423.029720] sd 0:0:0:0: [sda] Mode Sense: 53 00 00 08
[ 1423.030162] sd 0:0:0:0: [sda] Disabling FUA
[ 1423.030175] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, does n't support DPO or FUA
[ 1423.031003] sd 0:0:0:0: [sda] Optimal transfer size 33553920 bytes not a mult iple of physical block size (4096 bytes)
[ 1423.060421] sda: sda1
[ 1423.063607] sd 0:0:0:0: [sda] Attached SCSI disk
[ 1429.434640] BTRFS: error (device sda1) in btrfs_commit_transaction:2280: errn o=-5 IO failure (Error while writing out transaction)
[ 1429.434694] BTRFS info (device sda1): forced readonly
Identifying Device ID: First, I disconnected the USB adapter, cleared the dmesg log with sudo dmesg -C, reconnected the adapter, and ran dmesg again to identify the idVendor and idProduct of the drive. The dmesg output displayed these values:[ 1429.955630] usb 2-2: New USB device found, idVendor=152d, idProduct=0578, bcd Device= 5.08
Adding the Quirk: Next, I edited the /boot/cmdline.txt file using sudo nano /boot/cmdline.txt and added the following line at the beginning:usb-storage.quirks=152d:0578:u
This tells the system to apply the quirk for the specific vendor (152d) and product (0578). Reboot: After saving the cmdline.txt file, I rebooted the Raspberry Pi.Verification: Upon reboot, the dmesg log now contained lines indicating that UASP was blacklisted and the device was being handled by the standard usb-storage module:[ 2.495725] usb 2-1: UAS is blacklisted for this device, using usb-storage instead [ 2.531823] usb-storage 2-1:1.0: USB Mass Storage device detected [ 2.549642] usb-storage 2-1:1.0: Quirks match for vid 2109 pid 0715: 800000 [ 2.566177] scsi host0: usb-storage 2-1:1.0
0 comments:
Post a Comment