嘘~ 正在从服务器偷取页面 . . .

ThinkSystem RAID Storcli工具命令汇总


一、Overview

Storage Command Line Tool (StorCLI) is the command line Storage Management used for the Broadcom RAID controllers.

Supported Controllers:

ThinkSystem:

  • RAID 530-8i
  • RAID 730-8i 1GB Cache
  • RAID 730-8i 2GB Flash
  • RAID 930-8i 2GB Flash
  • RAID 930-16i 4GB Flash
  • RAID 930-16i 8GB Flash
  • RAID 930-24i 4GB Flash
  • RAID 930-8e 4GB Flash
  • RAID 940-8i 4GB Flash
  • RAID 940-8i 8GB Flash
  • RAID 940-16i 8GB Flash
  • RAID 940-16i 8GB Flash Internal Adapter
  • RAID 940-32i 8GB Flash

System x:

  • ServeRAID C110
  • ServeRAID M1210
  • ServeRAID M1215
  • ServeRAID M5210 and M5210e
  • ServeRAID M5225-2GB

ThinkServer:

  • ThinkServer RAID 110i AnyRAID
  • ThinkServer RAID 121i
  • ThinkServer RAID 510i AnyRAID
  • ThinkServer RAID 520i PCIe
  • ThinkServer RAID 720i AnyRAID
  • ThinkServer RAID 720i PCIe
  • ThinkServer RAID 720ix AnyRAID
  • ThinkServer 9286CV-8e
  • ThinkServer 9380-8e

Supported Operating Systems

Supported Operating Systems Version
Linux RHEL 7,8,9 SLES 12,15
Windows Windows 2016 Windows 2019 Windows 2022
Vmware ESXi 6 ESXi 7 ESXi 8
Unified Extensible Firmware Interface UEFI environment

二、Installation

Linux:

  1. Unzip the storcli tool package.
  2. Run the following command to install the storcli RPM.
# rpm -ivh <storcli-x.xx-x.noarch.rpm>"

By default, the StorCLI tool will be installed in the /opt/MegaRAID/storcli location

Microsoft:

  1. Unzip the storcli tool package.
  2. Copy the binary file in the directory from which you want to run StorCLI

NOTE:

The StorCLI tools must be run with the administrator privileges.

Vmware:

  1. Unzip the storcli tool package and copy the VIB to the ESXi server.
  2. Run the following command from the shell (full path to the VIB must be specified):
# esxcli software vib install -v=/tmp/{VIBFILE} --no-sig-check

NOTE:

If secure boot is enabled on ESXi, please install the signed version

TIPS [TT1165] Signed version of STORCLI for ESXi is available

三、StorCLI Tool Command Syntax

Identifier Description
/cx Controller x
/call Sending the command to all controllers
/cx/vx A virtual drive x on controller x
/cx/vall All virtual drives on controller x
/cx/ex An enclosure x on controller x
/cx/eall All enclosures on controller x
/cx/fall All foreign configurations on controller x
/cx/lnx The lane speed x on controller x
/cx/ex/sx The drive is slot x on enclosure x on controller x
/cx/sx Represents the drives that are directly attached to controller x
/call/sall Represents all the drives that are directly attached to all controllers
/cx/ex/sall All the drives on enclosure x on controller x
/cx/dx The drive group x on enclosure x on controller x
/cx/dall All drive groups on enclosure x on controller x
/cx/px Phy operation x on controller x
/cx/pall All phy operations on controller x
/cx/bbu A BBU on controller x
/cx/cv A Cache-vault on controller x

四、StorCLI Controller Commands

4.1. View help pages

# storcli64 [verbose] -h| -help| ?

4.2. System commands

show a summary of controller and controller-associated information for the system:

# storcli64 show

View detailed RAID controller card information:

# storcli64 show all

This command shows help for all commands at the system level.

# storcli64 show help

4.3. Controller Commands

This command shows the current value of the specified property on the specified controller

# storcli64 /cx show <property>

4.4. Physical Drive

View drive in slot 15 of controller 0 on the backplane 134

# storcli64 /c0/e134/s15 show

View information about all backplanes of controller 0 and drives on the backplane

# storcli64 /c0/eall/sall show

