[smartmontools-support] problem with scterc on a mac

Dennis Couzin dcouzin at yahoo.com
Sun Feb 9 17:48:41 CET 2020


Dear Christian,
Your quote from the 2008 ATA8-ACS final draft:	
	"Read and Write Command Timer values are set to default values at 
	power-on but may be altered by an SCT command at any time. A device 
	shall not change these settings while processing a hardware reset or a 
	software reset."
The phrase "these settings" in the second sentence is ambiguous: it can refer either to the default values mentioned in the first sentence or to the altered values mentioned later in the first sentence.  To a normal, untechnical English reader, "these settings" would refer to the altered values.  On that reading, if a "power-on" entails a "reset", the second sentence contradicts the first.  But if a "power-on" does not entail a "reset", there will be no contradiction.  

Thus the 2008 ATA8-ACS language was sloppy, and WD, whose man edited the specification, read it one way, while Toshiba read it another way.  Now we have the humorous situation where users are discovering their ERC settings to be "persistent" for some drives and "non-persistent" for other drives.  (For example, TAC's 23 July 2019 post at https://www.ixsystems.com/community/threads/checking-for-tler-erc-etc-support-on-a-drive.27126/page-9 happily announced that his Toshiba N300 retained its ERC values after reboot.)

Ca. 2008, WD supplied a DOS program wdler.exe to make ERC settings on its hard drives.  Could its settings have been anything but "persistent"?  

Sincerely,
Dennis

-----Original Message-----
From: Smartmontools-support <smartmontools-support-bounces at listi.jpberlin.de> On Behalf Of Christian Franke
Sent: Saturday, 8 February 2020 17:35
To: Dennis Couzin <dcouzin at yahoo.com>
Cc: Smartmontools-support at listi.jpberlin.de
Subject: Re: [smartmontools-support] problem with scterc on a mac

Dennis Couzin wrote:
Dear Christian,
I don't understand why you asked, but I confirmed that  "smartctl -l scttemp" running on Darwin does print the temperature table:

	evas-system:~ evaheldmann$ smartctl -l scttemp /dev/disk4
	smartctl 7.0 2018-12-30 r4883 [Darwin 16.7.0 x86_64] (local build)
	Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org

	=== START OF READ SMART DATA SECTION ===
	SCT Status Version:                  3
	SCT Version (vendor specific):       256 (0x0100)
	Device State:                        Active (0)
	Current Temperature:                    28 Celsius
	...
	  13    2020-02-08 13:47    28  *********

I also don't understand the 2008 ATA8-ACS final draft's statement: "a device shall not change these settings while processing a hardware reset or a software reset".  What are hardware or software resets and when do they occur?  Powering off and on certainly does change the ERC settings on some drives (e.g., my WD Red Pro, manufactured 2016) but not on other drives (e.g., my Toshiba N300, manufactured 2019).

Sincerely,
Dennis 


-----Original Message-----
From: Smartmontools-support <smartmontools-support-bounces at listi.jpberlin.de> On Behalf Of Christian Franke
Sent: Friday, 7 February 2020 21:48
To: Dennis Couzin <dcouzin at yahoo.com>
Cc: Smartmontools-support at listi.jpberlin.de
Subject: Re: [smartmontools-support] problem with scterc on a mac

Dennis Couzin via Smartmontools-support wrote:
> Christian Franke, Sun 02/02/2020 16:27, replied to my post of Wed 29/01/2020 22:33:
>
>> The API supports the SMART_WRITE_LOG command, so it should
>> work to set ERC. But you cannot check the result because get
>> ERC does not work due to API restrictions.
>>
>> This may not work because ERC settings are usually not
>> persistent across power cycles and device resets.
> Thanks for warning about non-persistent ERC settings.  Sure enough, for my WD Red Pro drive (4TB SATA), Linux smartctl could set arbitrary scterc,x,y, but on restart the drive reverted to its default settings (70,70).  However, my Toshiba N300 drive (6TB SATA) does take persistent ERC settings.  That is, they persist when set in Linux.

My assumption about device resets was wrong. Here a quote from the 
original spec of this functionality (ATA8-ACS final draft, 2008):

"Read and Write Command Timer values are set to default values at 
power-on but may be altered by an SCT command at any time. A device 
shall not change these settings while processing a hardware reset or a 
software reset."

ACS-4 (2017) added new commands to get/set the Power-on Timer values and 
to restore the factory defaults. Not yet supported by smartctl. May be 
supported by recent devices where smartctl prints "Minimum supported ERC 
Time Limit: ..." in "SCT Status ..." section.


> The Darwin smartctl seems to do something very bad on the Toshiba N300 drive.  It pretends to make new ERC settings, but it actually kills the ERC settings.  Restarting the drive with Linux, I found neither the new ERC settings from the Darwin smartctl nor the previous ERC settings from the Linux smartctl.  Instead there was reversion to this drive's default settings (0,0).  If my experiment was correct, then "smartctl -l scterc,x,y" in Darwin is worse than ineffective; it is dangerous.

Does "smartctl -l scttemp" print the temperature table? If not, we 
should possibly block SMART_WRITE_LOG commands in the Darwin interface 
module.

Regards,
Christian

_______________________________________________
Smartmontools-support mailing list
Smartmontools-support at listi.jpberlin.de
https://listi.jpberlin.de/mailman/listinfo/smartmontools-support




More information about the Smartmontools-support mailing list