在Ubuntu 20.04上使用HP陣列卡工具ssacli

你可以使用 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
记录并分享
Built with Hugo
Theme Stack designed by Jimmy