View details about all drives on all backplanes of 0 controllers

# storcli64 /c0/eall/sall show all

Check the drive health status from the output

4.4.1. Setting drive state

Set the drive status of controller 0, backplane 134, slot number 15 to ugood

# storcli64 /c0/e134/s15 set good

Set the drive status of controller 0, backplane 134, slot number 15 to offline

# storcli64 /c0/e134/s15 set offline

Set the drive status of controller 0, backplane 134, slot number 15 to online

# storcli64 /c0/e134/s15 set online

Set the drive status of controller 0, backplane 134, slot number 15 to JBOD

# storcli64 /c0/e134/s15 set jbod

Set the drive status of controller 0, backplane 134, slot number 15 marks as missing

# storcli64 /c0/e134/s15 set missing

Set the drive status of controller 0, backplane 134, slot number 15 as a boot drive.

# storcli64 /c0/e134/s15 set bootdrive=on

4.4.2. Drive Initialization Commands

When you initialize drives, all the data from the drives is cleared. The StorCLI utility supports the following commands to initialize drives:

# storcli64 /cx/ex/sx show initialization
# storcli64 /cx/ex/sx start initialization
# storcli64 /cx/ex]sx stop initialization

4.4.3. Drive locate commands

Locate drive and activate the drive’s LED.

# storcli64 /cx/ex/sx start locate

stop a locate operation and deactivates the drive’s LED

# storcli64 /cx/ex/sx stop locate

五、Virtual Drive Commands

5.1. Create VD commands

The StorCLI utility supports the following commands to add virtual drives:

storcli64 /cx add vd raid[0|1|5|6|00|10|50|60][Size=,,..|remaining] [name=<VDNAME1>,..] drives=e:s|e:s-x,y,e:s-x,y,z [PDperArray=x][SED] [pdcache=on|off|default][pi] [DimmerSwitch(ds)=default|automatic(auto)| none|maximum(max)|MaximumWithoutCaching(maxnocache)] [wt|wb|awb] [nora|ra] [direct|cached][cachevd] [Strip=<8|16|32|64|128|256|1024>] [AfterVd=X][EmulationType=0|1|2] [Spares = [e:]s|[e:]s-x|[e:]s-x,y] [force][ExclusiveAccess][Cbsize=0|1 Cbmode=0|1|7]

Example:

# storcli64 /c0 add vd raid5 size=all name=VD01 drives=134:5-7,134:9 wb ra cached strip=256
Option Value Range Description
raid [0|1|5|6|00|10|50|60] Sets the RAID type of the configuration.
size Maximum size based on the physical drives and RAID level. Sets the size of each virtual drive. The default value is for the capacity of all referenced disks.
name 15 characters in length Specifies the name for each virtual drive.
drives e:s|e:s-x|e:s-x,y • e specifies the enclosure ID.
• s represents the slot in the enclosure.
• e:s-x is the range convention used to represent slots s to x in the enclosure e (250 characters maximum).
direct|cached cached : Cached I/O. direct : Direct I/O. Sets the logical drive cache policy. Direct I/O is the default.
wt|wb|awb wt : Write through. wb : Write back. awb : Always Write Back. Enables write through. Write back is the default.
nora|ra ra : Read ahead. nora : No read ahead. Disables read ahead. Enabled is the default.
strip 8 , 16 , 32 , 64 , 128 , 256 , 512 , 1024 Sets the strip size for the RAID configuration.

5.2. Delete VD Commands

This command deletes a particular virtual drive

# storcli64 /cx/vx|vall del

This command deletes the virtual drive where the operating system is present. Data located on these drives and the operating system of the drive will no longer be accessible.

# storcli64 /cx/vx|vall del force

5.3. Hot Spare Drive Commands

This command creates a hot spare drive:

# storcli64 /cx[/ex]/sx add hotsparedrive {dgs=<n|0,1,2...>}[enclaffinity]
Option Value Range Description
dgs Valid drive group number Specifies the drive group to which the hot spare drive is dedicated.
enclaffinity Valid enclosure number Specifies the enclosure with which the hot spare is associated. If this option is specified, affinity is set. If this option is not specified, there is no affinity. Affinity cannot be removed after it is set for a hot spare drive.

