Megarc
Ninereasons (Talk | contribs) (→megarc -setRbldRate|-getRbldRate -a0) |
m (Reverted edits by 94.23.1.28 (talk) to last revision by 75.150.37.150) |
||
(24 intermediate revisions by 9 users not shown) | |||
Line 1: | Line 1: | ||
+ | [[Category:Ports and Packages]] [[Category:RAID]] | ||
'''''{{PAGENAME}}''''' is a commandline utility that provides an interface to many of the configuration and reporting functions for LSI Logic's MegaRAID BIOS (http://www.lsilogic.com). | '''''{{PAGENAME}}''''' is a commandline utility that provides an interface to many of the configuration and reporting functions for LSI Logic's MegaRAID BIOS (http://www.lsilogic.com). | ||
==Megarc port for FreeBSD== | ==Megarc port for FreeBSD== | ||
− | The ''megarc'' utility ships | + | The ''megarc'' utility ships as a binary, without any accompanying documentation, on the "Megaraid Universal Software Suite" CD which accompanies any boxed LSI Logic RAID storage adapter. It is also found in the FreeBSD ports collection. |
* On the CD that comes with the storage adapter, the utility is found in two places. It is part of a zipped bundle in <cd>:\SW_Components\Drivers\dr_freebsd_1.51.zip on our distribution. The zip file contents are as follows: | * On the CD that comes with the storage adapter, the utility is found in two places. It is part of a zipped bundle in <cd>:\SW_Components\Drivers\dr_freebsd_1.51.zip on our distribution. The zip file contents are as follows: | ||
Line 18: | Line 19: | ||
</pre> | </pre> | ||
− | * The utility is also found on the CD by itself, at "<cd>:\SW_Components\Utilities\ut_FreeBSD_MegaRC 1.04.zip". | + | * The utility is also found on the CD by itself, at "<cd>:\SW_Components\Utilities\ut_FreeBSD_MegaRC 1.04.zip". |
− | * It can be also be installed from the [http://www.freebsd.org/cgi/cvsweb.cgi/ports/sysutils/megarc/ ports collection] at /usr/ports/sysutils/megarc. The port extracts the binary from the bundled dr_freebsd_*.zip | + | * It can be downloaded from LSI at http://www.lsi.com/downloads/Public/MegaRAID%20Common%20Files/dr_freebsd_1.51.zip |
+ | |||
+ | * It can be also be installed from the [http://www.freebsd.org/cgi/cvsweb.cgi/ports/sysutils/megarc/ ports collection] at /usr/ports/sysutils/megarc. The port extracts the binary from the bundled dr_freebsd_*.zip Our example was installed from the ports collection on 6.1-PRERELEASE FreeBSD amd64 | ||
+ | |||
+ | |||
+ | <pre> | ||
+ | # file /usr/local/sbin/megarc | ||
+ | /usr/local/sbin/megarc: ELF 32-bit LSB executable, Intel 80386, | ||
+ | version 1 (FreeBSD), for FreeBSD 5.2.1, statically linked, stripped | ||
+ | </pre> | ||
==Documentation== | ==Documentation== | ||
− | The documentation for megarc is limited to the output of its ?/ | + | The documentation for megarc is limited to the output of its ?/help functions. Since these [[RAID]] adapters are reasonably popular, and the commands are a bit scary and somewhat obscurely named, this page might prove helpful to someone even though it's not complete. |
− | '' | + | Megarc must be run with sufficient privileges, or the adapter will not be found. "?" and "help" are not synonymous. ''?'' (mis-named "complete help") gives brief syntax hints. ''help'' gives a fuller description of what the command does, and its arguments and usage. |
− | + | ||
− | '' | + | * To see the commands available, as root type:<br /><code>megarc ?</code> |
− | : list of | + | First Parameter should be : |
− | + | -AllAdpInfo | |
− | : functionality specific help | + | ... etc ... |
− | + | *To see a list of commands and syntax, type:<br /> <code>megarc help</code> | |
− | : help on -ctlrinfo option | + | <pre> |
+ | ------------------------------------------------------------------------- | ||
+ | * Convention Used: | ||
+ | [Cmd = The name of the utility] | ||
+ | opt1|opt2|opt3 => Only one of these can be specified | ||
+ | |||
+ | ------------------------------------------------------------------------- | ||
+ | Cmd ?: Gives complete help | ||
+ | Cmd -functionality ?: functionality specific help | ||
+ | Example: | ||
+ | Cmd -ctlrInfo ? :help on -ctlrinfo option | ||
+ | |||
+ | ------------------------------------------------------------------------- | ||
+ | Usage: Cmd -ctlrInfo -aX | ||
+ | ... etc ... | ||
+ | </pre> | ||
+ | * '''Example:'''<br /> <code> megarc -ctlrInfo help </code> | ||
+ | <pre> | ||
+ | ********************************************************************** | ||
+ | |||
+ | usage : | ||
+ | cmd -ctlrInfo -aX | ||
+ | : Shows general adapter info of adapter | ||
+ | ********************************************************************** | ||
+ | where : | ||
+ | cmd : name of the utility | ||
+ | -aX : adapter number X(max 12 adapters). X=0..11 | ||
+ | ********************************************************************** | ||
+ | </pre> | ||
==Examples== | ==Examples== | ||
− | For the examples below, we are using an LSILogic 150-6 x64 SATA RAID adapter on a 32-bit PCI slot - "adapter 0" on the system - with a RAID 5 volume consisting of five (5) physical SATA drives of 400GB each. The hot-spare belongs | + | For the examples below, we are using an LSILogic 150-6 x64 SATA RAID adapter on a 32-bit PCI slot - "adapter 0" on the system - with a RAID 5 volume consisting of five (5) physical SATA drives of 400GB each. The hot-spare belongs to target 00 but is being replaced at the time of this writing. |
− | Below are some brief descriptions of some of the commands, and some examples of output from a few of the information functions. These | + | Below are some brief descriptions of some of the commands, and some examples of output from a few of the information functions. These command-options are not case-sensitive. |
===megarc -dispCfg -a0 === | ===megarc -dispCfg -a0 === | ||
Line 80: | Line 118: | ||
===megarc -ScfgAndParm|-DfcfgAndParm|-RcfgAndParm -fFileName -a0 === | ===megarc -ScfgAndParm|-DfcfgAndParm|-RcfgAndParm -fFileName -a0 === | ||
− | Save, Display, or Restore the configuration and parameters for adapter ''0'', in ''FileName''. ''FileName'' stores the same output provided by -dispCfg | + | Save, Display, or Restore the configuration and parameters for adapter ''0'', in ''FileName''. ''FileName'' stores the same output provided by -dispCfg in a binary format, making it possible to directly load the stored configuration from the file. |
===megarc -physOn pd[c0:t0,c1:t1....] -a0=== | ===megarc -physOn pd[c0:t0,c1:t1....] -a0=== | ||
Line 112: | Line 150: | ||
PhysDrvSerial#: WD-W | PhysDrvSerial#: WD-W | ||
+ | |||
+ | etc ... | ||
</pre> | </pre> | ||
Line 154: | Line 194: | ||
Get or set the transfer rate for all channels on adapter ''0''. | Get or set the transfer rate for all channels on adapter ''0''. | ||
<pre> | <pre> | ||
− | # megarc -getXFerRate -a0 - | + | # megarc -getXFerRate -a0 -ch0 |
********************************************************************** | ********************************************************************** | ||
− | Transfer Rate of Adapter-0 Channel- | + | Transfer Rate of Adapter-0 Channel-0 is 160M |
********************************************************************** | ********************************************************************** | ||
</pre> | </pre> |
Latest revision as of 00:37, 6 October 2012
Megarc is a commandline utility that provides an interface to many of the configuration and reporting functions for LSI Logic's MegaRAID BIOS (http://www.lsilogic.com).
[edit] Megarc port for FreeBSD
The megarc utility ships as a binary, without any accompanying documentation, on the "Megaraid Universal Software Suite" CD which accompanies any boxed LSI Logic RAID storage adapter. It is also found in the FreeBSD ports collection.
- On the CD that comes with the storage adapter, the utility is found in two places. It is part of a zipped bundle in <cd>:\SW_Components\Drivers\dr_freebsd_1.51.zip on our distribution. The zip file contents are as follows:
Length Date Time Name -------- ---- ---- ---- 130448 04-18-05 14:10 MegaRC 1.04.zip 12953 10-08-04 16:05 amr_x86_64_ver1_51FreeBSD5.3.tgz 153600 03-17-05 15:19 code.tar 535 02-10-05 11:02 FreeBSDDriverUpdate.txt 12774 10-12-04 19:38 amr_i386_ver_1_51_FreeBSD5.3.tgz -------- ------- 310310 5 files
- The utility is also found on the CD by itself, at "<cd>:\SW_Components\Utilities\ut_FreeBSD_MegaRC 1.04.zip".
- It can be downloaded from LSI at http://www.lsi.com/downloads/Public/MegaRAID%20Common%20Files/dr_freebsd_1.51.zip
- It can be also be installed from the ports collection at /usr/ports/sysutils/megarc. The port extracts the binary from the bundled dr_freebsd_*.zip Our example was installed from the ports collection on 6.1-PRERELEASE FreeBSD amd64
# file /usr/local/sbin/megarc /usr/local/sbin/megarc: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), for FreeBSD 5.2.1, statically linked, stripped
[edit] Documentation
The documentation for megarc is limited to the output of its ?/help functions. Since these RAID adapters are reasonably popular, and the commands are a bit scary and somewhat obscurely named, this page might prove helpful to someone even though it's not complete.
Megarc must be run with sufficient privileges, or the adapter will not be found. "?" and "help" are not synonymous. ? (mis-named "complete help") gives brief syntax hints. help gives a fuller description of what the command does, and its arguments and usage.
- To see the commands available, as root type:
megarc ?
First Parameter should be : -AllAdpInfo ... etc ...
- To see a list of commands and syntax, type:
megarc help
------------------------------------------------------------------------- * Convention Used: [Cmd = The name of the utility] opt1|opt2|opt3 => Only one of these can be specified ------------------------------------------------------------------------- Cmd ?: Gives complete help Cmd -functionality ?: functionality specific help Example: Cmd -ctlrInfo ? :help on -ctlrinfo option ------------------------------------------------------------------------- Usage: Cmd -ctlrInfo -aX ... etc ...
- Example:
megarc -ctlrInfo help
********************************************************************** usage : cmd -ctlrInfo -aX : Shows general adapter info of adapter ********************************************************************** where : cmd : name of the utility -aX : adapter number X(max 12 adapters). X=0..11 **********************************************************************
[edit] Examples
For the examples below, we are using an LSILogic 150-6 x64 SATA RAID adapter on a 32-bit PCI slot - "adapter 0" on the system - with a RAID 5 volume consisting of five (5) physical SATA drives of 400GB each. The hot-spare belongs to target 00 but is being replaced at the time of this writing.
Below are some brief descriptions of some of the commands, and some examples of output from a few of the information functions. These command-options are not case-sensitive.
[edit] megarc -dispCfg -a0
Display the configuration for adapter 0.
Logical Drive : 0( Adapter: 0 ): Status: OPTIMAL --------------------------------------------------- SpanDepth :01 RaidLevel: 5 RdAhead : No Cache: DirectIo StripSz :064KB Stripes : 5 WrPolicy: WriteThru Logical Drive 0 : SpanLevel_0 Disks Chnl Target StartBlock Blocks Physical Target Status ---- ------ ---------- ------ ---------------------- 0 01 0x00000000 0x2e936800 ONLINE 0 02 0x00000000 0x2e936800 ONLINE 0 03 0x00000000 0x2e936800 ONLINE 0 04 0x00000000 0x2e936800 ONLINE 0 05 0x00000000 0x2e936800 ONLINE
[edit] megarc -LogPhysInfo -a0
Display the physical drive information for each of the logical drives on adapter 0.
Logical drive 0: RaidLevel 5 Physical Drive Information Channel 0 381549MB drive ID 1 CoerSZ: 781412352(Sectors) 381549(MB) RawSZ: 781422255(Sectors) 381549MB drive ID 2 CoerSZ: 781412352(Sectors) 381549(MB) RawSZ: 781422255(Sectors) 381549MB drive ID 3 CoerSZ: 781412352(Sectors) 381549(MB) RawSZ: 781422255(Sectors) 381549MB drive ID 4 CoerSZ: 781412352(Sectors) 381549(MB) RawSZ: 781422255(Sectors) 381549MB drive ID 5 CoerSZ: 781412352(Sectors) 381549(MB) RawSZ: 781422255(Sectors)
[edit] megarc -ScfgAndParm|-DfcfgAndParm|-RcfgAndParm -fFileName -a0
Save, Display, or Restore the configuration and parameters for adapter 0, in FileName. FileName stores the same output provided by -dispCfg in a binary format, making it possible to directly load the stored configuration from the file.
[edit] megarc -physOn pd[c0:t0,c1:t1....] -a0
Set the state of the designated drive(s) to Online. pd[c:t] refers to at least one physical drive by channel and target. -aN here as elsewere is the adapter number [required]
If the physical drive does not exist or if it isn't in failed state, the utility exits with no harm done.
An example of this command under our present configuration would be:
megarc -physOn -a0 pd[0:1]
[edit] megarc -phys -chAll -idAll -a0
Show the physical drive description for each device on all channels managed by adapter 0
Adapter 0, Channel 0, Target ID 1 Type: DISK Vendor : WDC Product: WD4000KD-00NAB0 Revision : 01.0 Synchronous : No Wide-32 : No Wide-16: No LinkCmdSupport: No TagQ support: No RelAddr: No Removable : No SoftReset : No AENC : No etc...
[edit] megarc -physdrvSerialInfo -chAll -idAll -a0
Show the serial number for each physical drive on each channel for all serial devices managed by adapter 0 (This doesn't look correct or helpful).
Adapter 0, Channel 0, Target ID 1 PhysDrvSerial#: WD-W etc ...
[edit] megarc -pdFailInfo -chAll -idAll -a0
Show the failure history for each device on all channels managed by adapter 0.
[edit] megarc -setRbldRate|-getRbldRate -a0
Get the rebuild rate for adapter 0.
# megarc -getRbldRate -a0 ... ********************************************************************** RebuildRate of Adapter-0 is 30 **********************************************************************
[edit] megarc -ctlrInfo -a0
Display information about adapter 0.
********************************************************************** Information of Adapter-0 (#Adapter(s) on system: 1) ********************************************************************** Firmware Version : 713N BIOS Version : G119 Logical Drives : 01 DRAM : 64MB Rebuild Rate : 30% Flush Interval : 4 secs Number Of Chnls : 1 Bios Status : Enabled Alarm State : Enabled Auto Rebuild : Enabled FW : SPAN-8, 40-LD BIOS Config AutoSelection : USER BIOS Echos Mesg : ON BIOS Stops On Error : ON Initiator Id : 16(Clustered Firmware) Board SN: -17179869 **********************************************************************
[edit] megarc -getXFerRate|-setXFerRate -a0 -chAll
Get or set the transfer rate for all channels on adapter 0.
# megarc -getXFerRate -a0 -ch0 ********************************************************************** Transfer Rate of Adapter-0 Channel-0 is 160M **********************************************************************