Linux RAID card optimization and Linux raid Optimization

Source: Internet
Author: User

Linux RAID card optimization and Linux raid Optimization
Introduction

Our production servers often use raid storage. But can raid alone ensure high performance and data security? The answer is no. We generally recommend using raid cards with battery protection. This ensures performance and ensures data security, but also requires frequent battery maintenance; for cost reasons, a RAID card uses a lithium battery. Because the lithium battery has a strong inertia, it will slowly discharge itself in a non-rechargeable state (battery characteristics ), after a period of time, the power will be different from when the power is just fully loaded. In order to timely calibrate the power of the battery, the power of the battery is not clear due to self-discharge, as a result, the array card controller periodically performs Relearn on the battery to ensure the power accuracy and determine whether the battery is faulty or aging.

 

 

View RAID card battery
MegaCli64 -AdpBbuCmd -GetBbuStatus -aAll

If the following error is returned, the RAID card BUU battery may be faulty or the battery protection function is not available:

Adapter 0: Get BBU Status Failed.

FW error description:

The required hardware component is not present.

Exit Code: 0x22

View the 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

Part 1:

WriteBack: Write Cache Policy

WriteThrough: writes data directly to the disk and does not apply to the RAID card cache.

Part 2:

ReadAheadNone: Pre-read disabled

ReadAhead: When pre-reading is enabled, data in the subsequent sequence is loaded into the RAID card cache in advance, which can provide good performance in the sequential read environment, however, in a random read environment, the read performance is reduced (suitable for file systems and not for database systems)

ReadAdaptive: Adaptive Pre-read. Select pre-read when the cache and I/O are idle. the Default policy is applied.

Part 3:

Direct: Read operations are not cached on the raid card.

Cached: Read operations are Cached on the raid card.

Part 4: whether to enable Write Cache if a BBU (battery) problem occurs

No Write Cache if Bad BBU: if the BBU is faulty and the Write Cache is not used, the system automatically switches from WriteBack to WriteThrough, Which is configured by default.

Write Cache OK if Bad BBU: if the BBU is still enabled due to a problem, this configuration is extremely insecure unless it has a UPS or dual-power supply.

RAID card Policy Change

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 Write Cache OK if Bad BBU:

MegaCli64 -LDSetProp -CachedBadBBU -Lall -aAll
4. Other related commands

View the machine model # dmidecode | grep "Product"

View vendor # dmidecode | grep "Manufacturer"

View Serial Number # dmidecode | grep "Serial Number"

View CPU information # dmidecode | grep "CPU"

View the number of CPUs # dmidecode | grep "Socket Designation: CPU" | wc-l

View factory Date # dmidecode | grep "Date"

View the charging Status # MegaCli64-AdpBbuCmd-GetBbuStatus-aALL | grep "Charger Status"

Display BBU status information # MegaCli64-AdpBbuCmd-GetBbuStatus-aALL

Display BBU capacity information # MegaCli64-AdpBbuCmd-GetBbuCapacityInfo-aALL

Show BBU Design Parameters # MegaCli64-AdpBbuCmd-GetBbuDesignInfo-aALL

Display the current BBU attribute # MegaCli64-AdpBbuCmd-GetBbuProperties-aALL

View the charging progress percentage # MegaCli64-AdpBbuCmd-GetBbuStatus-aALL | grep "Relative State of Charge"

Query the Number of Raid arrays # MegaCli64-cfgdsply-aALL | grep "Number of disk groups :"

Show Raid card model, Raid settings, Disk information # MegaCli64-cfgdsply-aALL

Show all physical information # MegaCli64-PDList-aALL

Display information of all Logical Disk groups # MegaCli64-LDInfo-LALL-aAll

View the physical disk reconstruction progress (important) # MegaCli64-PDRbld-ShowProg-PhysDrv []-a0

View the number of adapters # MegaCli64-adpCount

View the adapter time # MegaCli64-AdpGetTime-aALL

Show all adapter information # MegaCli64-AdpAllInfo-aAll

View Cache policy settings # MegaCli64-cfgdsply-aALL | grep Polic

 

 

Radi card battery charge and discharge: http://www.tuicool.com/articles/a2AzAb

Summary

 

 

 

Note:

Author: pursuer. chen

Blog: http://www.cnblogs.com/chenmh

All essays on this site are original. You are welcome to repost them. However, you must indicate the source of the article and clearly give the link at the beginning of the article.

Welcome to discussion

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.