Project

General

Profile

Bug #3243

SMART status not reported properly for SSD disks

Added by daftaupe 4 months ago. Updated about 1 month ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Driver
Target version:
Start date:
06/27/2020
Due date:
% Done:

0%

Estimated time:

Description

I get this message "smartctl SMART Status not supported: Incomplete response, ATA output registers missing" when trying to use smartctl on SSDs (that don't return that message under Linux for example) using both master and release 5.8.1.

Searching a bit lead me to https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191717

So I'm wondering if something could be wrong on DragonFly's side as it seems it was on FreeBSD iscsi driver, though in my case it's not a iscsi disk.

I've ran "smartctl -H -d sat -r ioctl,2 /dev/da0" to compare and I've attached the result, the interesting part is at the end :

REPORT-IOCTL: Device=/dev/da0 Command=SMART STATUS CHECK
Input: FR=0xda, SC=...., LL=...., LM=0x4f, LH=0xc2, DEV=...., CMD=0xb0
[ata pass-through(16): 85 06 2c 00 da 00 00 00 00 00 4f 00 c2 00 b0 00 ]
CAM status=0x1, SCSI status=0x0, resid=0x0
status=0x0
[Duration: 0.020s]
REPORT-IOCTL: Device=/dev/da0 Command=SMART STATUS CHECK returned -1 errno=78 [Incomplete response, ATA output registers missing]
SMART Status not supported: Incomplete response, ATA output registers missing
SMART overall-health self-assessment test result: PASSED
Warning: This result is based on an Attribute check.

It looks like the answer to the STATUS CHECK command is not taken into account properly.


Files

smartctl.log (12.2 KB) smartctl.log daftaupe, 06/27/2020 11:45 AM

History

#1

Updated by deef 4 months ago

Just a minor correction... on FreeBSD, the bug was related not to iscsi driver but isci (Intel C600 Serial Attached SCSI driver).

#2

Updated by deef about 1 month ago

I've analyzed this a bit further... Major issue here is that smartctl(8) uses different code paths on Dragonfly versus FreeBSD.

Dragonfly: /dev/da0: Device of type 'scsi' [SCSI] detected
FreeBSD: /dev/ada0: Device of type 'atacam' [ATA] detected

The reason is that particular support code is excluded via this #if:

https://github.com/smartmontools/smartmontools/blob/master/smartmontools/os_freebsd.cpp#L323

And, in fact, method freebsd_atacam_device::do_cmd() is tailored specifically for FreeBSD, ie. it does not compile on Dragonfly.

Also available in: Atom PDF