User Tools

Site Tools


linux:megaraid

This is an old revision of the document!




The MegaRaid cli utility is used to talk to LSI MegaRaid controllers, such as the one in the PowerEdge 2950 which is re-branded by Dell as the perc5. The utility exists in the AUR (Arch User Repository) and is installed in /opt.

Flag Description
¦ Specifies “or,” meaning you can choose between options.
-aN N specifies the controller number for the command.
-a0,1,2 Specifies the command is for controllers 0, 1, and 2. You can select two or more controllers in this manner.
-aALL Specifies the command is for all controllers.
-Lx x specifies the virtual drive number for the command.
-L0,1,2 Specifies the command is for virtual drives 0, 1, and 2. You can select two or more virtual drives in this manner.
-Lall Specifies the command is for all virtual drives.
[E0:S0,E1,S1,…] Specifies when one or more physical devices need(s) to be specified in the command line. Each [E:S] pair specifies one physical device where E means device ID of the enclosure in which a drive resides, and S means the slot number of the enclosure. In the case of a physical device directly connected to the SAS port on the controller, with no enclosure involved, the format of [:S] can be used where S means the port number on the controller. For devices attached through the backplane, the firmware provides an enclosure device ID and MegaCLI expects the user input in the format of [E:S]. In the following sections, only the format, [E:S], is used in the command descriptions, although both formats are valid.
[ ] Indicates that the parameter is optional except when it is used to specify physical devices. For example, [WT] means the write policy (WriteThrough) is optional. If you enter WT at the command line, the application will use WriteThrough write policy for the virtual drive. Otherwise, it uses the default value for the parameter.
{ } Indicates that the parameters are grouped and that they must be given at the same time.
Command
MegaCli -AdpAllinfo -aN ¦-a0,1,2¦-aALL Displays information about the controller, including cluster state, BIOS, alarm, firmware version, BIOS version, battery charge counter value, rebuild rate, bus number/device number, present RAM, memory size, serial number of the board, and SAS address.

Controller Properties

CacheFlushInterval: Cache flush interval in seconds. Values: 0 to 255.

RebuildRate: Rebuild rate. Values: 0 to 100.

PatrolReadRate: Patrol read rate. Values: 0 to 100.

BgiRate: Background initilization rate. Values: 0 to 100.

CCRate: Consistency check rate. Values: 0 to 100.

ReconRate: Reconstruction rate. Values: 0 to 100.

SpinupDriveCount: Max number of drives to spin up at one time. Values: 0 to 255.

SpinupDelay: Number of seconds to delay among spinup groups. Values: 0 to 255.

CoercionMode: Drive capacity Coercion mode. Values: 0 - None, 1 - 128 Mbytes,
2 - 1 Gbytes.

ClusterEnable: Cluster is enabled or disabled. Values: 0 - Disabled, 1 - Enabled.

PredFailPollInterval: Number of seconds between predicted fail polls. Values:
0 to 65535.

BatWarnDsbl: Disable warnings for missing battery or missing hardware.

Values: 0 - Enabled, 1 - Disabled.

EccBucketSize: Size of ECC single-bit-error bucket. Values: 0 to 255.

EccBucketLeakRate: Leak rate (in minutes) of ECC single-bit-error bucket.

Values: 0 to 65535.

AbortCCOnError:

AlarmEnbl: Set alarm to Enabled.

AlarmDsbl: Set alarm to Disabled.

AlarmSilence: Silence an active alarm.

SMARTCpyBkEnbl: Enable copyback operation on Self-Monitoring Analysis and
Reporting Technology (SMART) errors. Copyback is initiated when the first SMART
error occurs on a drive that is part of a virtual drive.

AutoDetectBackPlaneDsbl: Detect automatically if the backplane has been
disabled.

CopyBackDsbl: Disable or enable the copyback operation.

LoadBalanceMode: Disable or enable the load balancing mode.

Set Properties

MegaCli –AdpSetProp {CacheFlushInterval –val}|{RebuildRate -val}|
{PatrolReadRate –val}|{BgiRate –val}|{CCRate –val}| {ReconRate –val}|
{SpinupDriveCount –val}|{SpinupDelay –val}|{CoercionMode –val} |
{ClusterEnable –val}|{PredFailPollInterval –val}| {BatWarnDsbl –val}|
{EccBucketSize –val}|{EccBucketLeakRate –val}|{AbortCCOnError
–val}|AlarmEnbl | AlarmDsbl | AlarmSilence |{SMARTCpyBkEnbl –val} |
-AutoDetectBackPlaneDsbl | -CopyBackDsbl | -LoadBalanceMode | -aN|
-a0,1,2|-aALL

Get Properties

MegaCli –AdpGetProp CacheFlushInterval | RebuildRate | PatrolReadRate|
 BgiRate | CCRate | ReconRate | SpinupDriveCount | SpinupDelay |
CoercionMode | PredFailPollInterval | ClusterEnable | BatWarnDsbl |
EccBucketSize | EccBucketLeakRate | EccBucketCount | AlarmDsply -aN|
-a0,1,2|-aALL

Set Factory Defaults

MegaCli -AdpFacDefSet -aN|-a0,1,2|-aALL
</code

===== Set Time and Date on Controller =====
<code>
MegaCli –AdpSetTime yyyymmdd HH:mm:ss -aN|-a0,1,2|-aALL

Display Time and Date on Controller

MegaCli –AdpSetTime yyyymmdd HH:mm:ss -aN|-a0,1,2|-aALL
linux/megaraid.1317334259.txt.gz · Last modified: 2021/05/02 21:36 (external edit)