DeepSea icon indicating copy to clipboard operation
DeepSea copied to clipboard

DeepSea should disable write cache for all disks that do not have a battery backed write cache

Open Martin-Weiss opened this issue 5 years ago • 5 comments

Description of Issue/Question

When ever we have spinning disks that do not have battery backed write cache - we have to disable the write cache to ensure data-consistency also in case of power outages. For SSD/NVMe this is most often not required to be turned of because they have capacitors that allow to flush the write cache also in case of a power outage without loosing data.

--> could we get the command "sdparm --clear=WCE --save /dev/$DISK" added to disable WCE on all spinning disks that do not have battery backed write cache?

(check the status with "sdparm /dev/$DISK|grep WCE" --> should be "0")

Martin-Weiss avatar Jul 25 '18 12:07 Martin-Weiss

@Martin-Weiss How do i detect if disk has a battery backed write cache?

kbaikov avatar Aug 01 '18 12:08 kbaikov

@Martin-Weiss Also the "--save" parameter never works for me with the error message: "change_mode_page: mode page indicates it is not savable but '--save' option given (try without it)"

That means without a --save parameter it will be applied only until first reboot. Is that what we want?

kbaikov avatar Aug 01 '18 12:08 kbaikov

How do i detect if disk has a battery backed write cache?

I do not know that - but in general spinning disks that are not "hidden" behind a raid controller do not have battery backed write cache and due to that all of them need to have write cache disabled.

lso the "--save" parameter never works for me with the error message: "change_mode_page: mode page indicates it is not savable but '--save' option given (try without it)"

What hardware are you testing on? Do you test with real hardware and spinning disks?

That means without a --save parameter it will be applied only until first reboot. Is that what we want?

I believe we have to "--save" as otherwise the setting gets lost during next power off (not sure if a reboot changes cache settings on a disks).

Maybe the disks you use are not supported with the "--save"?

Martin-Weiss avatar Aug 02 '18 05:08 Martin-Weiss

What hardware are you testing on? Do you test with real hardware and spinning disks?

Yes

I believe we have to "--save" as otherwise the setting gets lost during next power off (not sure if a reboot changes cache settings on a disks).

I am not sure how. Google says you can use the specific utility from the disk manufacturer (Seagate ... etc) But that is not a suitable solution for us.

kbaikov avatar Aug 02 '18 08:08 kbaikov

I believe it depends on the hardware used what result you get.

sdparm /dev/sd$DISK|grep WCE

gives me

WCE 1 [cha: y, def: 1, sav: 1]

and I could change it with

sdparm --clear=WCE --save /dev/sd$DISK

and then got WCE 0 [cha: y, def: 1, sav: 0]

We had HGST HUS726040AL5210 disks connected via AVAGO SAS-3 HBA 9300-8e

Martin-Weiss avatar Aug 02 '18 09:08 Martin-Weiss