USB hard drive not showing up

A Seagate USB hard drive is connected to the Jetson NX. Initially, it works as expected. After a while(~few days), it stops showing up in fdisk -l (still shows up in lsusb). Dmesg shows a bunch of hardware errors.
Unplug and replug + reboot takes things back to normal. This seems to be related to power management. Any help on this would be appreciated!

Attaching relevant dmesg logs:

[1023302.151923] usb 2-3.1: new SuperSpeed USB device number 4 using tegra-xusb
[1023302.174284] usb 2-3.1: New USB device found, idVendor=0bc2, idProduct=ac30
[1023302.174292] usb 2-3.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[1023302.174295] usb 2-3.1: Product: BUP Slim
[1023302.174299] usb 2-3.1: Manufacturer: Seagate
[1023302.174302] usb 2-3.1: SerialNumber: 00000000NABJQ1BJ
[1023302.188204] scsi host0: uas
[1023302.191364] scsi 0:0:0:0: Direct-Access Seagate BUP Slim 1707 PQ: 0 ANSI: 6
[1023303.039653] usb 1-2: usb_suspend_both: status 0
[1023305.178162] sd 0:0:0:0: [sda] 3907029167 512-byte logical blocks: (2.00 TB/1.82 TiB)
[1023305.178333] sd 0:0:0:0: [sda] 4096-byte physical blocks
[1023305.179108] sd 0:0:0:0: [sda] Write Protect is off
[1023305.179211] sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
[1023305.179553] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn’t support DPO or FUA
[1023305.180717] sd 0:0:0:0: [sda] Optimal transfer size 33553920 bytes not a multiple of physical block size (4096 bytes)
[1023306.303682] sd 0:0:0:0: [sda] tag#6 uas_eh_abort_handler 0 uas-tag 7 inflight: CMD IN
[1023306.303696] sd 0:0:0:0: [sda] tag#6 CDB: opcode=0x28 28 00 e8 e0 88 ae 00 00 01 00
[1023306.303952] sd 0:0:0:0: [sda] tag#5 uas_eh_abort_handler 0 uas-tag 6 inflight: CMD IN
[1023306.303959] sd 0:0:0:0: [sda] tag#5 CDB: opcode=0x28 28 00 e8 e0 88 ad 00 00 01 00
[1023306.304150] sd 0:0:0:0: [sda] tag#4 uas_eh_abort_handler 0 uas-tag 5 inflight: CMD IN
[1023306.304155] sd 0:0:0:0: [sda] tag#4 CDB: opcode=0x28 28 00 e8 e0 88 ac 00 00 01 00
[1023306.304351] sd 0:0:0:0: [sda] tag#3 uas_eh_abort_handler 0 uas-tag 4 inflight: CMD IN
[1023306.304356] sd 0:0:0:0: [sda] tag#3 CDB: opcode=0x28 28 00 e8 e0 88 ab 00 00 01 00
[1023306.304543] scsi host0: uas_eh_bus_reset_handler start
[1023307.317029] usb 2-3.1: cmd cmplt err -2
[1023308.330643] usb 2-3.1: cmd cmplt err -2
[1023309.343268] usb 2-3.1: cmd cmplt err -2
[1023310.355886] usb 2-3.1: cmd cmplt err -2
[1023312.392220] usb 2-3.1: Failed to set U1 timeout to 0x0,error code -110
[1023318.600204] usb 2-3.1: Set SEL for device-initiated U1 failed.
[1023324.748381] usb 2-3.1: Set SEL for device-initiated U2 failed.
[1023324.748547] usb 2-3.1: usb_reset_and_verify_device Failed to disable LPM
.
[1023326.792227] usb 2-3-port1: cannot disable (err = -110)
[1023326.792393] scsi host0: uas_eh_bus_reset_handler FAILED err -19
[1023326.792400] sd 0:0:0:0: Device offlined - not ready after error recovery
[1023326.792432] sd 0:0:0:0: Device offlined - not ready after error recovery
[1023326.792436] sd 0:0:0:0: Device offlined - not ready after error recovery
[1023326.792439] sd 0:0:0:0: Device offlined - not ready after error recovery
[1023326.792455] sd 0:0:0:0: [sda] tag#3 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x06
[1023326.792460] sd 0:0:0:0: [sda] tag#3 CDB: opcode=0x28 28 00 e8 e0 88 ab 00 00 01 00
[1023326.792470] blk_update_request: I/O error, dev sda, sector 3907029163
[1023326.792591] Buffer I/O error on dev sda, logical block 3907029163, async page read
[1023326.792785] sd 0:0:0:0: [sda] tag#4 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x06
[1023326.792790] sd 0:0:0:0: [sda] tag#4 CDB: opcode=0x28 28 00 e8 e0 88 ac 00 00 01 00
[1023326.792795] blk_update_request: I/O error, dev sda, sector 3907029164
[1023326.792914] Buffer I/O error on dev sda, logical block 3907029164, async page read
[1023326.793049] sd 0:0:0:0: [sda] tag#5 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x06
[1023326.793054] sd 0:0:0:0: [sda] tag#5 CDB: opcode=0x28 28 00 e8 e0 88 ad 00 00 01 00
[1023326.793057] blk_update_request: I/O error, dev sda, sector 3907029165
[1023326.793170] Buffer I/O error on dev sda, logical block 3907029165, async page read
[1023326.793322] sd 0:0:0:0: [sda] tag#6 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x06
[1023326.793326] sd 0:0:0:0: [sda] tag#6 CDB: opcode=0x28 28 00 e8 e0 88 ae 00 00 01 00
[1023326.793330] blk_update_request: I/O error, dev sda, sector 3907029166
[1023326.793440] Buffer I/O error on dev sda, logical block 3907029166, async page read
[1023326.793662] sda: sda1
[1023326.794196] sd 0:0:0:0: [sda] Attached SCSI disk
[1023336.936246] hub 2-3:1.0: hub_ext_port_status failed (err = -110)

