Category Archives: Hardware

Raspberry pi SD card failure

Pac-man Raspberry Pi2

So, it happened again, the micro SD card in the Raspberry pi used to host this blog started to fail:

	mmc0: Timeout waiting for hardware interrupt 

… and my Raspberry pi2’s kill count now stands at 3 SD cards.

Recovery is not a problem since it’s backed up regularly, but it’s an irritating issue; whilst I don’t expect massive endurance from any of these cards, I expect them to last longer than they have as the system isn’t write heavy. The symptoms so far are never the same; card 1 simply became read-only, card 2 started exhibiting silent file corruption fixable by re-writing the data, and now the issue with card 3 manifests itself as the server randomly hanging whenever the system hits a particular portion of the card. Card 1 was class 6 and branded “Maxell”, card 2 was class 10/U1 and branded “Kingston” and card 3 a “Toshiba” class10/U1.

You can pull some information about the cards controller from the command line, however it would seem that without dissolving off the cards cases in nitric acid it’s hard to really know what you’ve got.

The underlying issue could be anything; firmware, power or pi2 design, but because the failures are always different I think this is purely down to card quality and wear out. Historically this server was hosted on a Cobalt Qube2 with an 8gb flash card, and then on a Raspberry pi model B with a 16GB SD card; both for long periods of time without issue. Both cards were also branded “SanDisk”; although I’ve no idea if that really makes any difference.

This time I’ve brought the site back up on the Raspberry pi model B, mainly because I’d not got a suitable working micro SD card for the pi2. We’ll see how it goes, but it might be time to move some things to tmpfs!

More pi

Today the server this site runs off got a well needed upgrade in the form of a Raspberry pi model 2B. I’m normally not one to rush out and buy the latest new gadget; my policy is if it aint broke don’t fix it. However wordpress had been taking it’s toll on the trusty old model B, and the timing of the 2B was perfect as I’d even started considering getting proper hosting again.

Raspberry pi model B and B2 side by side.

Raspberry pi model B2 and B side by side.

I’m still amazed at how fast technology gets smaller and cheaper these days. It seems like only yesterday I was marvelling at the qube2:

I thought the Qube2 was an amazing little server.

I thought the Qube2 was an amazing little server.

Latest megacli 8.07.14 emits message “Configure Adapter Failed” on Perc5i (LSI MegaSAS 8408E)

This morning I came to reconfigure a raid array on an old Dell Perc5i with the LSI MegaRAID CLI tool megacli, and whilst displaying information and removing an old LD appeared to work fine, I was greeted with the following when trying to add a new LD:

# megacli -CfgSpanAdd -r10 -Array0[10:2,10:3] Array1[10:6,10:7] WB RA Direct CachedBadBBU -a0

Adapter 0: Configure Adapter Failed

Exit Code: 0x03

Balls. The “Exit Code: 0x03” is supposed to mean “Input parameters are invalid” (ref), but after a few moments of head scratching and checking my parameters I realised that shouldn’t have been it. The megacli package I’m using comes from the debian repository at hwraid.le-vert.net and always worked in the past. A quick check of their homepage reveals a news item on their front page stating.

2014/01/26 — I just updated megacli to release 8.07.14. Despite it seems to works for me, I’d really appreciate some feedbacks, especially if you’re running a 32 bits system. Please drop me a mail !

So something in the new version isn’t 100% compatible with the Perc5i, I’ll send them an email, but I needed to get the adapter configured and wasn’t too keen to trudge off to the server room. After a quick google search I managed to find a rather old v4.00.16 rpm package in an archive here here and pull out the amd64 binary with rpm2cpio:

$ wget http://docs.avagotech.com/docs-and-downloads/legacy-raid-controllers/legacy-raid-controllers-common-files/4-00-16_Linux_MegaCli.zip
$ unzip 4.00.16_Linux_MegaCli.zip
$ unzip MegaCliLin.zip
$ rpm2cpio MegaCli-4.00.16-1.i386.rpm | cpio -idmv
$ cd opt/MegaRAID/MegaCli/
# ./MegaCli64 -CfgSpanAdd -r10 -Array0[10:2,10:3] Array1[10:6,10:7] WB RA Direct CachedBadBBU -a0

Adapter 0: Created VD 1

Adapter 0: Configured the Adapter!!

Exit Code: 0x00

Success!

Edit: 2014/10/16 12:30 The package here here is much more up to date and also works for me with the Perc5i, however it’s not a trustworthy link and I had to do a little more diddling to get it to run on Wheezy:

# apt-get install libsysfs2
# ln -s /lib/x86_64-linux-gnu/libsysfs.so.2.0.1 /lib/x86_64-linux-gnu/libsysfs.so.2.0.2