Linux HP Smart Array Raid Controller
A client has a machine in a DC that has a raid controller and 4 hdd’s set to raid 10, that’s all I was told. I wanted to keep an eye on the hdds, so I needed to install a utility that can monitor and interact with the raid controller. In my case I have the hp smart array raid controller as you will see in just a bit, you may have a different controller from this one by a different manufacturer, or it may require a different version of the software tool from HP, please check on the HP site linked below before continuing on. There is a chance of serious data loss if you don’t follow common sense practices and MAKE BACKUPS. I needed to do a few things, find out which controller is it, find latest of control utility for it, install said utility and then check on the drives. that isnt always easy, sadly.
First we check who makes this system. dmidecode | grep -A3 '^System Information' Sample result:
System Information
Manufacturer: HP
Product Name: ProLiant DL160 G6
Version:
Second we check lspci to see what controller we have installed. lspci -k|grep -i -A2 raid Sample Result :
04:00.0 RAID bus controller: Hewlett-Packard Company Smart Array G6 controllers (rev 01)
Subsystem: Hewlett-Packard Company Smart Array P410
Kernel driver in use: hpsa
Now we know we have a HP machine, DL160 G6 to be exact in this case, and the exact rev of the card itself. We need to install the HP provided software for it. The official HP software page for the information below is here. However as its laid out, best of luck getting up and running quickly if you follow that page.
You can install package with this link
http://h20564.www2.hpe.com/hpsc/swd/public/detail?swItemId=MTX_b6a6acb9762443b182280db805(HP Smart Storage Administrator (HP SSA) CLI for Linux 64-bit)
Now you have the tools needed for the job! so run the utility
hpssacli
sample result:
HP Smart Storage Administrator CLI 2.10.14.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 configSmart Array P410 in Slot 4 (sn: PACCRID12290K57)
Internal Drive Cage at Port 1I, Box 1, OK
array A (SATA, Unused Space: 0 MB)
logicaldrive 1 (1.8 TB, RAID 1+0, OK)physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SATA, 1 TB, OK)
physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SATA, 1 TB, OK)
physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SATA, 1 TB, OK)
physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SATA, 1 TB, OK)SEP (Vendor ID PMCSIERA, Model SRC 8x6G) 250 (WWID: 5001438021BEED2F)
Show Status:
=> ctrl all show statusSmart Array P410 in Slot 4
Controller Status: OK
Cache Status: OK
View drive status (change slot # to thew one from show status command above):
=> ctrl slot=4 pd all show statusphysicaldrive 1I:1:1 (port 1I:box 1:bay 1, 1 TB): OK
physicaldrive 1I:1:2 (port 1I:box 1:bay 2, 1 TB): OK
physicaldrive 1I:1:3 (port 1I:box 1:bay 3, 1 TB): OK
physicaldrive 1I:1:4 (port 1I:box 1:bay 4, 1 TB): OK
If you get an error like the following you are using the wrong slot number, just run ctrl all show status and use the proper slot number:
ctrl slot=0 pd all show statusError: The controller identified by “slot=0” was not detected.
View each individual drive and its info :
ctrl slot=4 pd 1I:1:4 show detailSmart Array P410 in Slot 4array Aphysicaldrive 1I:1:4
Port: 1I
Box: 1
Bay: 4
Status: OK
Drive Type: Data Drive
Interface Type: SATA
Size: 1 TB
Native Block Size: 512
Rotational Speed: 7200
Firmware Revision: HPG2
Serial Number: Z1N3S3ZS
Model: ATA MB1000CBZQE
SATA NCQ Capable: True
SATA NCQ Enabled: True
Current Temperature (C): 28
Maximum Temperature (C): 51
PHY Count: 1
PHY Transfer Rate: 1.5Gbps
Show all logical drives:
ctrl slot=4 ld all showSmart Array P410 in Slot 4array Alogicaldrive 1 (1.8 TB, RAID 1+0, OK)
Nhận xét
Đăng nhận xét