你可以使用 ssacli (smart storage administrator command line interface) 工具来管理你的HP的阵列卡
安装
添加 HP的 MCP repository
To add HP’s MCP repository to apt sources list use this command:
1
|
echo "deb http://downloads.linux.hpe.com/SDR/repo/mcp stretch/current non-free" > /etc/apt/sources.list.d/hp-mcp.list
|
下载 MCP repository 的公钥
1
2
3
4
|
wget -q -O - http://downloads.linux.hpe.com/SDR/hpPublicKey1024.pub | apt-key add -
wget -q -O - http://downloads.linux.hpe.com/SDR/hpPublicKey2048.pub | apt-key add -
wget -q -O - http://downloads.linux.hpe.com/SDR/hpPublicKey2048_key1.pub | apt-key add -
wget -q -O - http://downloads.linux.hpe.com/SDR/hpePublicKey2048_key1.pub | apt-key add -
|
安装 ssacli 包
1
2
|
apt update
apt install ssacli
|
使用 ssacli 工具
缩写
1
2
3
4
5
6
|
chassisname = ch
controller = ctrl
logicaldrive = ld
physicaldrive = pd
drivewritecache = dwc
licensekey = lk
|
常用命令
显示阵列卡详细信息
1
|
ssacli ctrl all show detail
|
显示阵列卡配置
1
|
ssacli ctrl all show config
|
显示所有物理磁盘信息
1
|
ssacli ctrl slot=0 pd all show detail
|
创建RAID 0的逻辑驱动器
1
|
ssacli ctrl slot=0 create type=ld drives=1I:1:1,1I:1:2 raid=0
|
删除逻辑驱动器
1
|
ssacli ctrl slot=0 ld 1 delete
|
增加新的磁盘到逻辑驱动器
1
|
ssacli ctrl slot=0 ld 2 add drives=1I:1:6,1I:1:7
|
删除物理驱动器
1
|
ssacli ctrl slot=0 pd 1I:1:1 modify erase
|
显示阵列卡温度
1
|
ssacli ctrl all show detail | grep 'Controller Temperature'
|
1
|
Controller Temperature (C): 43
|
显示磁盘温度
1
|
ssacli ctrl slot=5 pd all show detail | grep 'Current Temperature'
|
1
2
3
|
Current Temperature (C): 37
Current Temperature (C): 36
Current Temperature (C): 43
|
设置直通
For Smart-array controller starting with P, e.g. P420i:
1
|
ssacli controller slot=0 modify hbamode=on
|
For HBAs starting with H, e.g. H240:
1
|
ssacli controller slot=0 modify raidmode=off
|