Notes on HP raid controllers

Lately I had to deal with some HP raid controllers and I’ve gathered some notes on them. I’ll post them here so I won’t forget about them.

First of all, don’t even think on using them without a battery pack. Seriously DON’T. The performance degradation is humongous. Without a battery pack the controllers were giving me 1/20th of the results with a battery pack. If you want to quickly test them, try iozone using the following options: iozone -t4 -I

Installing hpacucli is a also a must if you want to monitor or configure the controllers from within your OS. Be sure to add the repositories from HWraid to your system and then issue: aptitude install hpacucli (you are using Debian, arent’ you?). That reminds me that I am using those repositories on so many systems I manage that I must send a donation to the people at hwraid to thank them.

Below are some commands using hpacucli that I used.
# Show everything about your raid controllers
# hpacucli controller all show config detail

Cache Board Present: True
Cache Status: OK
Accelerator Ratio: 25% Read / 75% Write
Drive Write Cache: Enabled
Total Cache Size: 512 MB
Battery Pack Count: 1
Battery Status: OK
SATA NCQ Supported: True

What you must take notice here is the Accelerator Ratio, Drive Write Cache and Battery Pack Count.
if you have a battery pack installed but your Drive Write Cache is still shown as “Disabled”, you can enable it using the command:
# hpacucli controller slot=X modify dwc=enable
You’ll know what to put instead of “slot=X” from the output of the previous command (show config detail).

To modify Accelerator Ratio (read/write):
# hpacucli controller slot=X modify cacheratio=25/75

To enable Array Acceleration for one of your logical drives use:
# hpacucli controller slot=X logicaldrive Y modify aa=enable

If you happen to face the following error while opening hpacucli, don’t worry. You don’t need to reboot your machine as I’ve seen in various blogs.

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.

What you need to do is delete the shared IPC that hpacucli left when it got killed for some reason.
To see all your ipcs:

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

------ Semaphore Arrays --------
key        semid      owner      perms      nsems     
0xffffffff 32768      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 32768

and try to start hpacucli again.

References:
1. http://www.datadisk.co.uk/html_docs/redhat/hpacucli.htm
2. http://people.freebsd.org/~jcagle/hpacucli-readme

HOWTO remotely install debian over gentoo without physical access

The Task
Last year, me and comzeradd set up a Gentoo server for HELLUG according to our plot to help Gentoo conquer the world. Unfortunately Gentoo is out of HELLUG’s administration policy, all servers must be Debian. We didn’t know that, so after a small flame :), we decided that we should take back the server to somebody’s home and re-install Debian over it, the problem was that the server was located at University of Athens campus which is a bit far from downtown Athens where comzeradd lives. I also live 500km away so we were pretty much stuck. Months passed and nobody actually had enough free time to go to UOA‘s campus and take the server to their house. …In the meantime manji joined us as an extra root for the server.

One Saturday night while chatting at IRC (what else could we be doing on saturday night ??) we had an inspiration, why not install Debian remotely, without taking the server home. Even if everything got eventually borked it couldn’t get any worse than going there, taking the server home and fixing it, just like we would do any way. So we gathered on a new IRC channel with some more friends that are really good with Debian and started the conversion progress.

The Server
The interesting part about the server was that it had 2x250Gb IDE disks. The Gentoo setup had these disks partitioned to 4 software raid devices + swap partitions.
(more…)