1. 下载RAID工具hpacucli

wget http://115.182.51.13:8080/zabbix/hpacucli-9.30-15.0.x86_64.rpm

2. 安装hpacucli

rpm -ivh hpacucli-9.30-15.0.x86_64.rpm

3. hpacucli命令集

【查看】

hpacucli ctrl all show                                            //所有外插阵列卡

hpacucli ctrl all show config detail                       //所有RAID配置信息

hpacucli ctrl slot=2 show config detail               //slot2 详细RAID配置信息

hpacucli  ctrl slot=2 pd all show                     //slot2 阵列卡连接的物理磁盘(slot2即PCI 2槽位)

hpacucli ctrl slot=2 ld all show                     //slot2 阵列卡配置的逻辑盘

【创建】

Hpacucli ctrl slot=2 create type=ld drives=2I:1:1-2I:1:11 raid=5 stripesize=1024 size=5120                        //11块磁盘创建RAID5

详解:

Slot=2           外插PCI 2槽位的阵列卡

Type=ld         创建的阵列类型为逻辑卷

Stripesize=1024            设置块大小为1M(默认单位为KB)

Drives=2I:1:1-2I:1:11      选择从bay1至bay11磁盘(此处为磁盘编号标识,磁盘区间表示用 – 连接 ;300G系统盘插在服务器后端,默认为bay13)

Size=5120                    分出了5G的分区(默认单位为MB)

 HP服务器RAID配置(系统环境下) _管理卡

【删除】

hpacucli ctrl slot=2 array B delete forced                        //删除阵列组B  (forced为加强制)

【扩展】

hpacucli ctrl slot=2 array B add drives=2I:1:12             //把磁盘2I:1:12加入到阵列组B中,以扩展B阵列组磁盘空间

【修改-阵列信息】

hpacucli ctrl slot=3 modify drivewritecache=enable                         //开启物理磁盘写缓存策略

hpacucli controller slot=5 modify nobatterywritecache=enable        //在没有电池的情况下开启RAID写缓存

hpacucli ctrl slot=1 modify cacheratio=25/75                              //设定cache读写比率

【热备盘-操作】

hpacucli ctrl slot=2 array B add spares=2I:1:12                 //给阵列组B添加热备盘(全局可改B为all)

hpacucli ctrl slot=2  array  B  remove spares=2I:1:12       //从阵列组B中踢出热备盘


4. RAID5+1配置实例:

  1. hpacucli ctrl slot=2 create type=ld drives=2I:1:1-2I:1:11 raid=5 stripesize=1024          // 把磁盘1-11创建成RAID5逻辑磁盘阵列,块大小为1M

  2. hpacucli ctrl slot=2 array B add spares=2I:1:12                                                      //  把磁盘12添加到阵列组B中作为热备


备注:

Ctrl  全称 controller

Pd   全称 physicaldrive

Ld   全称 logicaldrive