Author Archive

Dell H200 SAS -Obscenely Slow

March 19th, 2014 2 comments

After installing VMware ESXi 5.5 RAID 1 and even RAID 0 performance was obscenely slow with a range of disks.

Much faffing about later and the tldr is basically the card disables the _ON DISK_ cache.

There’s much confusion online thinking the card has some sort of write cache; it doesn’t (though it does deal with SAS drives without requiring a licence (cough HP)). This is a cheap card, no write cache, no battery, none of that jazz (get a PERC 5e if you want some of that excitement). However it’s quite a capable direct sata/sas controller.

Y U go slo?

As default the card disables the cache that’s built into the hard drive itself (you’ll most likely remember it from such columns as (Buffer) Cache on PcPartPicker. I believe the correct term for this would be “on-disk write-buffer”. When looking at a drive for your desktop computer, anything that makes random writes bearable with spinning rust is a boon. If you have an unexpected power-off then the machine will reboot, do a disk check and you might have lost some of your browsing history, or even the last save of your essay… but probably not. Even if you do you’re not going to care.

When you’ve got a server doing mission critical work, when you tell the machine to commit to disk you expect it’s actually on the disk. Think a decent size database (100’s of gigabytes) with lots of sequential access. If you think stuff is safely in longterm storage and (for example) power off whilst it’s still in the cache, you’re likely to have all sorts of hellish corruption. The on disk buffer can also cause all sorts of interesting problems with RAID itself, especially when the disks start dying. To get over the performance hit expensive RAID cards leave the disk buffer disabled and have their own cache (which is usually in the hundreds of MBs if not gig). Known as a Write Cache these are (essentially) sticks of RAM with a battery attached.The card can promise the machine that the data is stored safely before it even spins the disks back up. RAM to act as fast and large temporary storage and the battery so that if the power suddenly dies, all the data in the RAM is still safe and can be written to the actual disks when power returns.

make it fast!

So by now you probably don’t give a damn about securing data integrity and you just want your datastore to be almost vaguely usable. It’s easy. Ish.

Find a Dell Open Manage Server Administrator liveCD or install it on your OS.  If you’re using ESXI then it’s doable but an insane ball-ache.1

Once booted/installed then go into the storage component, into your array and enable the disk cache. Reboot and find it’s almost usable.

-sorry about the lack of full instructions; I did this back in December so at this point you can either have it from memory or it’d just be a saved title in my drafts.


  1. you need to install the OMSA VIB on the ESXI host and then find another box to install just the web component server which you can then hit up with a browser. Maybe. It also seems to fail if the web component is on a VM on the same hardware. I will try and make myself go through it again and write some instructions…


Unlock Samsung S3 (i9300) in seconds

February 3rd, 2014 No comments

Trying to do some testing against a mobile network and wanted to use my UK T-Mobile S3; annoyingly as much as I could roam onto other networks, every time I tried to enter APN details (specifically non-matching MCC/MNC) they seemed to get automatically deleted when I saved them.

Rang up T-mobile and spoke to a lovely gentleman there, who told me I could get my phone unlocked for only £25 and with (upto) a months wait. As i didn’t relish waiting (and I’m sure the last time I spent 6 months not getting a code for my desire), I thought I’d find an easier option.

1 – Root Phone

2 -Install GalaxSim Unlock

3 -Pay GalaxSim £2.50 through the play store (T-mobile want £25)

4 -Be amazed and profit; all my APN settings are suddenly there again and it’s happy with all sorts of odd SIM cards.

5 -Be surprised it’s taken you this long to get round to it.

edit: So it turns out T-Mobile (UK) does something odd with their sim cards. Even in an unlocked phone (tested with a nexus 4), if you have a T-Mobile SIM installed then it won’t let you specify APN details that contain MNC/MCC that doesn’t match 234-30. Extremely annoying, especially as it took an hour on the phone to confirm this

Read more…

Categories: Android (G1), SGS3 GT-I9300, Technology Tags:

Network cloning disks like a pro

October 20th, 2013 No comments

So you want to clone a hard drive over a network, it’s ok, we’ve all been there. We want quick and easy and preferably some level of integrity insurance.

Boot systemrescuecd on box boxes and make sure both have an IP address and can ping each other. My example IPs are listed below -it’s worth pointing out that you should only do this over a trusted network, there’s no transport level security so potentially someone could be intercepting your stream.


linux treats everything as files, so we can throw an iso image as easily as we can throw a hard drive, eg

nc -lp 1337 | dd of=/tmp/bigIsoFromSource.iso

dd if=./MyBigIso.iso | nc 1337

Nice (nice). Now, you should be running md5sum on the files at both ends to make sure it wasn’t corrupted in transport, but if it’s a big file (or a disk partition) that could take a while. Wouldn’t it be good if we could split the streams (or split the pipe) so we could send the same read data from dd to both netcat and md5sum on the source, and the same on the destination? tee is our friend.

nc -lp 1337 | tee >(md5sum) | dd of=/tmp/bigIsoFromSource.iso

dd if=./MyBigIso.iso | tee >(md5sum) | nc 1337

Cool beans, so now it gets checked on both sides of the network connection. It doesn’t let us see what’s going on though. you can send a `kill -USR1 <ddpid>` to dd’s process ID and it’ll print to stderror how far it’s gotten, but unless you stick it inside of wait it’s not automagically updating. For this we can use pipe viewer, which lets us see the state of data going through a pipe. If you’re feeling clever and know how big the file/partition/disk is, then you can pass the size to pv for even prettier output.

nc -lp 1337 | tee >(md5sum) | pv -s4.5G | dd of=/tmp/bigIsoFromSource.iso

dd if=./MyBigIso.iso | tee >(md5sum) | pv -s4.5G |  nc 1337

and then just to be silly we’re going to compress it and calculate the hashes on both sides for both the raw input/output as well as for the compressed file that gets shoved over the network (hey, cores are cheap, right?)

nc -lp 1337 | tee >(echo -e “compressed: $(md5sum)’\n) | pv -s4.5G | bunzip2 | tee >(echo -e “raw: $(md5sum)’\n) | dd of=/tmp/bigIsoFromSource.iso

dd if=./MyBigIso.iso | tee >(echo -e “raw: $(md5sum)’\n) | pv -s4.5G | bzip2 | tee >(echo -e “compressed: $(md5sum)’\n) |  nc 1337

*note nc under centos wants just the l and no p passing on the destination side, otherwise it errors out. so `nc -lp 13337` fails, but `nc -l 1337`works.

Categories: Linux Tags: , ,

CentOS/RHEL 5 wont boot when converted to vmware with SCSI/SATA Disk

October 20th, 2013 No comments

So you’ve taken your physical install of centos/rhel 5 and cloned the disk into a virtual machine, and now it won’t boot, or even mor eannoyingly it half boots and then tells you it can’t find it’s partitions even though it’s just happily read it’s way through boot.

The usual touted fix for this is to make sure your disk is set to IDE, and this does work, but it’s an annoying fix, so to work as a scsi disk:

edit /etc/modprobe.conf and remove any alias lines referring to scsi_hostadapter and replace with

alias scsi_hostadapter mptbase

alias scsi_hostadapter1 mptspi

alias scsi_hostadapter 2 ata_pixx

then we need to rebuild the initrd so these modules are available at boot

mkinitrd -fv /boot/initrd-$(uname -r).img $(uname -r)

and done; sync && reboot :)


