Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Enable Write Cache

Featured Replies

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

  • Community Expert

sdparm is for SAS devices only, hdparm for SATA, so hdparm for that one, what error are you getting after running the command?

  • Author

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)

  • Community Expert

What's the board/server? Is it an HP microserver?

 

  • Author

Motherboard: BIOSTAR A68N-5600

  • Community Expert

No idea then, try it on a different controller if available, I don't remember seeing anyone else with the same issue.

  • Author

It was on my LSI controller. Moved it from there to the motherboard SATA connection. Nothing...

  • 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

  • 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

  • Author

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?

  • 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

  • Author

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.

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

  • Author

I think I was getting like 35-40 out of it in Parity. Actually I can't remember anymore but I know it was slower than any other disk I had on there which is why I started looking into it.

Edited by x-null-x

  • 4 weeks later...
  • Author

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

  • 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

 

  • 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!

 

  • 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

  • 3 months later...

Thank you @mavrrick!   This command seems to have worked for my 14TB WD140EDGZ that wouldn't accept the hdparam command to enable the write cache.  Maybe because I am using a pcie adaptec hba controller?

At any rate, it appears to be working now!  And it made "Fix Common Problems" happy!

 

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

 

  • 2 weeks later...

For me the solution was to Enable Cache Writing in the BIOS. Parity Sync is now 160MB/sec. 😀

  • 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!

  • 5 months later...
  • Community Expert

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

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.