Example:

This command sets the drives /c0/e134/s4,5 as global hot spare.

# storcli64 /c0/e134/s4,5 add hotsparedrive

This command deletes a hot spare drive.

# storcli64 /cx/[ex]/sx delete hotsparedrive

5.4. Change VD Properties Commands

This command sets the I/O policy on a virtual drive to cached I/O or direct I/O.

# storcli64 /cx/vx set iopolicy=<cached|direct>

This command sets the current disk cache policy on a virtual drive to on, off, or default setting.

# storcli64 /cx/vx set pdcache=<on|off|default>

This command sets the read cache policy on a virtual drive to read ahead or no read ahead.

# storcli64 /cx/vx set rdcache=<ra|nora>

This command sets the write cache policy on a virtual drive to write back, write through, or always write back.

# storcli64 /cx/vx set wrcache=<wt|wb|awb>

5.5. VD Initialization Commands

This command shows the initialization progress of a virtual drive in percentage.

# storcli64 /cx/vx show init

This command starts the initialization of a virtual drive. The default initialization type is fast initialization. If the full option is specified, full initialization of the virtual drive starts.

# storcli64 /cx/vx start init full

This command stops the initialization of a virtual drive. A stopped initialization cannot be resumed.

# storcli64 /cx/vx stop init

5.6. Consistency Check

This command shows the consistency check schedule properties for a controller

# storcli64 /c0 show cc

This command schedules a consistency check (CC) operation. You can use the following options with the consistency check command.

# storcli64 /cx set consistencycheck|cc=[off|seq|conc][delay=] starttime=<yyyy/mm/dd hh> [excludevd=x-y,z]

Example:

# storcli64 /c0 set CC=on starttime=2012/02/21 00

This command checks the status of a consistency check operation. The CC rate appears in percentage.

# storcli64 /cx show ccrate

5.7. Patrol Read

This command resumes a suspended patrol read operation.

# storcli64 /cx resume patrolread

This command turns the patrol read scheduling on and sets the mode of the patrol read to automatic or manual.

# storcli64 /cx set patrolread =[on [mode=[auto|manual]]]|[off]

This command schedules a patrol read operation. You can use the following options for patrol read command operations.

# storcli64 /cx set patrolread [starttime=<yyyy/mm/dd hh>] [maxconcurrentpd=<value>] [includessds=<on|onlymixed|off>] [uncfgareas=[on|off] [excludevd=x,y,z|none] [delay=<value>]]

Example:

# storcli64 /c0 set patrolread=on starttime=2012/02/21 00

This command delays the scheduled patrol read in hours.

# storcli64 /c0 set patrolread delay=30

This command shows the current state of the patrol read operation along with other details

# storcli64 /cx show patrolread

This command starts the patrol read operation. This command starts a patrol read operation immediately.

# storcli64 /cx start patrolread

This command stops a running patrol read operation.

# storcli64 /cx stop patrolread

This command pauses a running patrol read operation.

# storcli64 /cx pause patrolread

六、Collect RAID log

Command Description
storcli64 /cx show all This command shows the list of controllers and controller-associated information, information about the drives that need attention, and advanced software options.
storcli64 /cx show events file=mr_eventsx.log This command prints the system log to a text file and saves the file in the specified location.
storcli64 /cx show termlog This command shows the firmware logs.
storcli64 /cx/bbu show all This command shows all the information of the BBU(battery backup unit)
storcli64 /cx/cv show all This command shows the status of the SuperCap or CVPM for all the virtual drives in the controller
storcli64 /cx/dall show all This command shows the topology information of the drive group
storcli64 /cx/eall show all This command shows the enclosure information
storcli64 /cx/eall/sall show all This command shows the summary information for all the enclosures and physical drives connected to the controller
storcli64 /cx/vall show all This command shows the virtual drive information for all the virtual drives in the controller
storcli64 /cx get snapdump ID=all This command is to download all SnapDump IDs that are present on the controller, use the all option.
storcli64 /cx get snapdump This command is to generate and download all SnapDump data
storcli64 /cx show alilog logfile = alilog.txt This command gets the controller property, TTY logs, and events to the specified file.

文章作者: kclouder
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 kclouder !
  目录