Raspberry Pi – Raspbian Woes.

It has been a while since I posted to my tech blog, but the latest endeavor has been working on my Raspberry PI cluster server project.  So far it is coming along.  The build came out better than I expected utilizing:

  • 3 Raspberry Pi v2
  • Netgear GS105 – 5 Gig port switch
  • Kensington USB Hub to supply power to each Raspberry Pi (though pictured was HDMI Hub – changed out)
  • Custom Plexiglass case
3 Raspberry Pi v2 servers.

3 Raspberry Pi v2 servers.

My biggest concern was the USB hub not applying enough power, but as long as you give a minimum of 500mA to each USB port, it is sufficient to power each one of the Raspberries with no peripherals plugged into the USB ports.   If you wish to add USB devices, I recommend a power hub plugged into each.  I did discover, however, that you can successfully connect a keyboard and mouse with little issue though.

With assembly done, it was now time to move onto the initial configuration stage which included, resizing the SD card to its maximum 64G, enabling SSH, setting the new ‘root’ password and localization changes.  Finally came the time to set the static address on the eth0 port, which is critical to the cluster communication (and general communication to the Pi’s).  This is where I thought my Linux skills would have the least amount of challenge.  Boy was I wrong.

Going to the usual /etc/network/interfaces command you come upon:

iface eth0 inet manual

auto wlan0
allow-hotplug wlan0
face wlan0 inet maualwpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

auto wlan1
allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

This is where most *nix people would make their network entry changes.  Not in the case of the latest Raspbian OS.  For whatever reason, bug or otherwise, if you see the manual setting under the eth0 interface, you cannot change it to ‘STATIC’ and add the interface information to it in hopes of making your PI static entry vs DHCP.  Even worse, if you do add a static entry in there you risk having both a DHCP and Static entry if you put your PI in a network with DHCP.   So what do you do to prevent this from happening?

There is a separate location for DHCP/Static entries under /etc/dhcpcd.conf file that you can enter your static directives in and prevent it from obtaining a lease and ensure it maintains its static entry.  This directive will go at the top of the dhcpdc.conf file:

interface eth0
static ip_address=192.168.x.y/24
static routers=192.168.x.y
static domain_name_servers=192.168.x.y

You will note in this entry you will use the ‘/’ notation for your Subnet, so if your subnet is 255.255.255.0 then your slash notation will be ‘/24′.  You also will put your DNS information in this same directive, separating multiple DNS with a space.

After you add all that information in, a simple reboot will put you back on track to having it statically addressed.  My hope is they will look into this issue as it is counter intuitive to have to fill the static information in this other area, and my hope is any fix doesn’t undo this setting as well, so it may be a good idea to watch this through updates.

Next step:  Get Hadoop running on the cluster and test processing using multiple nodes and then getting a clustered web service running to host my sites off the PIs.