安装HP Array Configuration Utility CLI

hpacucli的命令格式如下

<target> <command> [parameter=value]

例:1.查看工作
=> ctrl slot=0 logicaldrive all show  //slot 0下所有的逻辑盘

Smart Array P410i in Slot 0 (Embedded)

   array A

      logicaldrive 1 (558.7 GB, RAID 1+0, OK)


=> ctrl slot=0 physicaldrive all show  //slot 0下所有的物理磁盘

Smart Array P410i in Slot 0 (Embedded)

   array A

      physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 300 GB, OK)
      physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 300 GB, OK)
      physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 300 GB, OK)
      physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 300 GB, OK)


=> ctrl slot=0 pd all show        //hpacucli支持缩写,pd= physicaldrive 

Smart Array P410i in Slot 0 (Embedded)

   array A

      physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 300 GB, OK)
      physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 300 GB, OK)
      physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 300 GB, OK)
      physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 300 GB, OK)


=> help shorthand                //缩写列表

   Shorthand symbols can be used wherever regular target and command keywords
   are used in order to save keystrokes.
  
Examples:
   aa   = arrayaccelerator
   ai   = adapterid
   all  = allunassigned
   ca   = caching
   ch   = chassisname (a.k.a. boxname or raidarrayid)
   chs  = chassisslot
   cm   = configurationmode
   cn   = connectionname
   cp   = ctrlpath
   cr   = cacheratio
   cs   = consolidatespace
   csn  = chassisserialnumber
   ctrl = controller
   dpo  = degradedperformanceoptimization
   dwc  = drivewritecache
   dt   = drivetype
   enc  = enclosure
   ep   = expandpriority
   es   = elevatorsort
   irp  = inconsistencyrepairpolicy
   ld   = logicaldrive
   lk   = licensekey
   mnpd = mnpdelay
   nbwc = nobatterywritecache
   pd   = physicaldrive
   pim  = parityinitializaitonmethod
   ppm  = preferredpathmode
   ppto = postprompttimeout
   ps   = parallelscsi
   qd   = queuedepth
   r1wb = raid1writebuffering
   rp   = rebuildpriority
   rc   = redundantcontroller
   saen = surfaceanalysiseventnotify
   sam  = spareactivationmode
   sp   = surfacescanpriority
   ssd  = surfacescandelay
   ssdpd  = ssdphysicaldrive
   ssm  = surfacescanmode
   sss  = surfacescanschedule
   sn   = serialnumber
   ss   = stripsize
   td   = tapedrive
   wfcr = waitforcacheroom
   eoe  = exitonerror


=> ctrl slot=0 show    //raid卡信息

Smart Array P410i in Slot 0 (Embedded)
   Bus Interface: PCI
   Slot: 0
   Serial Number: 50014380211xxxx
   Cache Serial Number: PBCDH0CRHxxxx
   RAID 6 (ADG) Status: Disabled
   Controller Status: OK
   Hardware Revision: C
   Firmware Version: 5.70
   Rebuild Priority: Medium
   Expand Priority: Medium
   Surface Scan Delay: 15 secs
   Surface Scan Mode: Idle
   Queue Depth: Automatic
   Monitor and Performance Delay: 60  min
   Elevator Sort: Enabled
   Degraded Performance Optimization: Disabled
   Inconsistency Repair Policy: Disabled
   Wait for Cache Room: Disabled
   Surface Analysis Inconsistency Notification: Disabled
   Post Prompt Timeout: 0 secs
   Cache Board Present: True
   Cache Status: OK
   Cache Ratio: 25% Read / 75% Write
   Drive Write Cache: Disabled
   Total Cache Size: 512 MB
   Total Cache Memory Available: 400 MB
   No-Battery Write Cache: Disabled
   Cache Backup Power Source: Capacitors
   Battery/Capacitor Count: 1
   Battery/Capacitor Status: OK
   SATA NCQ Supported: True

 

2.维护工作

Create logicdrive    //创建raid逻辑盘

Example commands:
ctrl slot=5 create type=ld drives=1:0,1:1,1:3 raid=adg
ctrl slot=5 create type=ld drives=1:1-1:3 raid=adg
ctrl slot=5 create type=ld drives=1:7,1:10-2:5,2:8-2:12 raid=adg
ctrl slot=5 array A create type=ld size=330 raid=adg


Expanding an array   //扩充
Syntax:
<target> add drives=[#:]#:#,[#:]#:#,[#:]#:#–[#:]#:#,...|allunassigned[forced]

Example commands:
=> ctrl slot=3 array A add drives=1:0,1:1
=> ctrl slot=4 ld 1 add drives=allunassigned
=> ctrl slot=5 array A add drives=1:1–1:5


Shrinking an array  //缩减
Syntax:
<target> remove drives=[#:]#:#-[#:]#:#
Example commands:
=> array a remove drives=1e:1:12-1e:1:14
=> array b remove drives=1c:1:6-1c:1:7


Enabling or disabling the drive cache   //打开/关闭cache功能

Syntax:
<target> modify drivewritecache=enable|disable|? [forced]
where <target> is a controller that supports drive write cache.
Example command:
=> ctrl slot=5 modify dwc=enable