惠普服务器硬盘监控不能使用megacli工具,需要用hp提供的阵列管理工具hpssacli。下面以我centos 7.6的系统为例,介绍如何安装hpssacli和简单的几个使用命令。
安装
添加源文件 /etc/yum.repos.d/hp.repo
[HP-spp] name=HP Service Pack for ProLiant baseurl=http://downloads.linux.hpe.com/SDR/repo/spp/RHEL/7.6/x86_64/current/ enabled=1 gpgcheck=0 gpgkey=file:///etc/pki/rpm-gpg/GPG-KEY-ssp [HP-mcp] name=HP Management Component Pack for ProLiant baseurl=http://downloads.linux.hpe.com/SDR/repo/mcp/centos/7.6/x86_64/current/ enabled=1 gpgcheck=0 gpgkey=file:///etc/pki/rpm-gpg/GPG-KEY-mcp
运行命令安装
yum install hpssacli
或者直接下载安装包:
http://downloads.linux.hpe.com/SDR/repo/spp/RHEL/7.6/x86_64/current/hpssacli-2.40-13.0.x86_64.rpm
使用
查看raid卡信息(包括控制器状态、Cache状态、电池状态) # hpssacli ctrl all show status 查看raid详细信息 # hpssacli ctrl slot=0 show config detail 查看raid状态 # hpssacli ctrl slot=0 ld all show 查看slot 0 阵列A 所有逻辑驱动器信息 # hpssacli ctrl slot=0 array A ld all show 查看slot 0 阵列A 所有物理驱动器信息 # hpssacli ctrl slot=0 array A pd all show 查看硬盘 # hpssacli ctrl slot=0 pd all show status //查看物理硬盘状态 # hpssacli ctrl slot=0 pd all show //查看物理硬盘 创建raid10 # hpssacli ctrl slot=0 create type=ld drives=1I:1:3,1I:1:4,2I:1:5,2I:1:6 raid=1+0 用3,4,5号盘创建一个raid5阵列 # hpssacli ctrl slot=0 create type=ld drives=1I:1:3,1I:1:4,2I:1:5 raid=5 创建raid1 # hpssacli ctrl slot=1 create type=ld drives=1I:1:1-1I:1:2 raid=1 删除raid # hpssacli ctrl slot=1 array B delete forced 缓存: 查看cache信息: # hpssacli ctrl all show config detail | grep -i cache 关闭物理磁盘cache # hpssacli ctrl slot=0 modify drivewritecache=disable 打开逻辑磁盘缓存 # hpssacli ctrl slot=0 logicaldrive 2 modify caching=enable 在没有电池的情况下开启raid写缓存 # hpssacli ctrl slot=0 modify nobatterywritecache=enable 设置读写百分比 # hpssacli ctrl slot=0 modify cacheratio=10/90 指示灯: 打开array B磁盘的led灯 # hpssacli ctrl slot=0 array B modify led=on 打开3号磁盘的led灯 # hpssacli ctrl slot=0 pd 1I:1:3 modify led=on
参考:https://forums.centos.org/viewtopic.php?t=55506