Stepping up the game

August 13th, 2013 No comments

Wiresharking lo with a gui on a remote headless server:
(because when your ssl wrapped (stunnel) smtp auth fails, logs aren’t as good as bytes.)

ssh [email protected]
yum install xorg-x11-xauth dejavu-lgc-sans-fonts wireshark-gnome
ssh -X [email protected]

win -assuming you use linux on your desktop 😉

after the break, for windows:

Read more…

Categories: Howto, Linux Tags: , , , , new email stuffs

July 17th, 2013 No comments

Just tried setting up sky on a friends android and run into the new Yahoo! mess trying to find IMAP details. -They seem somewhat reticent to publish them, and people are having problems with the published SMTP. So…

It’s pretty easy to find the server addresses, resolves (and redirects) nicely but SMTP doesn’t. I’ll save the gory details; is where we’re poking. I’m also using for when the original cname fails.

[email protected] ~ $ping
PING ( 56(84) bytes of data.
64 bytes from ( icmp_seq=1 ttl=55 time=26.5 ms

As there’s no published IMAP config options, it’s up to us to work them out; nmap is our friend:

[email protected] ~ $ nmap

Starting Nmap 6.25 ( ) at 2013-07-17 21:28 BST
Nmap scan report for (
Host is up (0.046s latency).
Other addresses for (not scanned):
rDNS record for
Not shown: 997 filtered ports
80/tcp  open  http
143/tcp open  imap
993/tcp open  imaps

Nmap done: 1 IP address (1 host up) scanned in 12.68 seconds

-so, we see options for both secure and insecure IMAP; nice. Lets do SMTP whilst we’re here:

[code][email protected] ~ $ nmap

Starting Nmap 6.25 ( ) at 2013-07-17 21:30 BST
Nmap scan report for (
Host is up (0.031s latency).
rDNS record for
Not shown: 991 filtered ports
25/tcp  open   smtp
80/tcp  closed http
110/tcp closed pop3
143/tcp closed imap
443/tcp closed https
465/tcp open   smtps
587/tcp open   submission
993/tcp closed imaps
995/tcp closed pop3s

Nmap done: 1 IP address (1 host up) scanned in 5.98 seconds[code]

Cool, that’s a bit more going on. Massive respect to them for actually respecting the standard and having 587 open. 465 looks promising.

So, here’s what you need to know

username: [email protected]

IMAP: 993
Security : SSL

Port: 465
Security: SSL

pro-tip: lots of mail clients don’t use the [email protected] when they try and probe. Also, Thunderbird’s account setup menu makes it looks like it auto-prefixes the imap/pop part of the hostname; it doesn’t.

Also, Yahoo! deserves some credit at the moment…

Categories: Howto Tags: , , , , ,

A quick thought about SSDs

April 28th, 2013 2 comments

my slow 160tb system disk. Slow but still SATA II

After the break some quick screenshots of HDD benchmarks. -Look at the speed on the SSD 😉

Also, can you believe Samsung 256GB SSD for under £60? Get me one of those :)

Read more…

Categories: HardWare, Linux Tags: , ,

Max Payne in 2013

April 28th, 2013 No comments

portrait, as cropped from my screenshot of the loading screen.

TLDR: Don’t bother with windows, use linux 😉

I’d already been talking about fond Max Payne memories last week, so when Steam did one of their ridiculous sales; Max Payne 1 and II for only $2.50, I had one of those dangerous spur of the moment impulse buys, forgot about affording bread & milk and dropped the cash.

When I bought it, my brother pointed out that ‘he had my old copy somewhere at home’ -‘and anyway, [I] could just download it easily’, but for some reason I had the impression that if Steam were going to sell it, they’d have at least made sure it was fully patched and ready for play. This would be easier all in, I thought. I’m feeling a bit bloody disappointed right now.

I download & install only to find it wouldn’t work on either of my Windows 7 boxs at all at all. The install would go through absolutely fine (a tiny 700MB) and then it’d refuse to start.

but my card always was!

Max Payne requires a DirectX 8 compatible display adapter. Please consult the troubleshooting readme in the installation folder

it scolds me, and refuses to do any more. And no amount of Compatibility Troubleshooting helps me get past this either. Some googling suggested that newer drivers were the problem (I’m rocking an nVidia GeForce 9600GT (and a 7300 in the old machine)) so spent a couple of hours trying out some old and new graphics drivers all to absolutely no avail. 4 hours later and I still couldn’t get this bloody game to launch.

3AM and hours into this I gave up in disgust, apologised again to my brother and restarted into my usual GNU/Linux home… and then remembered WINE -and Max certainly reports as working nicely, so here come full instructions after the break: Read more…

Categories: Gaming Tags: , , ,

zsh magic

April 6th, 2013 No comments

sometimes you need to copy a file in a remote directory (like backing up a config file).
If its not in your current working directory, then you can end up with silliness like

cp /usr/src/linux/arch/x86/boot/bzImage /usr/src/linux/arch/x86/bzImage.backup

-lots of duplication. I’ve been trying to find a better way for years but never found it.

Khayyam in #Gentoo cracked it within moments of me asking (after setting me onto zsh (a different shell to bash))
with zsh you can do the clever thing of:

echo /usr/src/linux/arch/x86/boot/bzImage !#1.copy

which auto-expands to

/usr/src/linux/arch/x86/boot/bzImage /usr/src/linux/arch/x86/bzImage.backup

massive thanks to Khayyam who also has some immense .zsh customization & scripts on the go. He also suggests that you check out for more excellent tips :)

edit: in bash you can just do cp /path/to/file.png{,.old}

Categories: zsh Tags: ,

CW Touch Recovery on Samsung Galaxy S3

August 20th, 2012 No comments

CW Touch on SGS3

I’ve always used the clockwork mod recoveries, and apparently now they do a touch version for those phones without keyboards.

The easy install is a paid app from the market, but they give away the image for free, if you’re daring enough to flash it yourself. Here’s the easy way how (standard disclaimers apply: this worked for me, it might set you on fire. Sorry but not my fault if it does). Bits between `backticks` are commands to be executed (eg `echo “I am a command!”`).

We’re talking about the international SGS3, the GT-I900. It originally came from T-Mobile UK.

1. Get root.

2. Get the android dev tools so you can connect to your phone using adb. You’ll need to enable USB debugging too 😉

3. Head to the ClockworkMod download page and get the latest touch recovery for your “Samsung Galaxy S3 (GT-I9300)”, at the moment it’s recovery-clockwork-touch- Note the fact it’s a .img file.
Put this somewhere on your phone. I’m sticking it on the _internal_ SD-Card.

4. open a command prompt (`cmd` on windows) and check your PC can see your phone `adb devices`. You should see a device attached.

5. Get a shell on the phone (`adb shell`) and then get root (`su`). The end of your prompt should change from a $ to a # when you’ve got root. (eg, from “[email protected]:/ $” to “[email protected]:/ #”).

6. Change location to where you’ve got your image downloaded. On my phone/current firmware (stock samsung, latest) it’s /sdcard/, so `cd /sdcard/`. `ls` will list files, so you can make sure your image is there.
If you’re having problems finding the sdCard mount location, the _external_ sdcard seems to be at `/mnt/extSdCard` but you can get a list of mounts with `mount`.

7. Make a backup of your old recovery.
The recovery partition on the SGS3 seems to be as follows (found by WT Ho on the xda-developers forums)

/dev/block/mmcblk0p1 – unknown
/dev/block/mmcblk0p2 – unknown
/dev/block/mmcblk0p3 – /efs
/dev/block/mmcblk0p4 – unknown
/dev/block/mmcblk0p5 – kernel
/dev/block/mmcblk0p6 – recovery
/dev/block/mmcblk0p7 – unknown
/dev/block/mmcblk0p8 – /cache
/dev/block/mmcblk0p9 – /system
/dev/block/mmcblk0p10 – unknown
/dev/block/mmcblk0p11 – unknown
/dev/block/mmcblk0p12 – /data

so we’re interested in `/dev/block/mmcblk0p6`
`dd if=/dev/block/mmcblk0p6 of=./recovery-backup.img` makes a backup of our current image.

8. Blank the recovery partition:
Here be dragons! If things go wrong between now and the end of step 10, you might be buggered.
Probably not needed, but we write zeros to the recovery partition to blank it `dd if=/dev/zero of=/dev/block/mmcblk0p6`.

9. Write the new recovery -Still a dangerous place to be. Obviously you have a full battery and are in aeroplane mode?
“recovery-clockwork-touch-” is the name of the image. If you’ve got it in a zip or tar file then you should have extracted it first. I’ve renamed it to “recoveryTouch.img” for ease.
`dd if=./recovery.img of=/dev/block/mmcblk0p6` flashes the image to the partition.

10. `sync` afterwards, because it’s just a nice thing to do

11. Switch off the phone in the usual way, and then hold down [Volume UP] + [menu] + [Power] to switch it back on.
You should now be booted into your nice new touch recovery.

12. Touch the screen and enjoy. “reboot system now” to exit

Categories: SGS3 GT-I9300 Tags: , , ,