DeepSea
DeepSea copied to clipboard
DeepSea should disable write cache for all disks that do not have a battery backed write cache
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 How do i detect if disk has a battery backed write cache?
@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?
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"?
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.
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