SSD error on DietPi but working with Raspbian

hi DietPi devs,

I have a serious problem that prevents me from using DietPi, and that I really don’t understand.

I have a 1TB SSD that I want to use for storage. When I plug it in with DietPi 6.30, I get an error and it doesn’t work:

[  116.125639] usb 2-2: new SuperSpeed Gen 1 USB device number 2 using xhci_hcd
[  116.156934] usb 2-2: New USB device found, idVendor=0578, idProduct=0578, bcdDevice=12.14
[  116.156950] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  116.156963] usb 2-2: Product: KingSpec
[  116.156976] usb 2-2: Manufacturer: Z3
[  116.156988] usb 2-2: SerialNumber: DD564198838738XXXX
[  116.178241] scsi host0: uas
[  116.179616] scsi 0:0:0:0: Direct-Access     KingSpec                  1214 PQ: 0 ANSI: 6
[  123.717963] sd 0:0:0:0: [sda] 2000409264 512-byte logical blocks: (1.02 TB/954 GiB)
[  123.717978] sd 0:0:0:0: [sda] 4096-byte physical blocks
[  123.718192] sd 0:0:0:0: [sda] Write Protect is off
[  123.718207] sd 0:0:0:0: [sda] Mode Sense: 53 00 00 08
[  123.718592] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[  123.719290] sd 0:0:0:0: [sda] Optimal transfer size 33553920 bytes not a multiple of physical block size (4096 bytes)
[  123.724092]  sda: sda1
[  123.727156] sd 0:0:0:0: [sda] Attached SCSI disk
[  123.752300] sd 0:0:0:0: Attached scsi generic sg0 type 0
[  139.385304] sd 0:0:0:0: [sda] tag#17 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD 
[  139.385313] sd 0:0:0:0: [sda] tag#17 CDB: opcode=0x85 85 06 20 00 00 00 78 00 00 00 00 00 00 40 e3 00
[  139.425301] scsi host0: uas_eh_device_reset_handler start
[  139.576265] usb 2-2: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd
[  139.612240] scsi host0: uas_eh_device_reset_handler success
[  139.612456] sd 0:0:0:0: [sda] tag#17 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x0e
[  139.612471] sd 0:0:0:0: [sda] tag#17 CDB: opcode=0x85 85 06 20 00 00 00 78 00 00 00 00 00 00 40 e3 00
[  147.646049] xhci_hcd 0000:01:00.0: WARNING: Host System Error
[  152.725308] xhci_hcd 0000:01:00.0: xHCI host not responding to stop endpoint command.
[  152.725353] xhci_hcd 0000:01:00.0: xHCI host controller not responding, assume dead
[  152.725410] xhci_hcd 0000:01:00.0: HC died; cleaning up
[  152.725477] usb 1-1: USB disconnect, device number 2
[  152.726300] usb 2-2: USB disconnect, device number 2
[  152.737522] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[  152.755330] print_req_error: I/O error, dev sda, sector 2000409088
[  152.755375] Buffer I/O error on dev sda1, logical block 250050880, async page read
[  153.355316] sd 0:0:0:0: [sda] Synchronize Cache(10) failed: Result: hostbyte=0x07 driverbyte=0x00
[  153.525485] xhci_hcd 0000:01:00.0: WARN Can't disable streams for endpoint 0x82, streams are being disabled already

sda is never recognized and I cannot use the drive.

I was curious if the same thing happened on Raspbian Lite. Well, to my surprise, it worked there. So I was wondering, what is the difference between Raspbian Lite and DietPi? Did you remove some USB drivers?

Hi,

usually these type of errors are pointing to some hard drive issues like bad sectors. But strange that it is working on plain Raspbian Lite. Do you know if your SSD is supporting S.M.A.R.T.? If yes you could install smartmontools package and perform same self test on the SSD using smartctl.

The drive doesn’t have SMART capability. It’s an SSD, here’s what I got with Raspbian:

root@Pi4:/home/pi# smartctl -i -d scsi /dev/sda
smartctl 6.6 2017-11-05 r4594 [armv7l-linux-4.19.118-v7l+] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               KingSpec
Product:              
Revision:             1214
Compliance:           SPC-4
User Capacity:        1,024,209,543,168 bytes [1.02 TB]
Logical block size:   512 bytes
LU is resource provisioned, LBPRZ=1
Logical Unit id:      0x3044564198838738
Serial number:        DD564198838738A1
Device type:          disk
Local Time is:        Thu May 28 12:41:26 2020 CEST
SMART support is:     Unavailable - device lacks SMART capability.

I don’t think there’s bad sectors, but really a problem with the driver in DietPi. Upon booting with Raspbian, I do get a warning, but this is not critical:

[    4.842331] sd 0:0:0:0: [sda] 2000409264 512-byte logical blocks: (1.02 TB/954 GiB)
[    4.851856] sd 0:0:0:0: [sda] 4096-byte physical blocks
[    4.859116] sd 0:0:0:0: [sda] Write Protect is off
[    4.865669] sd 0:0:0:0: [sda] Mode Sense: 53 00 00 08
[    4.866056] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    4.877620] sd 0:0:0:0: [sda] Optimal transfer size 33553920 bytes not a multiple of physical block size (4096 bytes)
[    4.891791] random: fast init done
[    4.898224]  sda: sda1
[    4.905232] sd 0:0:0:0: [sda] Attached SCSI disk
[    5.122943] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)

Do you know what was removed from the USB driver when you downsized Raspbian? I would really prefer to use DietPi than Raspbian (Lite)!

for this we would need to ask MichaIng as developer.

Any update on this issue? MichaIng or someone else? Thanks!

I see exactly this behaviour.