Monday, February 27, 2012

installation of hpacucli on Ubuntu 10.04.4 LTS (Lucid) x86_64

it all began with a simple query:
do we have a write cache?
and down the rabbit hole I went...
# cat /proc/driver/cciss/cciss*

cciss0: HP Smart Array P410i Controller
Board ID: 0x3245103c
Firmware Version: 5.14
IRQ: 63
Logical drives: 1
Current Q depth: 0
Current # commands on controller: 3
Max Q depth since init: 9
Max # commands on controller since init: 318
Max SG entries since init: 31
Sequential access devices: 0

cciss/c0d0:     1799.79GB       RAID 5
yay. i guess. to administer this, i can either take the system offline and mess around on the controller. or! i can install the hp tool HP Array Configuration Utility CLI for Linux (hpacucli). it has the added bonus of being able to be called by nagios... but i'm getting ahead of myself. it works with the following controllers:
Smart Array 5312 Controller
Smart Array 5302 Controller
Smart Array 5304 Controller
Smart Array 532 Controller
Smart Array 5i Controller
Smart Array 641 Controller
Smart Array 642 Controller
Smart Array 6400 Controller
Smart Array 6400 EM Controller
Smart Array 6i Controller
Smart Array P600 Controller
Smart Array P400 Controller
Smart Array P400i Controller
Smart Array E200 Controller
Smart Array E200i Controller
Smart Array P800 Controller
Smart Array E500 Controller
Smart Array P700m Contoller
Smart Array P410i Controller
Smart Array P411 Controller
Smart Array P212 Controller
Smart Array P712m Contoller
Smart Array B110i SATA RAID
Smart Array P812 Controller
MSA500 Controller
MSA500 G2 Controller
MSA1000 Controller
MSA1500 CS Controller
MSA20 Controller
the tool is supplied on HP Support Pack CDs, if you've got them; but you can download a newer version from HP here; this links to hpacucli-8.50-6.0.noarch.rpm.
after downloading, we need to convert the rpm into a format that we can work with. alien does this for us in ubuntu... other tools are rpm2cpio & rpm2tgz. i like alien. apt-get it.
# alien --to-tgz hpacucli-8.50-6.0.noarch.rpm
alien will report some errors and warnings; in your source directory, you'll see hpacucli-8.50.tgz.
# tar -xzf hpacucli-8.50.tgz
Move the unpacked files to corresponding locations:
# mv opt/compaq /opt/
# mv usr/sbin/* /usr/sbin/
since i'm running an x86_64 box, i need to:
# apt-get install ia32-libs
hpacucli should run. it does.
# hpacucli
=> ctrl all show      

Smart Array P410i in Slot 0 (Embedded)    (sn: 5001438017EA3640)
we have a RAID controller in Slot 0. Good to know.
=> ctrl all show detail      

Smart Array P410i in Slot 0 (Embedded)
   Bus Interface: PCI
   Slot: 0
   Serial Number: xxxxxxxxxxxxxxxxx
   Cache Serial Number: xxxxxxxxxxxxxxxxx
   RAID 6 (ADG) Status: Disabled
   Controller Status: OK
   Chassis Slot: 
   Hardware Revision: Rev C
   Firmware Version: 5.14
   Rebuild Priority: Medium
   Expand Priority: Medium
   Surface Scan Delay: 3 secs
   Queue Depth: Automatic
   Monitor and Performance Delay: 60 min
   Elevator Sort: Enabled
   Degraded Performance Optimization: Disabled
   Inconsistency Repair Policy: Disabled
   Wait for Cache Room: Disabled
   Surface Analysis Inconsistency Notification: Disabled
   Post Prompt Timeout: 15 secs
   Cache Board Present: True
   Cache Status: Not Configured
   Accelerator Ratio: 100% Read / 0% Write
   Read Cache Size: 0 MB
   Write Cache Size: 0 MB
   Drive Write Cache: Disabled
   Total Cache Size: 912 MB
   No-Battery Write Cache: Disabled
   Cache Backup Power Source: Capacitors
   Battery/Capacitor Count: 1
   Battery/Capacitor Status: OK
   SATA NCQ Supported: True

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

      Logical Drive: 1
         Size: 1.6 TB
         Fault Tolerance: RAID 5
         Heads: 255
         Sectors Per Track: 63
         Cylinders: 65535
         Stripe Size: 256 KB
         Status: OK
         Array Accelerator: Not Configured
         Parity Initialization Status: Initialization Completed
         Unique Identifier: 600508B1001C5D95C9C5A46D895F6036
         Disk Name: /dev/cciss/c0d0
         Mount Points: /boot 243 MB
         OS Status: LOCKED
         Logical Drive Label: AE8582015001438017EA36402B33

      physicaldrive 1I:1:1
         Port: 1I
         Box: 1
         Bay: 1
         Status: OK
         Drive Type: Data Drive
         Interface Type: SAS
         Size: 300 GB
         Rotational Speed: 10000
         Firmware Revision: HPD4
         Serial Number: xxxxxxxxxxxxxxxxx
         Model: HP      EG0300FBDSP     
         PHY Count: 2
         PHY Transfer Rate: 6.0GBPS, Unknown
well, it looks like write caching is not enabled. great.
=> ctrl slot=0 modify dwc=enable
=> ctrl slot=0 modify cacheratio=25/75
=> ctrl slot=0 logicaldrive 1 modify aa=enable
=> ctrl all show config detail

