Search This Blog

Wednesday, May 25, 2016

How to check RAID Information in Linux

Have you ever tried to check how the hardware RAID Array configured on server from your Linux Shell? Have you ever wanted to change or modify your Hardware RAID configurations without rebooting the server and without leaving your Linux shell?


hpacucli utility is there to help you, If your server is HP Hardware. hpacucli  (HP Array Configuration Utility CLI) is a command line based disk configuration program for Smart Array Controllers and RAID Array Controllers. You can download and  install hpacucli tool from HP website.

Quick Abbreviations:

chassisname = ch
controller = ctrl
logicaldrive = ld
physicaldrive = pd
drivewritecache = dwc

As root, just type "hpacucli" and you will be into hpacucli command line interface. Let me give you a quick example of what you can do with this hpacucli.

To get the quick details about the RAID controller and its Health:
Using Syntax : ctrl all show

testnode:root:/ # hpacucli ctrl all show

Smart Array P400 in Slot 9                (sn: PAFGL0P9SWY39U)

Using Syntax: ctrl all show status

testnode:root:/ # hpacucli ctrl all show status

Smart Array P400 in Slot 9
   Controller Status: OK
   Cache Status: OK
   Battery/Capacitor Status: OK

To get a quick idea of how the disks are grouped and which raid level used:

testnode:root:/ # hpacucli ctrl all show

Smart Array P400 in Slot 9                (sn: PAFGL0P9SWY39U)

Using Syntax: ctrl all show config

testnode:root:/ # hpacucli ctrl all show config

Smart Array P400 in Slot 9                (sn: PAFGL0P9SWY39U)

   array A (SAS, Unused Space: 0  MB)


      logicaldrive 1 (136.7 GB, RAID 1, OK)

      physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 146 GB, OK)
      physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 146 GB, OK)

   array B (SAS, Unused Space: 0  MB)


      logicaldrive 2 (136.7 GB, RAID 1, OK)

      physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 146 GB, OK)
      physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 146 GB, OK)

To get complete details about how the raid configured in the server:

Using Syntax: ctrl all show config detail

testnode:root:/ # hpacucli ctrl all show config detail

