Working Draft ATA/ATAPI Command Set - 3 (ACS-3):
http://www.t13.org/Documents/UploadedDo ... et_-_3.pdfBit 5 of words 82 and 85 of the Identify Device data block indicate whether the firmware supports a "volatile write cache" and whether it is enabled.
Code:
-- IDENTIFY_DEVICE ---------------------------------------------------------
0 1 2 3 4 5 6 7 8 9
080: 03FC 0029 746B 7D69 4773 7449 BC41 4773 007F 8152
^ ^
In your case write caching is supported but disabled.
The Set Features 02h/82h subcommands enable/disable the volatile write cache.
There is also an SCT Feature Control command.
Quote:
The SCT Feature Control command reports and sets the state (i.e., enabled or disabled) of the features specified by the command.
Code:
Feature Code State Definition
-----------------------------------------------------------------------------------
0001h If State is set to 0001h, then the SET FEATURES command (see 7.45)
shall determine the state of the write cache (see 7.45.4).
If State is set to 0002h, then write cache shall be enabled.
If State is set to 0003h, then write cache shall be disabled.
[b]If State is set to 0002h or 0003h, then write cache shall be set
to the specified state, and any attempt to change the write cache
settings using a SET FEATURES command shall not result in an error
and shall not change the operational state of the write cache.[/b]
In all cases, IDENTIFY DEVICE data word 85 bit 5 (see 7.16.7.41)
shall reflect the current operational state of write cache
(i.e., if set to one, then volatile write cache is enabled, and
if cleared to zero, then write cache is disabled. The default is
State set to 0001h.
Hitachi's HUS726060ALE610 drive is a SATA model, not SAS (as you indicated in your yet-to-appear post).
Here is the correct technical manual:
https://www.hgst.com/sites/default/file ... Rev1.3.pdfIIUC, the drive disables write caching if it runs out of spare sectors.
Quote:
Non recovered write errors
When a write operation cannot be completed after the Error Recovery Procedure (ERP) is fully carried out, the sector(s) are reallocated to the spare location. An error is reported to the host system only when the write cache is disabled and the auto reallocation is failed. If the write cache function is ENABLED, and when the number of available spare sectors reaches 0 sectors, both auto reassign function and write cache function are disabled automatically.
However, your SMART report suggests that there is nothing wrong in that regard, ie no reallocated, pending or uncorrectable sectors.
You could use hdparm to enable/disable write caching:
http://linux.die.net/man/8/hdparmTo enable write caching ...
To disable write caching ...