Improve linux raid rebuild/resync speed

I have a small 🙂 NAS box with 6 x 1TB HDD in RAID 6 and 4 x 500GB HDD in RAID 5. Recently thanks to the arrival of my baby girl and a HD handy cam, I was running out of space fast on the array and so when when I saw a decent deal for 1TB drives in NewEgg I picked up couple to add to the RAID 6 volume.

Growing a raid array in linux using mdadm is easy. I made sure I used fdisk to create single large partition on the drive and mark the partition type fd (Linux raid autodetect) prior to adding it to the array.

 Device Boot      Start         End      Blocks   Id  System
/dev/sdm1               1      121601   976760001   fd  Linux raid autodetect

Adding the drives to the raid is straightforward

mdadm --add /dev/md1 /dev/sdl1
mdadm --add /dev/md1 /dev/sdm1

Read more

PXE boot VMware ESXi 4.1 and Manual Install

an awesome new feature in the just released ESXi 4.1 is the ability to do PXE boot and script the install using a kick-start script. If you looking for information on how to do this see here at billhill’s post.

http://communities.vmware.com/blogs/vmwareinsmb/2010/07/13/esxi-41-scripted-installation-via-pxe-and-kickstart

However while adding that feature VMware seems have slightly broken the PXE boot, but manual install ability of ESXi. This is useful if you have lights-out lab and want to use the local pxe server instead of those virtual media options but also want to customize the install options as the lab servers do not have standardized components and hardware and may other issues.

Refer to the above link for overall PXE/dhcp/tftp install steps. I plan only to document what’s different for a manual install.

Read more

setting up http proxy for cli

Okay, I have to google this information every-time I need it, to so am going to blog it, so that I know exactly where to look for it 🙂

Setting up a proxy from the GUI on you browser or system does not always work for command line utilities like apt-get, yum, wget or customer bash scripts etc…

So here is how to setup proxy for CLI from CLI, assuming your proxy server is proxy.example.com (IP 192.168.2.252) and port 3128.

export http_proxy='http://proxy.example.com:port/'

OR

export http_proxy='http://192.168.2.252:3128/'

Read more

Installing Silverlight 3 on Hackintosh

Okay I have always wanted to own a Mac Pro and that wish only grew more after I bought my Mac Book and the Mini for HTPC duties. I like the OS X interface and recently bought Snow Leopard Family pack to upgrade my laptop and mini and was wondering what to do with my Dell Inspiron 530s (the only windows box in the house, ohh btw I do like Windows 7 and is really the best Windows OS Yet ) and decided to dual boot it with OS X.

The hackintosh installation was a bit round about as I had install Leopard first and then use that install Snow Leopard and then update the boot loader to Chameleon rc3 and fix the boot order from the windows with easybcd 2.0 beta. That story is for latter.

Now coming back to the title of this post after I got the setup up and running, I was trying out all my usual apps and when I tried Instant Watch from Netflix, i trt wanted to install Silverlight 3.0. I download the dmg ran the install it said I was running a Power PC and the install failed. I “googled it” and found that the installer is checking for the PC type and is parsing it wrong. So here is the fix.

Read more

FANN python binding on ubuntu x86_64

Ok, Long time no see.. Was busy with too much work. Got a little bit of free time in the last couple of weeks and was mucking around with some Artifical Neural Network packages out there and ran into an issue with FANN 2.1.0 Beta.

I was able to compile and install the core libfann without any issues, however when I tried compiling the python binding pyfann I ran into some issues, first ubuntu did not have any of the python dev packages installed by default so installed them with

sudo apt-get install python-dev

and then installed the swig package

Read more