Smart Array P410i in Slot 0 (Embedded)
   Bus Interface: PCI
   Slot: 0
   Serial Number: xxxxxxxxxxxxxxxxx
   Cache Serial Number: xxxxxxxxxxxxxxxxx
   RAID 6 (ADG) Status: Disabled
   Controller Status: OK
   Chassis Slot: 
   Hardware Revision: Rev C
   Firmware Version: 5.14
   Rebuild Priority: Medium
   Expand Priority: Medium
   Surface Scan Delay: 3 secs
   Queue Depth: Automatic
   Monitor and Performance Delay: 60 min
   Elevator Sort: Enabled
   Degraded Performance Optimization: Disabled
   Inconsistency Repair Policy: Disabled
   Wait for Cache Room: Disabled
   Surface Analysis Inconsistency Notification: Disabled
   Post Prompt Timeout: 15 secs
   Cache Board Present: True
   Cache Status: Not Configured
   Accelerator Ratio: 100% Read / 0% Write
   Read Cache Size: 0 MB
   Write Cache Size: 0 MB
   Drive Write Cache: Enabled
   Total Cache Size: 912 MB
   No-Battery Write Cache: Disabled
   Cache Backup Power Source: Capacitors
   Battery/Capacitor Count: 1
   Battery/Capacitor Status: OK
   SATA NCQ Supported: True

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

      Logical Drive: 1
         Size: 1.6 TB
         Fault Tolerance: RAID 5
         Heads: 255
         Sectors Per Track: 63
         Cylinders: 65535
         Stripe Size: 256 KB
         Status: OK
         Array Accelerator: Not Configured
         Parity Initialization Status: Initialization Completed
         Unique Identifier: 600508B1001C5D95C9C5A46D895F6036
         Disk Name: /dev/cciss/c0d0
         Mount Points: /boot 243 MB
         OS Status: LOCKED
         Logical Drive Label: AE8582015001438017EA36402B33

      physicaldrive 1I:1:1
         Port: 1I
         Box: 1
         Bay: 1
         Status: OK
         Drive Type: Data Drive
         Interface Type: SAS
         Size: 300 GB
         Rotational Speed: 10000
         Firmware Revision: HPD4
         Serial Number: xxxxxxxxxxxxxxxxx
         Model: HP      EG0300FBDSP     
         PHY Count: 2
         PHY Transfer Rate: 6.0GBPS, Unknown
crap. it didn't update. or did it?
=> exit
apparently this is a bug. or a feature. we need to exit the utility, and then start it up again for the changes to be reflected. of course.
# hpacucli
=> ctrl all show config detail

Smart Array P410i in Slot 0 (Embedded)
   Bus Interface: PCI
   Slot: 0
   Serial Number: xxxxxxxxxxxxxxxxx
   Cache Serial Number: xxxxxxxxxxxxxxxxx
   RAID 6 (ADG) Status: Disabled
   Controller Status: OK
   Chassis Slot: 
   Hardware Revision: Rev C
   Firmware Version: 5.14
   Rebuild Priority: Medium
   Expand Priority: Medium
   Surface Scan Delay: 3 secs
   Queue Depth: Automatic
   Monitor and Performance Delay: 60 min
   Elevator Sort: Enabled
   Degraded Performance Optimization: Disabled
   Inconsistency Repair Policy: Disabled
   Wait for Cache Room: Disabled
   Surface Analysis Inconsistency Notification: Disabled
   Post Prompt Timeout: 15 secs
   Cache Board Present: True
   Cache Status: OK
   Accelerator Ratio: 25% Read / 75% Write
   Drive Write Cache: Enabled
   Total Cache Size: 1024 MB
   No-Battery Write Cache: Disabled
   Cache Backup Power Source: Capacitors
   Battery/Capacitor Count: 1
   Battery/Capacitor Status: OK
   SATA NCQ Supported: True

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

      Logical Drive: 1
         Size: 1.6 TB
         Fault Tolerance: RAID 5
         Heads: 255
         Sectors Per Track: 63
         Cylinders: 65535
         Stripe Size: 256 KB
         Status: OK
         Array Accelerator: Enabled
         Parity Initialization Status: Initialization Completed
         Unique Identifier: 600508B1001C5D95C9C5A46D895F6036
         Disk Name: /dev/cciss/c0d0
         Mount Points: /boot 243 MB
         OS Status: LOCKED
         Logical Drive Label: AE8582015001438017EA36402B33
and of course, we want to see that our once dismal performance is not so. download and run iozone. and then test throughput:
# iozone -t4 -I
note:
everyone says, BBWC is a must have. but, as seen on this capacitor-backed up cache, all is cool. we're running with FBWC.
FBWC is a flash based cache module that does not have the battery limitation of how long it can retain what is written to the module.

addendum:
i got ahead of myself with nagios. use the plugin here to monitor the state of the array.

and...
if someone else is doing something funny and manages to crash your new friend... you'll need to clean up...
Error: Another instance of ACU is already running (possibly a service). Please
terminate the ACU application before running the ACU CLI. Press ENTER to
exit.
delete the shared IPC that hpacucli left when it died.
# ipcs

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status      

------ Semaphore Arrays --------
key        semid      owner      perms      nsems     
0xffffffff 56890      root       0          1         

------ Message Queues --------
key        msqid      owner      perms      used-bytes   messages    
Then use ipcrm to remove the array with the semid you want:
# ipcrm -s 56890
and try to start hpacucli again.

No comments: