Odroid HC1 and kernel-5.4: soft reset makes the sata drive disappear


Recommended Posts

Armbianmonitor:

Hi,

 

I have recently installed armbian-config on my HC1 running OMV and switched to -current kernel from -legacy. Unfortunately, now whenever I soft-reboot following a kernel update, the sda drive is missing:

[    6.161366] usbcore: registered new interface driver usb-storage
[    6.180240] scsi host0: uas
[    6.181260] usbcore: registered new interface driver uas
[    6.182155] scsi 0:0:0:0: Direct-Access     JMicron  Generic          3102 PQ: 0 ANSI: 6
[    6.193271] sd 0:0:0:0: [sda] Unit Not Ready
[    6.193290] sd 0:0:0:0: [sda] Sense Key : 0x4 [current] 
[    6.193302] sd 0:0:0:0: [sda] ASC=0x44 <<vendor>>ASCQ=0x81 
[    6.194247] sd 0:0:0:0: [sda] Read Capacity(16) failed: Result: hostbyte=0x00 driverbyte=0x08
[    6.194258] sd 0:0:0:0: [sda] Sense Key : 0x4 [current] 
[    6.194267] sd 0:0:0:0: [sda] ASC=0x44 <<vendor>>ASCQ=0x81 
[    6.195019] sd 0:0:0:0: [sda] Read Capacity(10) failed: Result: hostbyte=0x00 driverbyte=0x08
[    6.195029] sd 0:0:0:0: [sda] Sense Key : 0x4 [current] 
[    6.195038] sd 0:0:0:0: [sda] ASC=0x44 <<vendor>>ASCQ=0x81 
[    6.196157] sd 0:0:0:0: [sda] 0 512-byte logical blocks: (0 B/0 B)
[    6.196177] sd 0:0:0:0: [sda] 0-byte physical blocks
[    6.197261] sd 0:0:0:0: [sda] Test WP failed, assume Write Enabled
[    6.197631] sd 0:0:0:0: [sda] Asking for cache data failed
[    6.197651] sd 0:0:0:0: [sda] Assuming drive cache: write through
[    6.198713] sd 0:0:0:0: [sda] Optimal transfer size 33553920 bytes not a multiple of physical block size (0 bytes)
[    6.302324] sd 0:0:0:0: [sda] Unit Not Ready
[    6.302371] sd 0:0:0:0: [sda] Sense Key : 0x4 [current] 
[    6.302414] sd 0:0:0:0: [sda] ASC=0x44 <<vendor>>ASCQ=0x81 
[    6.303970] sd 0:0:0:0: [sda] Read Capacity(16) failed: Result: hostbyte=0x00 driverbyte=0x08
[    6.304015] sd 0:0:0:0: [sda] Sense Key : 0x4 [current] 
[    6.304057] sd 0:0:0:0: [sda] ASC=0x44 <<vendor>>ASCQ=0x81 
[    6.305549] sd 0:0:0:0: [sda] Read Capacity(10) failed: Result: hostbyte=0x00 driverbyte=0x08
[    6.305592] sd 0:0:0:0: [sda] Sense Key : 0x4 [current] 
[    6.305632] sd 0:0:0:0: [sda] ASC=0x44 <<vendor>>ASCQ=0x81 
[    6.310272] sd 0:0:0:0: [sda] Attached SCSI disk

Hard reset brings the drive back so it is not that tragic, but it is still a regression compared to 4.14 kernels.

Link to post
Share on other sites
Armbian is a community driven open source project. Do you like to contribute your code?

This is how the dmesg output looks when the drive is working:

[    6.171505] usbcore: registered new interface driver usb-storage
[    6.192233] scsi host0: uas
[    6.193251] usbcore: registered new interface driver uas
[    6.194240] scsi 0:0:0:0: Direct-Access     JMicron  Generic          3102 PQ: 0 ANSI: 6
[    6.364216] usb 6-1: reset SuperSpeed Gen 1 USB device number 2 using xhci-hcd
[    6.448262] r8152 6-1:1.0 eth0: v1.10.11
[    6.707791] sd 0:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/466 GiB)
[    6.707841] sd 0:0:0:0: [sda] 4096-byte physical blocks
[    6.708407] sd 0:0:0:0: [sda] Write Protect is off
[    6.708454] sd 0:0:0:0: [sda] Mode Sense: 53 00 00 08
[    6.709506] sd 0:0:0:0: [sda] Disabling FUA
[    6.709557] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    6.710711] sd 0:0:0:0: [sda] Optimal transfer size 33553920 bytes not a multiple of physical block size (4096 bytes)
[    6.748322] usb 6-1: reset SuperSpeed Gen 1 USB device number 2 using xhci-hcd
[    6.760592]  sda: sda1
[    6.768360] sd 0:0:0:0: [sda] Attached SCSI disk

 

Link to post
Share on other sites

do you got a mount-entry for sda in the /etc/fstab? if yes - how does it look?

for my nanoPi Neo2 NAS and its blkid for sda1 it looks like this:
 

root@npi-neo2-24(192.168.6.24):~# blkid
/dev/sda1: UUID="4c872e8e-a213-424f-9f10-e4ddd617e848" TYPE="ext4" PARTUUID="20c0b763-01"


root@npi-neo2-24(192.168.6.24):~# more /etc/fstab
UUID=4e972167-ea53-4c61-9d49-a67b1f839f5f / ext4 defaults,noatime,nodiratime,commit=600,errors=remount-ro 0 1
tmpfs /tmp tmpfs defaults,nosuid 0 0

UUID=4c872e8e-a213-424f-9f10-e4ddd617e848 /harddisc ext4 defaults 0 0

 

[EDIT]

I see - "[sda] Unit Not Ready"

Does it sleep via hdparm? Maybe the controller is reset the right way only on a hard-reset?
If your drive does sleep maybe it doesnt respond right (or in the right time) while using the soft-reset :(

Link to post
Share on other sites
24 minutes ago, belegdol said:

How do i check whether the drive sleeps with hdparm?

In any case, the issue is very likely related to kernel-5.4 because this was not happening with 4.14.

to check if the drive is sleeping:
 

root@npi-neo2-24(192.168.6.24):~# hdparm -C /dev/sda1

/dev/sda1:
 drive state is:  standby

 

Caution: many people report that hdparm -C wakes up the drive

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...