下载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