Enable Write Cache


Recommended Posts

I found that one of the drives in my array is slow. I looked up some information on write cache and found that on this drive its disabled. The drive is HGST_HUS726060ALA640 6TB. I've tried some different things to turn on write cache but can't seem to get it to work. Any suggestions?

 

 sdparm -g WCE /dev/sdb
    /dev/sdb: ATA       HGST HUS726060AL  T1EN
WCE           0  [cha: y]
 

Tried this... 

 sdparm --set=WCE /dev/sdb
and this...

hdparm -W1 /dev/sdb

Link to comment
  • 2 months later...

On 5/9/2019 at 1:20 PM, x-null-x said:

No error.

 

I run the following....

hdparm -W1 /dev/sdb

/dev/sdb:
 setting drive write-caching to 1 (on)
 write-caching =  0 (off)

 

Check... Still off

 hdparm -W /dev/sdb

/dev/sdb:
 write-caching =  0 (off)

I am having the same problem on two drives, sdb & sdi. I have twelve matching Seagate 4tb drives. Will not enable on the two out of twelve. I tried on two different motherboards sata ports and on LSI 9207-8i card with same results, won't enable. I just purchase another matching drive to replace one to see if the problem persists or not. I will report back. But in the meantime any helpful suggestions would be greatly appreciated. Thanks

Link to comment
  • 3 months later...

im getting same issue on one of my HGST_HUH728080ALE's 8TB Sata drive that JUST showed up. I have 3 others of the same model without issue it just wont enable.

 

I have another similar model with no issue

 

HGST_HUH728080ALE604 is fine

 

 

HGST_HUH728080ALE600 is the one that wont enable with the hdparm or sdparm commands


 

root@Thor:~# hdparm -W 1 /dev/sdm

/dev/sdm:
 setting drive write-caching to 1 (on)
 write-caching =  0 (off)

 

also tried

 

root@Thor:~# sdparm --set=WCE /dev/sdm
    /dev/sdm: ATA       HGST HUH728080AL  T7JF
root@Thor:~# sdparm -g WCE /dev/sdm
    /dev/sdm: ATA       HGST HUH728080AL  T7JF
WCE           0  [cha: y]


diagnostics attached

thor-diagnostics-20191114-1147.zip

 

 

Edited by Can0nfan
added commands tried
Link to comment

I was able to use the drive via Windows however I had to check the write-caching policy, check  it or uncheck it. Can't remember now. But that was the only way to get the full write speed of the drive. This is the first time I've ever had to do that with a drive. So maybe its a drive issue?

Link to comment
  • 1 month later...

after doing some research online I found some drives have it disabled in firmware and you need to contact the drive maker to get updated firmware to have it enabled. ill eventually replace that old HGST as i bought it used anyways but no issues with writespeeds with it disabled anyways

Link to comment
14 hours ago, x-null-x said:

I wonder if that is my case. I still have the drive and it works perfectly well. Just can't get it to go above 75 mb/s.

Do you have parity drives? I also have write speeds around 75MB/s, but according to the Wiki that should be normal, because one write causes 4 operations.

One read and write on the parity disk and also on the drive you write to.

So 150MB/s per drive (75M/s read and 75MB/s write) and this should be ok for a spinner?

Edited by RedReddington
Link to comment
  • 4 weeks later...

So I recently bought a Rosewill cage, RSV-SATA-CAGE-34, and was going to use the same write cached issue drive as a backup drive, unassigned. I thought at least I could archive on it rather than it just sitting around. While doing a preclear to make sure the drive was still working I noticed that the drive was over 100 MB/s on the preclear. I did an erase and preclear and the drive averaged 145 MB/s. So I put it back in the array as a second parity drive. It seems to be running at a good speed.

 

The plugin Fix Common Problems does give me this warning... I verified again that write-cache is not on.

Write Cache is disabled on parity2

Link to comment
  • 2 months later...

I had this problem with a Seagate IronWolf drive (ST8000VN0022). The write cache was disabled and none of the sdparm or hdparm commands would enable it. I was finally able to fix it with SeaChest utilities (https://www.seagate.com/support/software/seachest/). The download includes a boot drive creation tool. I booted a second system into this Linux environment and the following command fixed the issue for me:

SeaChest_Configure -d /dev/sg0 --sctWriteCache enable

 

  • Like 2
  • Thanks 3
Link to comment
  • 6 months later...

 

On 4/13/2020 at 5:21 PM, cpshoemake said:

I had this problem with a Seagate IronWolf drive (ST8000VN0022). The write cache was disabled and none of the sdparm or hdparm commands would enable it. I was finally able to fix it with SeaChest utilities (https://www.seagate.com/support/software/seachest/). The download includes a boot drive creation tool. I booted a second system into this Linux environment and the following command fixed the issue for me:


SeaChest_Configure -d /dev/sg0 --sctWriteCache enable

 

I appreciate cpshoemake's comment - that saved me a bunch of headache. I used that to enable on two of my Seagate SATA drives that were on my LSI SAS card, and wouldn't change write caching with the above hdparm or sdparm commands. This SeaChest command worked perfect for me!

 

Link to comment
  • 1 year later...

I know this is a old thread, but wanted to put another solution in here I found for my WD drive that were not enabling cache. Here is the source for this method.

 

Unable to activate write caching on several drives - WD Internal Drives / Desktop & Mobile Drives - WD Community

 

The basic idea of it is to use this command first to enable the ATA command on the controller. Update /dev/sdg to your correct drive though.

 

Quote

smartctl -s wcache-sct,ata,p /dev/sdg

 

 

Then once that is submited and comes back showing 

Quote

=== START OF ENABLE/DISABLE COMMANDS SECTION ===
Write cache SCT Feature Control is set to: Controlled by ATA (persistent)

 

Then you can submit the hdparm command to enable write cache as stated earlier in this thread. 

Edited by mavrrick
  • Like 5
  • Thanks 3
Link to comment
  • 3 months later...
  • 2 weeks later...
  • 1 month later...
On 10/20/2022 at 4:13 PM, mavrrick said:

I know this is a old thread, but wanted to put another solution in here I found for my WD drive that were not enabling cache. Here is the source for this method.

 

Unable to activate write caching on several drives - WD Internal Drives / Desktop & Mobile Drives - WD Community

 

The basic idea of it is to use this command first to enable the ATA command on the controller. Update /dev/sdg to your correct drive though.

 

 

 

Then once that is submited and comes back showing 

 

Then you can submit the hdparm command to enable write cache as stated earlier in this thread. 

 

I know this is a necro, but thank you very much @mavrrick - this resolved my issue!

 

Sincerely appreciated!

Link to comment
  • 5 months later...

After changing my Parity drive, as expected, I got 'Fix common problems' flagging my HGST 8TB disk with 'write cache disabled on parity' 
But, I'm getting this:
/dev:
 setting drive write-caching to 1 (on)
 HDIO_DRIVE_CMD(setcache) failed: Inappropriate ioctl for device


I've tried it after this;
smartctl -s wcache-sct,ata,p /dev/sdb


The behaviour did not change.
______________UNTIL I STOPPED THE ARRAY FIRST! xD

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.