Friday, June 21, 2013

upgrade Dell PERC6 firmware with Debian

How to upgrade the firmware of a PERC6 RAID controller in a Dell PowerEdge R510 server, that's running Debian 6 (Squeeze).
Dell does not officially support Debian, thus the provided upgrade package does not run automatically. But with some tweaking, you can get it done.

This manual works for both PERC6/E and PERC6/I integrated (onboard chip). I haven't tested it with PERC6/I, but I guess it will work as well.

Step 0 :

Install the latest Dell OpenManage Server Administrator software (OMSA 7.1). This is not necessary for the upgrade, but useful all along, because you get a (web)interface and some command line tools to manage the server hardware. You get log messages also.

There is a community supported port of OMSA for Ubuntu, but it works fine on Debian Squeeze.

Step 1 : get the firmware


You can get the firmware update packages at the Dell support pages. Select the binary for RedHat.

You will have to get the actual firmware upgrade file from this package :

bash SAS-RAID_Firmware_F96NR_LN_6.3.3-0002_X00.BIN --extract perc6e_fw

This will extract the contents of the binary into folder perc6e_fw. Using bash is needed because the scripts are intended for sh, but give errors when run on Ubuntu or Debian. You can also change the intended shell in the first line of the BIN file and run it.

The firmware upgrade file is located in perc6e_fw/payload/*.rom

Step 2 : get the firmware uploader

I couldn't get this Dell binary package to actually update the driver, so I used the firmware updater from LSI. The PERC 6 RAID controllers are rebranded LSI controllers, so this works.

Get the StorCli tool from the LSI website, choose the Linux version, it is a zipped RPM package.

First unzip it :

unzip Storcli_linux_10175.zip


Then retrieve the upgrade tool from the rpm package :

rpm2cpio storcli-1.01.75-1.noarch.rpm | cpio -idmv


This will convert the rpm to a cpio archive and extract the files from that cpio archive.

Now you have the storcli tool to upload the firmware upgrade file to the PERC controller. Here is a manual on how to use it, but we'll only need a few commands.

Step 3 : Upgrade the PERC controller firmware

Now you just have to upload the Dell PERC6 firmware to the RAID controller with the LSI tool :

storcli /c0 download file=FW1371E.rom


This will start downloading the firmware file into the controller.

After the download is finished, you have to reboot your server. The new firmware will be installed when the server is booting.

Please note that the /cX parameter defines which RAID controller you will send the firmware upgrade to. If you have only one PERC RAID controller in your server, you can use /c0. If you have multiple, it is safe to assume that the onboard PERC6/I is in 0 and that a second one is in 1. If you have more than 2, you will have to find out which controller is which. You can do this with this command :

storcli show

Monday, June 03, 2013

git subtree module, with .gittrees config file

I have written about the git subtree module before.
It has been improved, to allow defining your subtrees and imported projects in a config file, in order to update them without having to specify the repo url and branch every time you push to or pull from an imported project.

So, first you need to setup the subtree :

$git subtree add --prefix=other_project \
     git://github.com/your_tree/your_project.git master

It imports the master branch of a git repository located in git://github.com/your_tree/your_project.git into the folder other_project of your git repo.

A file .gittrees in the root folder of your git repo is created :

[subtree "other_project"]
    url = git://github.com/your_tree/your_project.git
    path = other_project
    branch = master

With the subtree being defined in .gittrees, you can make changes to this imported project and you want to push them back to the original project, you can use this :

$git subtree push --prefix=other_project

Or if you want to update the imported project with changes from the original project, you can use this :

$git subtree pull --prefix=other_project

You can also push all changes in imported projects to the original projects, with

$git subtree push-all

It will push all changes to projects that are defined in the .gittrees config file.
Pull changes from all defined subprojects is done with :

$git subtree pull-all

BTW : All subtree commands must be run in the root folder of your git repo.

BTW2: the subtree module is not part of the core git package. So if you want to use it, you will have to install the module first.

Clone the subtree project :

$git clone https://github.com/helmo/git-subtree

In the git-subtree directory, run as root :

#./install.sh

This will copy the git subtree module to the git script folder. You can now use the git subtree module.