欧卡2中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

需要三步,才能开始

只需两步,慢速开始

玩欧卡就用莱仕达V99方向盘欧卡2入门方向盘选莱仕达V9莱仕达折叠便携游戏方向盘支架欢迎地图Mod入驻
查看: 5787|回复: 2
收起左侧

[系统维护] hpacucli命令

[复制链接]
oppo 发表于 2014-8-11 16:40 | 显示全部楼层 |阅读模式
本帖最后由 oppo 于 2014-8-11 16:41 编辑

下载hpacucli http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?swItem=MTX-66b08e49c28f4bd49f4641ed80

1、常规检查

[root@local /root]# hpacucli ctrl slot=0 show config detail #查看slot 0阵列信息详细状态
[root@local /root]# hpacucli ctrl all show #查看所有控制器状态
Smart Array 5i in Slot 0 ()
[root@local /root]# hpacucli ctrl slot=0 array all show #查看slot 0 所有阵列信息
Smart Array 5i in Slot 0
   array A (Parallel SCSI, Unused Space: 0 MB)
   array B (Parallel SCSI, Unused Space: ??? MB)
   array C (Parallel SCSI, Unused Space: 0 MB)
[root@local /root]# hpacucli ctrl slot=0 array B ld all show #查看slot 0 阵列B 所有逻辑驱动器信息
Smart Array 5i in Slot 0
   array B (Failed)
     logicaldrive 2 (135 GB, RAID 0, Failed)
[root@local /root]# hpacucli ctrl slot=0 array B pd all show #查看slot 0 阵列B 所有物理驱动器信息
Smart Array 5i in Slot 0
   array B (Failed)
     physicaldrive 2:1 (port 2:id 1 , Parallel SCSI, 72.8 GB, OK)
     physicaldrive 2:6 (port 2:id 6 , Parallel SCSI, 0 Byte, Failed)
[root@local /root]# hpacucli ctrl slot=0 array B pd all show status #查看slot 0 阵列B 所有物理驱动器状态
physicaldrive 2:1 (port 2:id 1, 72.8 GB): OK physicaldrive 2:6 (port 2:id 6, 0 Byte): Failed
[root@local /root]# hpacucli ctrl slot=0 array C pd all show #查看slot 0 阵列C 所有物理驱动器信息 Smart Array 5i in Slot 0
   array C physicaldrive 2:3 (port 2:id 3 , Parallel SCSI, 72.8 GB, OK)
     physicaldrive 2:4 (port 2:id 4 , Parallel SCSI, 72.8 GB, OK)

2、如何查看RAID信息?

[root@local /root]# hpacucli ctrl slot=0 ld all show #查看slot 0所有逻辑驱动器信息 (可以检查raid信息和raid重建过程百分比) Smart Array 5i in Slot 0 array A logicaldrive 1 (33.9 GB, RAID 0, OK) array B logicaldrive 2 (203.5 GB, RAID 5, Recovering 45.0% complete) [root@local /root]# hpacucli ctrl slot=0 pd all show #查看slot 0所有物理驱动器信息 (可以检查物理磁盘信息和raid重建信息) Smart Array 5i in Slot 0 array A physicaldrive 2:0 (port 2:id 0 , Parallel SCSI, 36.4 GB, OK) array B physicaldrive 2:1 (port 2:id 1 , Parallel SCSI, 72.8 GB, OK) physicaldrive 2:2 (port 2:id 2 , Parallel SCSI, 72.8 GB, Rebuilding) physicaldrive 2:3 (port 2:id 3 , Parallel SCSI, 72.8 GB, OK) physicaldrive 2:4 (port 2:id 4 , Parallel SCSI, 72.8 GB, OK)
3、查看条带大小

# hpacucli ctrl slot=5 array B ld 2 show Smart Array P800 in Slot 5 array B Logical Drive: 2 Size: 4.1 TB Fault Tolerance: RAID 5 Heads: 255 Sectors Per Track: 32 Cylinders: 65535 Stripe Size: 256 KB Status: OK Array Accelerator: Enabled Parity Initialization Status: In Progress Unique Identifier: 600508B100104D3953574F30474B0008 Disk Name: c0d1 Mount Points: None
4、在线修改阵列卡读写缓存比例

hpacucli controller slot=0 modify cacheratio=25/75 注:更改盘柜控制器使用chassisserialnumber=控制器SN 来替换slot=0; 30/70为读写比例,可以多种选择具体看阵列卡的种类而定。
5、在线修改阵列热备盘

