>From a quick glance in the code atactl calls
ATAPI_SMART/ATA_SMART_STATUS, which maps to section 7.31.6 of the ATA-3
spec[0] (there's newer standards, but shouldn't have changed). Here it
states:
NORMAL OUTPUTS - If the device has not detected a thrshold exceeded
condition, the device sets the Cylinder Low register to 4Fh and the 
Cylinder High register to C2h. If the device has detected a threshold
exceeded condition, the device sets the Cylinder Low register to F4h and
the Cylinder High register to 2Ch.

The message "No SMART threshold exceeded" only shows when
req.cylinder == 0xc24f. So unless I'm missing something it's your disk's
SMART that returns something that doesn't make sense.

martijn@

[0] https://www.scs.stanford.edu/10wi-cs140/pintos/specs/ata-3-std.pdf

On Mon, 2022-05-30 at 15:24 +0200, Jan Stary wrote:
> This is current/adm64 on a PC (dmesg below).
> I monitor disk status with atactl.
> On one of the disks, I get this:
> 
> # atactl sd2 identify
> Model: WDC WD3200AAJS-00VWA0, Rev: 12.01B02, Serial #:            
> WD-WMARW0118535
> Device type: ATA, fixed
> Cylinders: 16383, heads: 16, sec/track: 63, total sectors: 625142448
> Device capabilities:
>       ATA standby timer values
>       IORDY operation
>       IORDY disabling
> Device supports the following standards:
> ATA-1 ATA-2 ATA-3 ATA-4 ATA-5 ATA-6 ATA-7 ATA-8
> Master password revision code 0xfffe
> Device supports the following command sets:
>       NOP command
>       READ BUFFER command
>       WRITE BUFFER command
>       Host Protected Area feature set
>       Read look-ahead
>       Write cache
>       Power Management feature set
>       Security Mode feature set
>       SMART feature set
>       Flush Cache Ext command
>       Flush Cache command
>       Device Configuration Overlay feature set
>       48bit address feature set
>       Automatic Acoustic Management feature set
>       Set Max security extension commands
>       Set Features subcommand required
>       Power-up in standby feature set
>       DOWNLOAD MICROCODE command
>       SMART self-test
>       SMART error logging
> Device has enabled the following command sets/features:
>       NOP command
>       READ BUFFER command
>       WRITE BUFFER command
>       Host Protected Area feature set
>       Read look-ahead
>       Write cache
>       Power Management feature set
>       SMART feature set
>       Flush Cache Ext command
>       Flush Cache command
>       Device Configuration Overlay feature set
>       48bit address feature set
>       Automatic Acoustic Management feature set
>       Set Features subcommand required
>       DOWNLOAD MICROCODE command
> 
> # atactl sd2 readattr
> Attributes table revision: 16
> ID    Attribute name                  Threshold       Value   Raw
>   1   Raw Read Error Rate               51            199     0x0000000309c6
>   3   Spin Up Time                      21            157     0x000000001405
>   4   Start/Stop Count                   0            100     0x0000000002b7
>   5   Reallocated Sector Count         140            200     0x000000000000
>   7   Seek Error Rate                   51            200     0x000000000000
>   9   Power-On Hours Count               0             76     0x000000004660
>  10   Spin Retry Count                  51            100     0x000000000000
>  11   Calibration Retry Count           51            100     0x000000000000
>  12   Device Power Cycle Count           0            100     0x0000000001ec
> 192   Power-Off Retract Count            0            200     0x000000000124
> 193   Load Cycle Count                   0            200     0x0000000002b7
> 194   Temperature                        0            105     0x00000000002a
> 196   Reallocation Event Count           0            200     0x000000000000
> 197   Current Pending Sector Count       0            200     0x00000000000a
> 198   Off-Line Scan Uncorrectable Sect   0            200     0x000000000003
> 199   Ultra DMA CRC Error Count          0            200     0x00000000001d
> 200    *Write Error Rate                51              1     0x00000000b290
> One or more threshold values exceeded!
> 
> # atactl sd2 smartstatus
> No SMART threshold exceeded
> 
> Either some threshold was exceeded or it wasn't:
> am I missing some subtle semantics here?
> 
>       Jan
> 

Reply via email to