We will use our usb drive to try. However, maybe not a segate one.

Sure, thanks! Does this look like a vendor specific firmware issue to you? Or do you think it’s related to the USB driver?

Hello,

Can you try to use a self powered (external power) usb hub, connect this Seagate drive on this hub and see if issue is still?

Will try that. But I noticed that the power LED on the drive was on even when it didn’t show up in fdisk. So how would externally powered USB hub help?

It has chance NX is not able to provided enough power to your disk. Using external power hub to prevent that.

That did not work either. The issue still persists, and is happening much more frequently now. Please look into this!

Also seeing this issue on Xavier AGX. Logs from dmesg below:

[701973.256736] sd 2:0:0:0: Device offlined - not ready after error recovery
[701973.256764] scsi_io_completion: 19 callbacks suppressed
[701973.256777] sd 2:0:0:0: [sda] tag#1 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x06
[701973.256931] sd 2:0:0:0: [sda] tag#1 CDB: opcode=0x2a 2a 00 00 83 81 00 00 00 08 00
[701973.256939] blk_update_request: 19 callbacks suppressed
[701973.256946] blk_update_request: I/O error, dev sda, sector 8618240
[701973.257217] buffer_io_error: 21 callbacks suppressed
[701973.257230] Buffer I/O error on dev sda1, logical block 1077024, lost async page write
[701973.272580] sd 2:0:0:0: timing out command, waited 6s
[701973.272711] sd 2:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
[701973.272735] sd 2:0:0:0: [sda] tag#0 CDB: opcode=0x2a 2a 00 00 d1 38 98 00 00 08 00
[701973.272742] blk_update_request: I/O error, dev sda, sector 13711512
[701973.272858] Buffer I/O error on dev sda1, logical block 1713683, lost async page write
[701973.273017] sd 2:0:0:0: timing out command, waited 6s
[701973.273111] sd 2:0:0:0: [sda] tag#1 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
[701973.273117] sd 2:0:0:0: [sda] tag#1 CDB: opcode=0x2a 2a 00 00 cb af e8 00 00 08 00
[701973.273121] blk_update_request: I/O error, dev sda, sector 13348840
[701973.273232] Buffer I/O error on dev sda1, logical block 1668349, lost async page write
[701973.273376] sd 2:0:0:0: timing out command, waited 6s
[701973.273470] sd 2:0:0:0: [sda] tag#2 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
[701973.273476] sd 2:0:0:0: [sda] tag#2 CDB: opcode=0x2a 2a 00 00 cb af a8 00 00 08 00
[701973.273481] blk_update_request: I/O error, dev sda, sector 13348776
[701973.273590] Buffer I/O error on dev sda1, logical block 1668341, lost async page write
[701973.273732] sd 2:0:0:0: timing out command, waited 6s
[701973.273826] sd 2:0:0:0: [sda] tag#3 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
[701973.273831] sd 2:0:0:0: [sda] tag#3 CDB: opcode=0x2a 2a 00 00 cb af 80 00 00 08 00
[701973.273836] blk_update_request: I/O error, dev sda, sector 13348736
[701973.273948] Buffer I/O error on dev sda1, logical block 1668336, lost async page write
[701973.274558] sd 2:0:0:0: timing out command, waited 6s
[701973.279657] sd 2:0:0:0: [sda] tag#4 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
[701973.279663] sd 2:0:0:0: [sda] tag#4 CDB: opcode=0x2a 2a 00 00 c6 31 f8 00 00 08 00
[701973.279666] blk_update_request: I/O error, dev sda, sector 12988920
[701973.286053] Buffer I/O error on dev sda1, logical block 1623359, lost async page write
[701973.293716] sd 2:0:0:0: timing out command, waited 6s
[701973.299208] sd 2:0:0:0: [sda] tag#5 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
[701973.299217] sd 2:0:0:0: [sda] tag#5 CDB: opcode=0x2a 2a 00 00 c6 31 48 00 00 08 00
[701973.299224] blk_update_request: I/O error, dev sda, sector 12988744
[701973.305634] Buffer I/O error on dev sda1, logical block 1623337, lost async page write
[701973.313566] sd 2:0:0:0: timing out command, waited 6s
[701973.318869] sd 2:0:0:0: [sda] tag#6 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
[701973.318880] sd 2:0:0:0: [sda] tag#6 CDB: opcode=0x2a 2a 00 00 c6 31 38 00 00 08 00
[701973.318898] blk_update_request: I/O error, dev sda, sector 12988728
[701973.324974] Buffer I/O error on dev sda1, logical block 1623335, lost async page write
[701973.333134] sd 2:0:0:0: timing out command, waited 6s
[701973.338119] sd 2:0:0:0: [sda] tag#7 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
[701973.338135] sd 2:0:0:0: [sda] tag#7 CDB: opcode=0x2a 2a 00 00 bb 26 d8 00 00 08 00
[701973.338140] blk_update_request: I/O error, dev sda, sector 12265176
[701973.344831] Buffer I/O error on dev sda1, logical block 1532891, lost async page write
[701973.352739] sd 2:0:0:0: timing out command, waited 6s
[701973.357990] sd 2:0:0:0: [sda] tag#8 UNKNOWN(0x2003) Result: hostbyte=0x07 driverbyte=0x00
[701973.357996] sd 2:0:0:0: [sda] tag#8 CDB: opcode=0x2a 2a 00 00 bb 26 68 00 00 10 00
[701973.358001] blk_update_request: I/O error, dev sda, sector 12265064
[701973.364175] Buffer I/O error on dev sda1, logical block 1532877, lost async page write
[701973.372342] sd 2:0:0:0: timing out command, waited 6s
[701973.377634] sd 2:0:0:0: timing out command, waited 6s
[701973.382796] sd 2:0:0:0: timing out command, waited 6s
[701973.387895] sd 2:0:0:0: timing out command, waited 6s
[701973.393003] sd 2:0:0:0: timing out command, waited 6s
[701973.398242] sd 2:0:0:0: timing out command, waited 6s
[701973.403424] sd 2:0:0:0: timing out command, waited 6s
[701973.408298] sd 2:0:0:0: timing out command, waited 6s
[701973.413379] sd 2:0:0:0: timing out command, waited 6s
[701973.418629] sd 2:0:0:0: timing out command, waited 6s
[701973.423796] sd 2:0:0:0: timing out command, waited 6s
[701973.429210] sd 2:0:0:0: timing out command, waited 6s
[701973.434325] sd 2:0:0:0: timing out command, waited 6s
[701973.439197] sd 2:0:0:0: timing out command, waited 6s
[701973.444610] sd 2:0:0:0: timing out command, waited 6s
[701973.449498] sd 2:0:0:0: timing out command, waited 6s
[701973.454918] sd 2:0:0:0: timing out command, waited 6s
[701973.460077] sd 2:0:0:0: timing out command, waited 6s
[701973.465259] sd 2:0:0:0: timing out command, waited 6s
[701973.853460] sd 2:0:0:0: [sda] Synchronizing SCSI cache
[701974.084381] sd 2:0:0:0: [sda] Synchronize Cache(10) failed: Result: hostbyte=0x07 driverbyte=0x00
[701977.325030] usb 2-4: Device not responding to setup address.
[701979.556925] usb 2-4: Device not responding to setup address.
[701979.764031] usb 2-4: device not accepting address 8, error -71
[701981.936863] usb 2-4: Device not responding to setup address.
[701984.168705] usb 2-4: Device not responding to setup address.
[701984.375825] usb 2-4: device not accepting address 9, error -71
[701984.403919] usb usb2-port4: attempt power cycle
[701986.864568] usb 2-4: Device not responding to setup address.
[701989.096454] usb 2-4: Device not responding to setup address.
[701989.303589] usb 2-4: device not accepting address 10, error -71
[701991.476342] usb 2-4: Device not responding to setup address.
[701993.708305] usb 2-4: Device not responding to setup address.
[701993.915368] usb 2-4: device not accepting address 11, error -71
[701993.943538] usb usb2-port4: unable to enumerate USB device
[701993.991362] usb usb2: usb_suspend_both: status 0
[701993.991389] tegra-xusb 3610000.xhci: entering ELPG
[701993.991420] tegra-xusb 3610000.xhci: 2-4 is not suspended: 0c001203
[701993.991427] tegra-xusb 3610000.xhci: entering ELPG failed