hpacucli ctrl slot=0 array A modify spares=2I:1:6
6、在线删除阵列热备盘

hpacucli ctrl slot=0 Array A remove spares=2I:1:6
7、在线删除/创建raid阵列
删除阵列

# 强制删除阵列 B /usr/sbin/hpacucli ctrl slot=0 array B delete forced #or 强制删除逻辑磁盘2 /usr/sbin/hpacucli ctrl slot=0 logicaldrive 2 delete forced
在线更改条带大小

ctrl slot=5 ld 2 modify raid=5 stripesize=128
创建阵列

#用3,4,5,6号盘创建一个raid1+0阵列 /usr/sbin/hpacucli ctrl slot=0 create type=ld drives=1I:1:3,1I:1:4,2I:1:5,2I:1:6 raid=1+0 #or 用3,4,5号盘创建一个raid5阵列 /usr/sbin/hpacucli ctrl slot=0 create type=ld drives=1I:1:3,1I:1:4,2I:1:5 raid=5
 楼主| oppo 发表于 2014-8-11 16:43 | 显示全部楼层
在线做raid

[root@server-67 ~]# hpacu
hpacucli        hpacuscripting
[root@server-67 ~]# hpacu
hpacucli        hpacuscripting
[root@server-67 ~]# hpacucli ctrl slot=0 all show

Error: Invalid target syntax. "all" is not a valid target. Type "help" for more
       details.

[root@server-67 ~]# hpacucli ctrl slot=0 all show detail

Error: Invalid target syntax. "all" is not a valid target. Type "help" for more
       details.

[root@server-67 ~]# hpacucli ctrl slot=0 ld show all

Error: Syntax error at "all"

[root@server-67 ~]# hpacucli ctrl slot=0 ld all show

FIRMWARE UPGRADE REQUIRED: A firmware update is recommended for this controller
                           to prevent rare potential data write errors on a
                           RAID 1 or RAID 1+0 volume in a scenario of
                           concurrent background surface analysis and I/O write
                           operations.  Please refer to Customer Advisory
                           c01587778 which can be found at hp.com.


Smart Array E200i in Slot 0 (Embedded)

   array A

      logicaldrive 1 (136.7 GB, RAID 0, OK)

   array B

      logicaldrive 2 (136.7 GB, RAID 0, OK)

   array C

      logicaldrive 3 (136.7 GB, RAID 0, Failed)

   array D

      logicaldrive 4 (136.7 GB, RAID 0, OK)

[root@server-67 ~]# hpacucli ctrl slot=0 pd all show

FIRMWARE UPGRADE REQUIRED: A firmware update is recommended for this controller
                           to prevent rare potential data write errors on a
                           RAID 1 or RAID 1+0 volume in a scenario of
                           concurrent background surface analysis and I/O write
                           operations.  Please refer to Customer Advisory
                           c01587778 which can be found at hp.com.


Smart Array E200i in Slot 0 (Embedded)

   array A

      physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 146 GB, OK)

   array B

      physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 146 GB, OK)

   array C

      physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 146.8 GB, Predictive Failure)

   array D

      physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 146 GB, OK)

[root@server-67 ~]# hpacucli ctrl slot=0 create type=ld drives=1I:1:3 raid=0

FIRMWARE UPGRADE REQUIRED: A firmware update is recommended for this controller
                           to prevent rare potential data write errors on a
                           RAID 1 or RAID 1+0 volume in a scenario of
                           concurrent background surface analysis and I/O write
                           operations.  Please refer to Customer Advisory
                           c01587778 which can be found at hp.com.


Error: This operation is not supported with the current configuration. Use the
       "show" command on devices to show additional details about the
       configuration.
Reason: Space for creation not available

[root@server-67 ~]# hpacucli ctrl slot=0 array C delete forced

FIRMWARE UPGRADE REQUIRED: A firmware update is recommended for this controller
                           to prevent rare potential data write errors on a
                           RAID 1 or RAID 1+0 volume in a scenario of
                           concurrent background surface analysis and I/O write
                           operations.  Please refer to Customer Advisory
                           c01587778 which can be found at hp.com.


Warning: Deleting an array can cause other array letters to become renamed.
         E.g. Deleting array A from arrays A,B,C will result in two remaining
         arrays A,B ... not B,C

