LSI MegaRAID Battery Relearn – What It Means

lsimegaraid

Our file server just started mailing us about how its battery backup is draining and it's switching from WB to WT mode and so on.

I looked through its logs and found that it is configured to automatically do this periodically. It's called "battery relearning".

What is this for? How often will it decide it needs to do this automatically?

I searched the LSI docs and all I could find was the different status codes for the different relearning states. Not really helpful.

Best Answer

Usually battery relearning refers to draining a battery in order to determine how long it holds a useful charge.

In the case of a battery-backed write cache, this may be just to determine whether the battery is still good enough to trust your data to. Any useful write-caching solution must do this.

It's unfortunate to have a hardware RAID solution that disables the write cache due to battery-related issues. But it is worse to suffer the massive corruption of losing all the data in your write cache. Filesystems (and databases) are not designed to handle corruption of this type at all, and can fail catastrophically (not just losing recent data).

This is probably less relevant on "enterprise" class hardware due to mirroring of write cache between redundant controllers with separate batteries. So each one can be tested independently.