Pi’s, Pi’s, and more Pi’s!

Guess what arrived??   Wooo, lots of Pi’s!!!


I also bought a couple of Mega’s.  That way I have more pins available to drive circuitry plus ethernet, etc.IMG_2956 IMG_2966



Managed to sort out a REST API that works nicely 🙂


Switching? Close

Some parts arrived today!


Looking to see about switching power to some Pi’s via some kind of web-usable API.  I’m using 74HC255’s to drive the relays – Arudino writes 8-bits at a time into them.  And then 74HC244’s to read the current state of the latches so that the PI’s will cleanly survive an arduino reboot..   Once that’s sorted, I can build a management API that something like WHMCS can talk to 😉


Managed to get an Arduino talking to it, but not quite correctly.  Must have fudged something. Will look at it again later 🙂



Had an interesting idea..

IMG_2904With these new Raspberry PI 2 Model B’s coming out, I’ve had an interesting thought… They’re finally powerful enough to use for hosting. Not just little play hosting, but you could ACTUALLY use one instead of a small VPS.. Hmmmm.

The guys from work and I ordered a bunch. And they arrived this morning.  HOOLY DOOLY they are fast.  Well, fast enough to use instead of a small VPS 🙂


Went looking around at home tonight, and found this case that I bought off ebay some time back.. It holds potential 😉  oh, and look, I could fit a 16-relay board nicely in the drive bay.. might even get more than one!


Setting up ZFS on Debian in 10 minutes

We run a small Citrix XenServer cluster at work, for our internal servers, and we had been running just a simple raid-1 array on the backend server. However the idea of SSD cache peaked my interest, so I backed up our storage repo one weekend, and reinstalled the server.

Here’s how I installed it:

apt-get install build-essential gawk alien fakeroot linux-headers-$(uname -r) zlib1g-dev uuid-dev libblkid-dev libselinux-dev parted lsscsi

#Install SPL
wget http://github.com/downloads/zfsonlinux/spl/spl-0.6.0-rc11.tar.gz
tar -xzvf spl-0.6.0-rc11.tar.gz
cd spl-0.6.0-rc11/
make deb
dpkg -i *.deb

cd ..
# Install ZFS
wget http://github.com/downloads/zfsonlinux/zfs/zfs-0.6.0-rc11.tar.gz
tar -xzvf zfs-0.6.0-rc11.tar.gz
cd zfs-0.6.0-rc11/
make deb
dpkg –I *.deb

# have a look at /dev/disk/by-id, to get physical location mappings to drive names
ls -l /dev/disk/by-id/

# and shove them in here:

vi /etc/zfs/zdev.conf
1tb_1 pci-0000:03:06.0-scsi-0:0:0:0
1tb_2 pci-0000:03:06.0-scsi-1:0:0:0
1tb_3 pci-0000:03:06.0-scsi-2:0:0:0
ssd_1 pci-0000:00:11.0-scsi-2:0:0:0

zpool create storagepool raidz 1tb_1 1tb_2 1tb_3
zpool attach storagepool cache ssd_1

zfs create storagepool/pool

# Install iscsitarget to point our xenserver cluster at
apt-get install iscsitarget iscsitarget-dkms

# and create a 500gb backing volume
zfs create -V 500G storagepool/iscsivol01

vi /etc/iet/ietd.conf
Target iqn.2012-01.local.icongroup.icon-szfs01:iscsivol01
Alias iscsivol01
Lun 0 Path=/dev/storagepool/iscsivol01,Type=fileio,ScsiId=2012110201,ScsiSN=2012110201

vi /etc/default/iscsitarget

# also remember to set targets.allow and initiators.allow as needed

/etc/init.d/iscsitarget restart

# all good to go!