[root@server-67 ~]# hpacucli ctrl slot=0 pd all show

FIRMWARE UPGRADE REQUIRED: A firmware update is recommended for this controller
                           to prevent rare potential data write errors on a
                           RAID 1 or RAID 1+0 volume in a scenario of
                           concurrent background surface analysis and I/O write
                           operations.  Please refer to Customer Advisory
                           c01587778 which can be found at hp.com.


Smart Array E200i in Slot 0 (Embedded)

   array A

      physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 146 GB, OK)

   array B

      physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 146 GB, OK)

   array C

      physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 146 GB, OK)

   unassigned

      physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 146.8 GB, Predictive Failure)

[root@server-67 ~]# hpacucli ctrl slot=0 create type=ld drives=1I:1:3 raid=0

FIRMWARE UPGRADE REQUIRED: A firmware update is recommended for this controller
                           to prevent rare potential data write errors on a
                           RAID 1 or RAID 1+0 volume in a scenario of
                           concurrent background surface analysis and I/O write
                           operations.  Please refer to Customer Advisory
                           c01587778 which can be found at hp.com.


Warning: Creation of this logical drive has caused array letters to become
         renamed.

[root@server-67 ~]# hpacucli ctrl slot=0 pd all show

FIRMWARE UPGRADE REQUIRED: A firmware update is recommended for this controller
                           to prevent rare potential data write errors on a
                           RAID 1 or RAID 1+0 volume in a scenario of
                           concurrent background surface analysis and I/O write
                           operations.  Please refer to Customer Advisory
                           c01587778 which can be found at hp.com.


Smart Array E200i in Slot 0 (Embedded)

   array A

      physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 146 GB, OK)

   array B

      physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 146 GB, OK)

   array C

      physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 146.8 GB, Predictive Failure)

   array D

      physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 146 GB, OK)

[root@server-67 ~]# hpacucli ctrl slot=0 ld all show

FIRMWARE UPGRADE REQUIRED: A firmware update is recommended for this controller
                           to prevent rare potential data write errors on a
                           RAID 1 or RAID 1+0 volume in a scenario of
                           concurrent background surface analysis and I/O write
                           operations.  Please refer to Customer Advisory
                           c01587778 which can be found at hp.com.


Smart Array E200i in Slot 0 (Embedded)

   array A

      logicaldrive 1 (136.7 GB, RAID 0, OK)

   array B

      logicaldrive 2 (136.7 GB, RAID 0, OK)

   array C

      logicaldrive 3 (136.7 GB, RAID 0, OK)

   array D

      logicaldrive 4 (136.7 GB, RAID 0, OK)

[root@server-67 ~]# vim /etc/fstab
[root@server-67 ~]# mount -a
mount: special device LABEL=/data2 does not exist
[root@server-67 ~]# blkid


hpacucli ctrl slot=0 all show
  275  hpacucli ctrl slot=0 all show detail
  276  hpacucli ctrl slot=0 ld show all
  277  hpacucli ctrl slot=0 ld all show
  278  hpacucli ctrl slot=0 pd all show
  279  hpacucli ctrl slot=0 create type=ld drives=1I:1:3 raid=0
  280  hpacucli ctrl slot=0 array C delete forced
  281  hpacucli ctrl slot=0 pd all show
  282  hpacucli ctrl slot=0 create type=ld drives=1I:1:3 raid=0
  283  hpacucli ctrl slot=0 pd all show
  284  hpacucli ctrl slot=0 ld all show
  285  vim /etc/fstab
  286  mount -a
  287  blkid
  288  parted -l
  289  parted -s /dev/cciss/c0d2 mkpart primary ext3 0 100%
  290  fdisk -help
  291  fdisk -h
  292  fdisk --h
  293  fdisk /dev/cciss/c0d2
  294  mkfs.ext3 /dev/cciss/c0d2p1
  295  df -h
  296  blkid
  297  vim /etc/fstab
  298  tune2fs -L /data2 /dev/cciss/c0d2p1
  299  mount -a
  300  df -TH
  301  df -h
  302  history
 楼主| oppo 发表于 2014-8-12 11:28 | 显示全部楼层
aass
回复 打印

使用道具 举报

联系我们|手机版|欧卡2中国 ( 湘ICP备11020288号-1 )

GMT+8, 2024-12-28 21:20 , Processed in 0.039000 second(s), 7 queries , Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表