Smart Array P400 in Slot 9
   Bus Interface: PCI
   Slot: 9
   Serial Number: PAFGL0P9SWY39U
   Cache Serial Number: PA2270J9SWXBAV
   RAID 6 (ADG) Status: Enabled
   Controller Status: OK
   Hardware Revision: E
   Firmware Version: 7.24
   Rebuild Priority: Medium
   Expand Priority: Medium
   Surface Scan Delay: 15 secs
   Surface Scan Mode: Idle
   Wait for Cache Room: Disabled
   Surface Analysis Inconsistency Notification: Disabled
   Post Prompt Timeout: 0 secs
   Cache Board Present: True
   Cache Status: OK
   Cache Ratio: 25% Read / 75% Write
   Drive Write Cache: Disabled
   Total Cache Size: 512 MB
   Total Cache Memory Available: 464 MB
   No-Battery Write Cache: Disabled
   Cache Backup Power Source: Batteries
   Battery/Capacitor Count: 1
   Battery/Capacitor Status: OK
   SATA NCQ Supported: True

   Array: A
      Interface Type: SAS
      Unused Space: 0  MB
      Status: OK
      Array Type: Data



      Logical Drive: 1
         Size: 136.7 GB
         Fault Tolerance: 1
         Heads: 255
         Sectors Per Track: 32
         Cylinders: 35132
         Strip Size: 128 KB
         Full Stripe Size: 128 KB
         Status: OK
         Caching:  Enabled
         Unique Identifier: 600508B1001050395357593339550006
         Disk Name: /dev/cciss/c0d0
         Mount Points: /boot 196 MB
         OS Status: LOCKED
         Logical Drive Label: A09C2125PAFGL0P9SWY39U6F89
         Mirror Group 0:
            physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 146 GB, OK)
         Mirror Group 1:
            physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 146 GB, OK)
         Drive Type: Data

      physicaldrive 1I:1:1
         Port: 1I
         Box: 1
         Bay: 1
         Status: OK
         Drive Type: Data Drive
         Interface Type: SAS
         Size: 146 GB
         Rotational Speed: 10000
         Firmware Revision: HPDC
         Serial Number: 3NM8D3HA00009922LSYG
         Model: HP      DG146BB976
         Current Temperature (C): 28
         Maximum Temperature (C): 42
         PHY Count: 2
         PHY Transfer Rate: Unknown, Unknown

      physicaldrive 1I:1:2
         Port: 1I
         Box: 1
         Bay: 2
         Status: OK
         Drive Type: Data Drive
         Interface Type: SAS
         Size: 146 GB
         Rotational Speed: 10000
         Firmware Revision: HPDC
         Serial Number: 3NM8FY4M00009922R00K
         Model: HP      DG146BB976
         Current Temperature (C): 28
         Maximum Temperature (C): 43
         PHY Count: 2
         PHY Transfer Rate: Unknown, Unknown


   Array: B
      Interface Type: SAS
      Unused Space: 0  MB
      Status: OK
      Array Type: Data



      Logical Drive: 2
         Size: 136.7 GB
         Fault Tolerance: 1
         Heads: 255
         Sectors Per Track: 32
         Cylinders: 35132
         Strip Size: 128 KB
         Full Stripe Size: 128 KB
         Status: OK
         Caching:  Enabled
         Unique Identifier: 600508B1001050395357593339550007
         Disk Name: /dev/cciss/c0d1
         Mount Points: None
         OS Status: LOCKED
         Logical Drive Label: A09E85F0PAFGL0P9SWY39U8E5C
         Mirror Group 0:
            physicaldrive 1I:1:4 (port 1I:box 1:bay 4, SAS, 146 GB, OK)
         Mirror Group 1:
            physicaldrive 1I:1:3 (port 1I:box 1:bay 3, SAS, 146 GB, OK)
         Drive Type: Data

      physicaldrive 1I:1:3
         Port: 1I
         Box: 1
         Bay: 3
         Status: OK
         Drive Type: Data Drive
         Interface Type: SAS
         Size: 146 GB
         Rotational Speed: 10000
         Firmware Revision: HPDC
         Serial Number: 3NM89MV900009922LUZX
         Model: HP      DG146BB976
         Current Temperature (C): 28
         Maximum Temperature (C): 43
         PHY Count: 2
         PHY Transfer Rate: Unknown, 3.0Gbps

      physicaldrive 1I:1:4
         Port: 1I
         Box: 1
         Bay: 4
         Status: OK
         Drive Type: Data Drive
         Interface Type: SAS
         Size: 146 GB
         Rotational Speed: 10000
         Firmware Revision: HPDC
         Serial Number: 3NM8DAC800009922QE1N
         Model: HP      DG146BB976
         Current Temperature (C): 26
         Maximum Temperature (C): 41
         PHY Count: 2
         PHY Transfer Rate: 3.0Gbps, Unknown


Another Method to check the array hardware mirror status
testnode:root:/ # fdisk -l

Disk /dev/cciss/c0d0: 146.7 GB, 146778685440 bytes
255 heads, 63 sectors/track, 17844 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

           Device Boot      Start         End      Blocks   Id  System
/dev/cciss/c0d0p1   *           1          25      200781   83  Linux
/dev/cciss/c0d0p2              26       17844   143131117+  8e  Linux LVM

Disk /dev/cciss/c0d1: 146.7 GB, 146778685440 bytes
255 heads, 32 sectors/track, 35132 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes

           Device Boot      Start         End      Blocks   Id  System
/dev/cciss/c0d1p2               1       35132   143338544   8e  Linux LVM

testnode:root:/ # hpacucli ctrl all show config detail | grep -i /dev/cciss/c0d0
         Disk Name: /dev/cciss/c0d0

testnode:root:/ # cat /proc/driver/cciss/cciss0
cciss0: HP Smart Array P400 Controller
Board ID: 0x3234103c
Firmware Version: 7.24
IRQ: 74
Logical drives: 2
Sector size: 8192
Current Q depth: 0
Current # commands on controller: 0
Max Q depth since init: 161
Max # commands on controller since init: 343
Max SG entries since init: 128
Sequential access devices: 0

cciss/c0d0:      146.77GB       RAID 1(1+0)
cciss/c0d1:      146.77GB       RAID 1(1+0)

Be sure to verify your version of hpacucli and refer the ReadMe always, before you trying to modify the configuration of RAID or Smart Array controllers. 

Thank you for reading.

For Reading other article, visit to “https://sites.google.com/site/unixwikis/

No comments:

Post a Comment