http://freebsdwiki.net/api.php?action=feedcontributions&user=195.14.50.18&feedformat=atomFreeBSDwiki - User contributions [en]2024-03-29T06:19:52ZUser contributionsMediaWiki 1.18.0http://freebsdwiki.net/index.php/MegarcMegarc2007-08-02T11:04:42Z<p>195.14.50.18: /* Megarc port for FreeBSD */</p>
<hr />
<div>[[Category:Ports and Packages]] [[Category:RAID]]<br />
'''''{{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). <br />
<br />
==Megarc port for FreeBSD==<br />
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.<br />
<br />
* 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:<br />
<br />
<pre><br />
Length Date Time Name<br />
-------- ---- ---- ----<br />
130448 04-18-05 14:10 MegaRC 1.04.zip<br />
12953 10-08-04 16:05 amr_x86_64_ver1_51FreeBSD5.3.tgz<br />
153600 03-17-05 15:19 code.tar<br />
535 02-10-05 11:02 FreeBSDDriverUpdate.txt<br />
12774 10-12-04 19:38 amr_i386_ver_1_51_FreeBSD5.3.tgz<br />
-------- -------<br />
310310 5 files<br />
</pre><br />
<br />
* The utility is also found on the CD by itself, at "<cd>:\SW_Components\Utilities\ut_FreeBSD_MegaRC 1.04.zip". <br />
<br />
* 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<br />
<br />
<br />
<pre><br />
# file /usr/local/sbin/megarc<br />
/usr/local/sbin/megarc: ELF 32-bit LSB executable, Intel 80386,<br />
version 1 (FreeBSD), for FreeBSD 5.2.1, statically linked, stripped<br />
</pre><br />
<br />
==Documentation==<br />
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. <br />
<br />
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. <br />
<br />
* To see the commands available, as root type:<br /><code>megarc ?</code><br />
First Parameter should be :<br />
-AllAdpInfo <br />
... etc ...<br />
*To see a list of commands and syntax, type:<br /> <code>megarc help</code><br />
<pre><br />
-------------------------------------------------------------------------<br />
* Convention Used:<br />
[Cmd = The name of the utility]<br />
opt1|opt2|opt3 => Only one of these can be specified<br />
<br />
-------------------------------------------------------------------------<br />
Cmd ?: Gives complete help<br />
Cmd -functionality ?: functionality specific help<br />
Example:<br />
Cmd -ctlrInfo ? :help on -ctlrinfo option<br />
<br />
-------------------------------------------------------------------------<br />
Usage: Cmd -ctlrInfo -aX <br />
... etc ...<br />
</pre><br />
* '''Example:'''<br /> <code> megarc -ctlrInfo help </code><br />
<pre><br />
**********************************************************************<br />
<br />
usage :<br />
cmd -ctlrInfo -aX<br />
: Shows general adapter info of adapter<br />
**********************************************************************<br />
where :<br />
cmd : name of the utility<br />
-aX : adapter number X(max 12 adapters). X=0..11<br />
**********************************************************************<br />
</pre><br />
<br />
==Examples==<br />
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.<br />
<br />
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.<br />
<br />
===megarc -dispCfg -a0 ===<br />
Display the configuration for adapter ''0''.<br />
<br />
<pre><br />
Logical Drive : 0( Adapter: 0 ): Status: OPTIMAL<br />
---------------------------------------------------<br />
SpanDepth :01 RaidLevel: 5 RdAhead : No Cache: DirectIo<br />
StripSz :064KB Stripes : 5 WrPolicy: WriteThru<br />
<br />
Logical Drive 0 : SpanLevel_0 Disks<br />
Chnl Target StartBlock Blocks Physical Target Status<br />
---- ------ ---------- ------ ----------------------<br />
0 01 0x00000000 0x2e936800 ONLINE<br />
0 02 0x00000000 0x2e936800 ONLINE<br />
0 03 0x00000000 0x2e936800 ONLINE<br />
0 04 0x00000000 0x2e936800 ONLINE<br />
0 05 0x00000000 0x2e936800 ONLINE<br />
</pre><br />
<br />
===megarc -LogPhysInfo -a0 ===<br />
Display the physical drive information for each of the logical drives on adapter ''0''.<br />
<br />
<pre><br />
Logical drive 0: RaidLevel 5<br />
<br />
Physical Drive Information<br />
Channel 0<br />
381549MB drive ID 1<br />
CoerSZ: 781412352(Sectors) 381549(MB) RawSZ: 781422255(Sectors)<br />
381549MB drive ID 2<br />
CoerSZ: 781412352(Sectors) 381549(MB) RawSZ: 781422255(Sectors)<br />
381549MB drive ID 3<br />
CoerSZ: 781412352(Sectors) 381549(MB) RawSZ: 781422255(Sectors)<br />
381549MB drive ID 4<br />
CoerSZ: 781412352(Sectors) 381549(MB) RawSZ: 781422255(Sectors)<br />
381549MB drive ID 5<br />
CoerSZ: 781412352(Sectors) 381549(MB) RawSZ: 781422255(Sectors)<br />
<br />
</pre><br />
<br />
===megarc -ScfgAndParm|-DfcfgAndParm|-RcfgAndParm -fFileName -a0 ===<br />
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.<br />
<br />
===megarc -physOn pd[c0:t0,c1:t1....] -a0===<br />
<br />
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]<br />
<br />
If the physical drive does not exist or if it isn't in failed state, the utility exits with no harm done.<br />
<br />
An example of this command under our present configuration would be: <br />
megarc -physOn -a0 pd[0:1]<br />
<br />
===megarc -phys -chAll -idAll -a0===<br />
Show the physical drive description for each device on all channels managed by adapter ''0''<br />
<br />
<pre><br />
<br />
Adapter 0, Channel 0, Target ID 1 <br />
Type: DISK Vendor : WDC<br />
Product: WD4000KD-00NAB0 Revision : 01.0<br />
Synchronous : No Wide-32 : No Wide-16: No<br />
LinkCmdSupport: No TagQ support: No RelAddr: No<br />
Removable : No SoftReset : No AENC : No<br />
etc...<br />
</pre><br />
<br />
===megarc -physdrvSerialInfo -chAll -idAll -a0===<br />
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).<br />
<br />
<pre><br />
Adapter 0, Channel 0, Target ID 1 <br />
<br />
PhysDrvSerial#: WD-W<br />
<br />
etc ...<br />
</pre><br />
<br />
===megarc -pdFailInfo -chAll -idAll -a0===<br />
Show the failure history for each device on all channels managed by adapter ''0''. <br />
<br />
===megarc -setRbldRate|-getRbldRate -a0 ===<br />
Get the rebuild rate for adapter ''0''.<br />
<pre><br />
<br />
# megarc -getRbldRate -a0<br />
<br />
...<br />
<br />
**********************************************************************<br />
RebuildRate of Adapter-0 is 30<br />
**********************************************************************<br />
</pre><br />
<br />
===megarc -ctlrInfo -a0===<br />
Display information about adapter ''0''.<br />
<br />
<pre><br />
**********************************************************************<br />
Information of Adapter-0 (#Adapter(s) on system: 1)<br />
**********************************************************************<br />
<br />
Firmware Version : 713N BIOS Version : G119<br />
Logical Drives : 01 DRAM : 64MB<br />
Rebuild Rate : 30%<br />
Flush Interval : 4 secs<br />
Number Of Chnls : 1 Bios Status : Enabled<br />
Alarm State : Enabled Auto Rebuild : Enabled<br />
FW : SPAN-8, 40-LD BIOS Config AutoSelection : USER<br />
BIOS Echos Mesg : ON BIOS Stops On Error : ON<br />
Initiator Id : 16(Clustered Firmware)<br />
Board SN: -17179869<br />
**********************************************************************<br />
</pre><br />
<br />
===megarc -getXFerRate|-setXFerRate -a0 -chAll===<br />
Get or set the transfer rate for all channels on adapter ''0''.<br />
<pre><br />
# megarc -getXFerRate -a0 -ch0<br />
<br />
**********************************************************************<br />
Transfer Rate of Adapter-0 Channel-0 is 160M<br />
**********************************************************************<br />
</pre></div>195.14.50.18http://freebsdwiki.net/index.php/MegarcMegarc2007-08-02T11:02:31Z<p>195.14.50.18: /* Megarc port for FreeBSD */</p>
<hr />
<div>[[Category:Ports and Packages]] [[Category:RAID]]<br />
'''''{{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). <br />
<br />
==Megarc port for FreeBSD==<br />
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.<br />
<br />
* 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:<br />
<br />
<pre><br />
Length Date Time Name<br />
-------- ---- ---- ----<br />
130448 04-18-05 14:10 MegaRC 1.04.zip<br />
12953 10-08-04 16:05 amr_x86_64_ver1_51FreeBSD5.3.tgz<br />
153600 03-17-05 15:19 code.tar<br />
535 02-10-05 11:02 FreeBSDDriverUpdate.txt<br />
12774 10-12-04 19:38 amr_i386_ver_1_51_FreeBSD5.3.tgzzzz<br />
-------- -------<br />
310310 5 files<br />
</pre><br />
<br />
* The utility is also found on the CD by itself, at "<cd>:\SW_Components\Utilities\ut_FreeBSD_MegaRC 1.04.zip". <br />
<br />
* 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<br />
<br />
<br />
<pre><br />
# file /usr/local/sbin/megarc<br />
/usr/local/sbin/megarc: ELF 32-bit LSB executable, Intel 80386,<br />
version 1 (FreeBSD), for FreeBSD 5.2.1, statically linked, stripped<br />
</pre><br />
<br />
==Documentation==<br />
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. <br />
<br />
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. <br />
<br />
* To see the commands available, as root type:<br /><code>megarc ?</code><br />
First Parameter should be :<br />
-AllAdpInfo <br />
... etc ...<br />
*To see a list of commands and syntax, type:<br /> <code>megarc help</code><br />
<pre><br />
-------------------------------------------------------------------------<br />
* Convention Used:<br />
[Cmd = The name of the utility]<br />
opt1|opt2|opt3 => Only one of these can be specified<br />
<br />
-------------------------------------------------------------------------<br />
Cmd ?: Gives complete help<br />
Cmd -functionality ?: functionality specific help<br />
Example:<br />
Cmd -ctlrInfo ? :help on -ctlrinfo option<br />
<br />
-------------------------------------------------------------------------<br />
Usage: Cmd -ctlrInfo -aX <br />
... etc ...<br />
</pre><br />
* '''Example:'''<br /> <code> megarc -ctlrInfo help </code><br />
<pre><br />
**********************************************************************<br />
<br />
usage :<br />
cmd -ctlrInfo -aX<br />
: Shows general adapter info of adapter<br />
**********************************************************************<br />
where :<br />
cmd : name of the utility<br />
-aX : adapter number X(max 12 adapters). X=0..11<br />
**********************************************************************<br />
</pre><br />
<br />
==Examples==<br />
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.<br />
<br />
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.<br />
<br />
===megarc -dispCfg -a0 ===<br />
Display the configuration for adapter ''0''.<br />
<br />
<pre><br />
Logical Drive : 0( Adapter: 0 ): Status: OPTIMAL<br />
---------------------------------------------------<br />
SpanDepth :01 RaidLevel: 5 RdAhead : No Cache: DirectIo<br />
StripSz :064KB Stripes : 5 WrPolicy: WriteThru<br />
<br />
Logical Drive 0 : SpanLevel_0 Disks<br />
Chnl Target StartBlock Blocks Physical Target Status<br />
---- ------ ---------- ------ ----------------------<br />
0 01 0x00000000 0x2e936800 ONLINE<br />
0 02 0x00000000 0x2e936800 ONLINE<br />
0 03 0x00000000 0x2e936800 ONLINE<br />
0 04 0x00000000 0x2e936800 ONLINE<br />
0 05 0x00000000 0x2e936800 ONLINE<br />
</pre><br />
<br />
===megarc -LogPhysInfo -a0 ===<br />
Display the physical drive information for each of the logical drives on adapter ''0''.<br />
<br />
<pre><br />
Logical drive 0: RaidLevel 5<br />
<br />
Physical Drive Information<br />
Channel 0<br />
381549MB drive ID 1<br />
CoerSZ: 781412352(Sectors) 381549(MB) RawSZ: 781422255(Sectors)<br />
381549MB drive ID 2<br />
CoerSZ: 781412352(Sectors) 381549(MB) RawSZ: 781422255(Sectors)<br />
381549MB drive ID 3<br />
CoerSZ: 781412352(Sectors) 381549(MB) RawSZ: 781422255(Sectors)<br />
381549MB drive ID 4<br />
CoerSZ: 781412352(Sectors) 381549(MB) RawSZ: 781422255(Sectors)<br />
381549MB drive ID 5<br />
CoerSZ: 781412352(Sectors) 381549(MB) RawSZ: 781422255(Sectors)<br />
<br />
</pre><br />
<br />
===megarc -ScfgAndParm|-DfcfgAndParm|-RcfgAndParm -fFileName -a0 ===<br />
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.<br />
<br />
===megarc -physOn pd[c0:t0,c1:t1....] -a0===<br />
<br />
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]<br />
<br />
If the physical drive does not exist or if it isn't in failed state, the utility exits with no harm done.<br />
<br />
An example of this command under our present configuration would be: <br />
megarc -physOn -a0 pd[0:1]<br />
<br />
===megarc -phys -chAll -idAll -a0===<br />
Show the physical drive description for each device on all channels managed by adapter ''0''<br />
<br />
<pre><br />
<br />
Adapter 0, Channel 0, Target ID 1 <br />
Type: DISK Vendor : WDC<br />
Product: WD4000KD-00NAB0 Revision : 01.0<br />
Synchronous : No Wide-32 : No Wide-16: No<br />
LinkCmdSupport: No TagQ support: No RelAddr: No<br />
Removable : No SoftReset : No AENC : No<br />
etc...<br />
</pre><br />
<br />
===megarc -physdrvSerialInfo -chAll -idAll -a0===<br />
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).<br />
<br />
<pre><br />
Adapter 0, Channel 0, Target ID 1 <br />
<br />
PhysDrvSerial#: WD-W<br />
<br />
etc ...<br />
</pre><br />
<br />
===megarc -pdFailInfo -chAll -idAll -a0===<br />
Show the failure history for each device on all channels managed by adapter ''0''. <br />
<br />
===megarc -setRbldRate|-getRbldRate -a0 ===<br />
Get the rebuild rate for adapter ''0''.<br />
<pre><br />
<br />
# megarc -getRbldRate -a0<br />
<br />
...<br />
<br />
**********************************************************************<br />
RebuildRate of Adapter-0 is 30<br />
**********************************************************************<br />
</pre><br />
<br />
===megarc -ctlrInfo -a0===<br />
Display information about adapter ''0''.<br />
<br />
<pre><br />
**********************************************************************<br />
Information of Adapter-0 (#Adapter(s) on system: 1)<br />
**********************************************************************<br />
<br />
Firmware Version : 713N BIOS Version : G119<br />
Logical Drives : 01 DRAM : 64MB<br />
Rebuild Rate : 30%<br />
Flush Interval : 4 secs<br />
Number Of Chnls : 1 Bios Status : Enabled<br />
Alarm State : Enabled Auto Rebuild : Enabled<br />
FW : SPAN-8, 40-LD BIOS Config AutoSelection : USER<br />
BIOS Echos Mesg : ON BIOS Stops On Error : ON<br />
Initiator Id : 16(Clustered Firmware)<br />
Board SN: -17179869<br />
**********************************************************************<br />
</pre><br />
<br />
===megarc -getXFerRate|-setXFerRate -a0 -chAll===<br />
Get or set the transfer rate for all channels on adapter ''0''.<br />
<pre><br />
# megarc -getXFerRate -a0 -ch0<br />
<br />
**********************************************************************<br />
Transfer Rate of Adapter-0 Channel-0 is 160M<br />
**********************************************************************<br />
</pre></div>195.14.50.18