1 Introduction
The RAID card battery on the server, referred to as the BBU, is a very important component, it has a large impact on the I/O performance of the disk, but the general Bbu power can only be used for 90 days, the system will automatically charge it after the power is exhausted, but it usually takes a few hours to charge, during charging, The cache status of the RAID card is in write through, i.e. without the caching feature. So in order to ensure that the server is in normal operation, it is necessary to manually charge and discharge the BBU, usually the charge and discharge time is fixed at night, that is, the server load is minimal.
2 process
Cron writes:
#!/bin/sh
#yes, 1 really does mean off
/opt/megaraid/megacli/megacli64-adpbbucmd-setbbuproperties-f Off-aall
Sleep 5
/opt/megaraid/megacli/megacli64-adpbbucmd-setbbuproperties-f On-aall
The contents of the off file:
Autolearnmode=1
The contents of the on file:
Autolearnmode=0
3 Notes
To run the above script, the server needs to install the MEGACLI tool first, MEGACLI for servers of a type such as Dell, and the tools for different types of servers may not be the same.
This article is from the Linux and networking blog, so be sure to keep this source http://haohaozhang.blog.51cto.com/9176600/1600420
Server RAID card battery automatic charging