2019年9月30日 星期一

在 CentOS 7 安裝 HP 伺服器管理工具

參考
Linux Debian - HP Smart Array Raid Controller
Guide to installing HP System Management Tools CentOS 7

查看伺服器的資訊
# dmidecode | grep -A3 '^System Information'
System Information
        Manufacturer: HP
        Product Name: ProLiant DL380p Gen8
        Version: Not Specified 

1. Adding HP YUM Repositories.
雖然 HP 有提供 script 'add_repo.sh',但它需要 redhat-lsb。不想多裝 package,可以用手動加上。

Simply add a file /etc/yum.repos.d/hp.repo and populate as follows...
CODE: SELECT ALL
[HP-spp]
name=HP Service Pack for ProLiant
baseurl=http://downloads.linux.hpe.com/SDR/repo/spp/RHEL/7.2/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.3/x86_64/current/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/GPG-KEY-mcp
Download copies of the gpg keys from http://downloads.linux.hpe.com/SDR/repo/spp/GPG-KEY-spp and http://downloads.linux.hpe.com/SDR/repo/mcp/GPG-KEY-mcp
Place them in /etc/pki/rpm-gpg/

2. Installing Tools
Now you have the repositories configured simply install the packages using yum.
CODE: SELECT ALL
sudo yum install hp-health hpssacli hp-snmp-agents hpssa hpssacli hp-smh-templates hpsmh hponcfg
This will give you the core set of tools.

然後執行 hpssacli,可以得到下述的結果

HP Smart Storage Administrator CLI 3.10.3.0
    Detecting Controllers…Done.
    Type “help” for a list of supported commands.
    Type “exit” to close the console.
    =>
There are a few commands you can use on this CLI:
Show all config :
=> ctrl all show config
Smart Array P410 in Slot 1                (sn: PTCCRID92560K55)
   Port Name: 1I
   Port Name: 2I
   DL18xG6BP        at Port 1I, Box 1, OK
   Array A (SATA, Unused Space: 0  MB)
      logicaldrive 1 (5.5 TB, RAID 1+0, OK)
      physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SATA HDD, 3 TB, OK)
      physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SATA HDD, 3 TB, OK)
      physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SATA HDD, 3 TB, OK)
      physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SATA HDD, 3 TB, OK)
   Enclosure SEP (Vendor ID HP, Model DL18xG6BP) 248  (WWID: 5001438018357BC3, Port: 1I, Box: 1)
   Expander 250  (WWID: 5001438018357BB0, Port: 1I, Box: 1)
   SEP (Vendor ID PMCSIERA, Model  SRC 8x6G) 249  (WWID: 500143801890BFDF)
=>
Show Status:
=> ctrl all show status
Smart Array P410 in Slot 4
Controller Status: OK
Cache Status: OK
Show all logical drives:
=> ctrl slot=1 ld all show
Smart Array P410 in Slot 1
 Array A
logicaldrive 1 (5.5 TB, RAID 1+0, OK)
We have many other commands to explore.
So, if you want you can explore more possibilities, typing:
ssacli -help

以上就是大致的說明。




沒有留言:

張貼留言

網誌存檔