Linux – How to tell if the hard drive(s) have Battery Backed Write Cache

batterydisaster-recoveryhard drivelinuxstorage

How can I tell if my hard drives have a battery backed write cache (BBWC)?

How can I tell if it is enabled and/or configured correctly?

I don't have physical access to my server. It's a GNU/Linux box.

I can provide supplemental incremental information/details as requested. My frame of reference is that of a DBA — I have access and privileges, but (usually) only tread where I know am supposed to. 🙂

Best Answer

I've never actually seen battery backed write cache in harddisks - only in RAID controllers. How to query the controller is rather specific to your hardware. It will almost certainly require root privileges on the box.

For example, using Dell PERC controllers, and having dell-omsa-repository installed, I can do:

# omreport storage battery
List of Batteries in the System

Controller SAS 6/iR Integrated (Slot Embedded)
No Batteries found

On another server:

# omreport storage battery
List of Batteries in the System

Controller PERC 4e/Di (Slot Embedded)
ID                        : 0
Status                    : Ok
Name                      : Battery 0
State                     : Ready
Recharge Count            : 0
Max Recharge Count        : 1100
Predicted Capacity Status : Not Applicable
Learn State               : Not Applicable
Next Learn Time           : Not Applicable
Maximum Learn Delay       : Not Applicable

I haven't been able to find right now how to ask it what the current write cache setting is, but I think I've seen it in there before. However, if you're not using Dell RAID controllers, you will need different software.