Is this a custom board or devkit?

What software release are you using?

Does this issue also happen to other usb hard drive?

We tried the same test on our side but we cannot reproduce this issue.
It looks like it needs to take almost 10 days to reproduce this issue in your previous log. What are the works doing on this usb drive? You just put it there idle?

Tried another USB hard drive from WD. The issue does not happen there.

I noticed that the Seagate drive uses UAS, whereas the WD drive uses USB.

/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 5000M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
|__ Port 1: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
|__ Port 2: Dev 4, If 0, Class=Mass Storage, Driver=uas, 5000M

I am currently disabling UAS on the Seagate drive using this command:
echo 0bc2:ac30:u > /sys/module/usb_storage/parameters/quirks

Is this a known issue with UAS?

We do have some issues with different kind of USB drive with solution to add ID to quirk list.

Thanks, will update if this fix works.
What would be the read/write speed difference by disabling UAS and falling back to USB?

Getting these errors on the Nano even after disabling UAS.(AGX and NX seem to be running fine) Please advise.

[453110.478366] blk_update_request: I/O error, dev sda, sector 33558520
[453110.484769] Buffer I/O error on dev sda1, logical block 4194559, async page read
[453114.615321] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
[453114.615328] sd 0:0:0:0: [sda] tag#0 Sense Key : 0xb [current]
[453114.615332] sd 0:0:0:0: [sda] tag#0 ASC=0x47 ASCQ=0x3
[453114.615337] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 02 00 0f f8 00 00 08 00
[453114.615340] blk_update_request: I/O error, dev sda, sector 33558520
[453114.621738] Buffer I/O error on dev sda1, logical block 4194559, async page read
[453118.751981] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
[453118.751987] sd 0:0:0:0: [sda] tag#0 Sense Key : 0xb [current]
[453118.751990] sd 0:0:0:0: [sda] tag#0 ASC=0x47 ASCQ=0x3
[453118.751995] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 02 00 0f f8 00 00 08 00
[453118.751998] blk_update_request: I/O error, dev sda, sector 33558520
[453118.758392] Buffer I/O error on dev sda1, logical block 4194559, async page read
[453122.888440] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
[453122.888447] sd 0:0:0:0: [sda] tag#0 Sense Key : 0xb [current]
[453122.888450] sd 0:0:0:0: [sda] tag#0 ASC=0x47 ASCQ=0x3
[453122.888455] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 02 00 0f f8 00 00 08 00
[453122.888459] blk_update_request: I/O error, dev sda, sector 33558520
[453122.894855] Buffer I/O error on dev sda1, logical block 4194559, async page read
[453127.025206] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
[453127.025212] sd 0:0:0:0: [sda] tag#0 Sense Key : 0xb [current]
[453127.025216] sd 0:0:0:0: [sda] tag#0 ASC=0x47 ASCQ=0x3
[453127.025220] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 02 00 0f f8 00 00 08 00
[453127.025224] blk_update_request: I/O error, dev sda, sector 33558520
[453127.031630] Buffer I/O error on dev sda1, logical block 4194559, async page read
[453131.243934] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
[453131.243941] sd 0:0:0:0: [sda] tag#0 Sense Key : 0xb [current]
[453131.243945] sd 0:0:0:0: [sda] tag#0 ASC=0x47 ASCQ=0x3
[453131.243950] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 02 00 0f f8 00 00 08 00
[453131.243953] blk_update_request: I/O error, dev sda, sector 33558520
[453131.250356] Buffer I/O error on dev sda1, logical block 4194559, async page read

You can firstly reply those questions I asked in previous comment.

The issue has not happened on the AGX/NX after this fix. It still happens on the Nano.
Here are the details of the Nano:

L4T version: Release 32, revision:4.4
It is a devkit.
The application is a deep learning training job which reads the dataset from the USB drive. It runs into an error within 10-15 minutes.

Also checked the L4T version on the AGX and NX: They use 32.5.1. Is there any reason this issue would persist even after disabling UAS on 32.4.4 but not on 32.5.1?