Raspberry Tau: a Pi cluster

The Raspberry PI is a small ARM computer (hardware specifications in wiki, outline and FAQs). Of course, you can build a cluster with it!

As 2π is proposed to be named τ we’ve chosen the name “Raspberry Tau” for this proof-of-concept.

We’ve connected two Raspberry Pis via their on-board ethernet interfaces (via a switch, so we can simply SSH into them), booted via 2GB SD-cards with a Raspbian image on them. After upgrading to a kernel that has kernel-headers available we built DRBD modules, and voilá! A Raspberry Tau cluster is born.

We’re replicating the data on the USB-Sticks; their performance nicely matches the available network. Here’s /proc/drbd (shortened and line-wrapped for readability):

root@raspberry-alice:~# cat /proc/version 
Linux version 3.2.0-3-rpi (Debian 3.2.21-1+rpi1) 
  (debian-kernel@lists.debian.org) (… Debian 4.6.3-1.1+rpi2)…)
root@raspberry-alice:~# cat /proc/drbd 
version: 8.4.2 (api:1/proto:86-101)
GIT-hash: 7ad5f850d711223713d6dcadc3dd48860321070c build by
    root@raspberry-bob, 2012-09-18 12:58:08
 0: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate C r-----
    ns:805304 nr:0 dw:348628 dr:818596 al:127 bm:70 lo:0 pe:0
      ua:0 ap:0 ep:1 wo:d oos:0

As Raspbian is Debian-based, there are Pacemaker (and Heartbeat resp. Corosync) packages available … so a cheap, low-power, High-Availability cluster is easily built.

Disclaimer: for a real HA-cluster you’d need a few more things.

  • a STONITH device (if power is supplied via a Linux-PC, you could turn off the USB port by software), and
  • redundant network connectivity (USB ethernet adapter).

Of course, if you’re just clustering your media library these things might not be mandatory.

Packages are available for everyone – just drop an email to sales@linbit.com, and we will be happy to provide them.

14 thoughts on “Raspberry Tau: a Pi cluster

  1. Hi

    You say drop a mail to sales@ but I dont know at what?

    I would love to build a PI cluster to mirror my media so if you can send me the packages and any details etc…..

    Thanks in advance


  2. 2.d Interface : USB ethernet :-) i.e rtl8150

    Corosync fencing with stonith ssh sample :

    crm configure primitive st-ssh stonith:external/ssh params hostlist=”tau1 tau2″ clone fencing st-ssh

    crm configure property $id=”cib-bootstrap-options”
    dc-version=”1.1.7-2.fc17-ee0730e13d124c3d58f00016c3376a1de5323cff” \
    cluster-infrastructure=”corosync” \
    stonith-enabled=”true” \
    no-quorum-policy=”ignore” \
    expected-quorum-votes=”2″ \
    default-resource-stickiness=”5000″ \

  3. Hi,

    I’ve succeeded to this configuration, with one Primary and one Secondary node.

    But do you know if Raspberries can support DRBD with 2 primary nodes, GFS, Cluster-manager, etc… ?

    Thank you !

    • It should be easily supported in terms of CPU and RAM.

      But — the Raspberry has only got a single network interface, so you’d need to use some USB-to-USB-cable as second communication path.
      Then, the ethernet is 100MBit; USB connections won’t be much faster, so the speed is inherently limited.
      For a cluster filesystem you’d need reliable fencing – how would you solve that?

      So sure, you could tinker around and make it work in some way – but I guess the sane solution would be a simple NFS server.

      • In fact, I’ve tried to make that. And yes, there is bugs or configuration errors (especially CLVM / DLM).

        I’m don’t know really what “fencing” is, but I used human manual option in ccs_tool…
        (‘ccs_tool addfence human manual’ command).

        However, I agree with you, it seems maybe too unstable.

        Last question please : Why this kind of cluster needs two network cards ?? (or Usb, like you say).


  4. Is it possible to use just ust2usb cable and usb-eth module to cover absence of second network adapter? I know it will be slow, but as proof of concept it would be interesting… maybe next gen rpi will have gigabit ethernet.

    • Yes, of course that should work. For a proof-of-concept, that is.

      But you still won’t have STONITH — it’s much easier to test with VMs, IMO.

  5. Hi,
    I tried the Rapsberry PI packages on my PI’s with Wheezy.
    Download and install with:
    sudo dpkg -i drbd8-module-3.12-1-rpi_8.4.5-1+3.12.9-1+rpi1_armhf.deb
    sudo dpkg -i drbd8-utils_8.9.1+linbit-4_armhf.deb

    Then: sudo /etc/init.d/drbd restart

    Problem reported:
    /etc/init.d/drbd: line 142: 2481 Segmentation fault $DRBDADM sh-nop

    Any help appreciated ….


    • Hi Dirk,

      hmmm, sorry… it works for us here. Perhaps you can get some more details via gdb, to find out what’s going wrong?

      • Hi,

        thanks for your reply.
        I have no experiences with GDB, so could be tricky.
        So you have used a fresh install of wheezy on two RPI’s an did the same commands as I did? In this case, I would try a fresh install on both RPI’s…..


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

What is 8, multiplied by 6 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)