Wednesday, May 15, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 676  / 3 Years ago, thu, october 21, 2021, 8:21:37

I have this SSD:


$ lsscsi --verbose 9
[9:0:0:0] disk ATA Samsung SSD 860 4B6Q /dev/sdb
dir: /sys/bus/scsi/devices/9:0:0:0 [/sys/devices/pci0000:00/0000:00:01.3/0000:01:00.2/0000:02:06.0/0000:07:00.0/ata10/host9/target9:0:0/9:0:0:0]

It generally works fine, but every Monday at 00:00 local time it glitches. If the computer is turned on and running Ubuntu 18.04 at 00:00, then every disk access is failing for a few minutes, and then it restores to normal. Kernel messages look like this:


[33597.552222] ata10.00: exception Emask 0x0 SAct 0x438c0 SErr 0x0 action 0x6 frozen
[33597.552228] ata10.00: failed command: WRITE FPDMA QUEUED
[33597.552236] ata10.00: cmd 61/68:30:b0:a0:7d/01:00:05:00:00/40 tag 6 ncq dma 184320 out
res 40/00:01:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
[33597.552239] ata10.00: status: { DRDY }
[33597.552294] ata10: hard resetting link
[33598.028219] ata10: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[33598.028480] ata10.00: supports DRM functions and may not be fully accessible
[33598.030650] ata10.00: supports DRM functions and may not be fully accessible
[33598.032509] ata10.00: configured for UDMA/133
[33598.032534] sd 9:0:0:0: [sdb] tag#12 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[33598.032538] sd 9:0:0:0: [sdb] tag#12 Sense Key : Illegal Request [current]
[33598.032541] sd 9:0:0:0: [sdb] tag#12 Add. Sense: Unaligned write command
[33598.032544] sd 9:0:0:0: [sdb] tag#12 CDB: Read(10) 28 00 01 15 57 88 00 00 38 00
[33598.032548] blk_update_request: I/O error, dev sdb, sector 18175880 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
[33598.032559] ata10: EH complete
[33598.032642] ata10.00: Enabling discard_zeroes_data

This message sequence repeats 4 times with 30 second interval, and after that it's back to normal.


If the computer is turned off at 00:00, then the problem is observed when it's turned on for the first time on Monday. GRUB loads fine from the same disk, but when Ubuntu starts loading, it seems the disk stops working, and the startup hangs. After hitting reset, it starts up normally.


What can cause such weird behavior?


More From » ssd

 Answers
4

You're having one of two issues...



  1. The firmware in your Samsung 860 SSD needs updating.



  2. You're having NCQ errors, and require a patch.




Firmware


Download Samsung Magician here, and check your Samsung firmware.


fsck


Let's check your file system for errors...



  • boot to a Ubuntu Live DVD/USB in “Try Ubuntu” mode

  • open a terminal window by pressing Ctrl+Alt+T

  • type sudo fdisk -l

  • identify the /dev/sdXX device name for your "Linux Filesystem"

  • type sudo fsck -f /dev/sdXX, replacing sdXX with the number you found earlier

  • repeat the fsck command if there were errors

  • type reboot


NCQ


The NCQ error can be seen here...


[33597.552222] ata10.00: exception Emask 0x0 SAct 0x438c0 SErr 0x0 action 0x6 frozen
[33597.552228] ata10.00: failed command: WRITE FPDMA QUEUED
[33597.552236] ata10.00: cmd 61/68:30:b0:a0:7d/01:00:05:00:00/40 tag 6 ncq dma 184320 out
res 40/00:01:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
[33597.552239] ata10.00: status: { DRDY }
[33597.552294] ata10: hard resetting link

Native Command Queuing (NCQ) is an extension of the Serial ATA protocol allowing hard disk drives to internally optimize the order in which received read and write commands are executed.


Edit sudo -H gedit /etc/default/grub and change the following line to include this extra parameter. Then do sudo update-grub to write the changes to disk. Reboot. Monitor hangs, and watch /var/log/syslog or dmesg for continued error messages.


GRUB_CMDLINE_LINUX_DEFAULT="quiet splash libata.force=noncq"

[#2036] Saturday, October 23, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ersoggles

Total Points: 69
Total Questions: 111
Total Answers: 111

Location: Vanuatu
Member since Sun, Oct 2, 2022
2 Years ago
ersoggles questions
;