Introduced
Our production servers often do raid storage, but can you guarantee performance and data security by simply doing raid? The answer is no, we generally recommend the use of battery-protected raid cards, so as to ensure that performance can ensure data security, but also need to maintain the battery frequently, because of the cost of the general RAID card will use lithium batteries, because the lithium battery has a strong inertia, It will be a slow self-discharge (battery characteristics) in the non-charging state, after a period of time will be different than when the power is fully charged, in order to be able to calibrate the battery in time to avoid the self-discharge caused by the power is not clear, so the array card controller will periodically charge and discharge battery operation (relearn), To ensure the accuracy of the power, but also to determine whether the battery failure or aging.
View RAID Card battery status
Megacli64-adpbbucmd-getbbustatus-aall
If the following error is returned then there may be a problem with the RAID card Buu battery or no battery protection function:
Adapter 0:get BBU Status Failed.
FW Error Description:
The required hardware component is not present.
Exit code:0x22
View current RAID Card cache policy
Megacli64-ldinfo-lall-aall
Default Cache Policy:writethrough, Readaheadnone, Direct, No Write cache if bad BBU
Current Cache Policy:writethrough, Readaheadnone, Direct, No Write cache if bad BBU
The first part:
WriteBack: Write Cache policy
Writethrough: Write directly to disk, do not apply RAID card cache.
Part II:
Readaheadnone: Do not turn on pre-read
ReadAhead: Open pre-read, in the read operation, pre-order data into the RAID card cache, in sequential read environment can provide good performance, but in a random read environment instead of reading performance (suitable for file system, not suitable for database system)
Readadaptive: Adaptive pre-read, select Pre-read, default policy when cache and I/O are idle.
Part III:
Direct: The read operation is not cached to the RAID card cache.
Cached: The read operation is cached to the RAID card cache.
Part IV: If there is a problem with the BBU (battery), write Cache is enabled
No write Cache if bad BBU: If a BBU problem does not use the Write cache, the default configuration is automatically switched from writeback to Writethrough.
Write Cache OK If bad BBU: if there is a problem with the BBU, the write cache is still enabled, and this configuration is very insecure, unless there is a UPS or dual power supply.
RAID Card policy changes
Modify Writeback :
Megacli64-ldsetprop-wb-lall-aall
Modify Writethrough:
Megacli64-ldsetprop-wt-lall-aall
Modify no Write Cache if bad BBU:
Megacli64-ldsetprop-nocachedbadbbu-lall-aall
Modify the Write Cache OK if bad BBU:
Megacli64-ldsetprop-cachedbadbbu-lall-aall
4. Other Related commands
View Machine Model # Dmidecode | grep "Product"
View Manufacturers # dmidecode| grep "Manufacturer"
View Serial # Dmidecode | grep "Serial number"
View CPU Information # Dmidecode | grep "CPU"
See number of CPUs # Dmidecode | grep "Socket designation:cpu" |wc–l
View Factory Date # Dmidecode | grep "Date"
View charge status # megacli64-adpbbucmd-getbbustatus-aall |grep "Charger status"
Display BBU status information # Megacli64-adpbbucmd-getbbustatus–aall
Display BBU Capacity Information # Megacli64-adpbbucmd-getbbucapacityinfo–aall
Display BBU Design Parameters # Megacli64-adpbbucmd-getbbudesigninfo–aall
Show current BBU Properties # Megacli64-adpbbucmd-getbbuproperties–aall
View charge Progress% # Megacli64-adpbbucmd-getbbustatus-aall |grep "Relative State of Charge"
Query RAID Array # megacli64-cfgdsply-aall|grep "Number of DISK GROUPS:"
Display RAID card model, RAID settings, disk related information # Megacli64-cfgdsply–aall
Show all physical Information # Megacli64-pdlist-aall
Show all Logical Disk group information # Megacli64-ldinfo-lall–aall
View Physical Disk rebuild Progress (important) # Megacli64-pdrbld-showprog-physdrv [1:5]-a0
See the number of adapters #MegaCli64 –adpcount
View adapter Time #MegaCli64-adpgettime–aall
Show all adapter Information #MegaCli64-adpallinfo–aall
View cache policy settings # Megacli64-cfgdsply-aall|grep Polic
Linux RAID Card optimization