Create Swapfile on Raspberry Pi and Miniban

While using Bittorrent Sync on my Raspberry Pi, I had some issues with BTSync using too much RAM. To solve this problem I decided to create a 2GB (count=2097152) swap file and see how it would perform. To do this follow these steps:

  1. Create a swap file in your filesystem replace “/PATH/FILENAME” and “SWAP_SIZE” with desired values. “SWAP_SIZE” is in kilobytes:
    the “dd” command can take up to 5 minutes, depending on how big “SWAP_SIZE” is.

    dd if=/dev/zero of=/PATH/FILENAME bs=1024 count=SWAP_SIZE
    chmod 600 /PATH/FILENAME
    mkswap /PATH/FILENAME
    swapon /PATH/FILENAME
  2. Add the swap file to the fstab list:
    sudo nano /etc/fstab
    #Swap file
    /PATH/FILENAME none swap sw 0 0

I’m using RPi-Monitor and can easily see if the Swap file is in use now


Before without swap file
After with swap file

RAM usage

SWAP usage

So I created a Swap partition on the 8th of February, this reduced RAM usage significantly.

Create Swapfile on Raspberry Pi and Miniban

Build your own stackable Raspberry Pi Tower (part 5)


What an adventure! After 4 evenings, here it is, a beautiful and sexy tower! Light, stable, scalable and stackable.

the result

Photo 24-08-15 22 09 37
Philippe’s tower
Photo 29-08-15 00 17 18
Tobias’s tower

The video

What’s Next?

A Raspberry Tower without system installed would be like a car without wheels… not so usable and bit too expensive. Here are some ideas we had. I hope it will inspire you for your project.

Here we have the Raspberry Pi Monitor from one of our RPis with load over the last two days.
Build your own stackable Raspberry Pi Tower (part 5)

Build your own stackable Raspberry Pi Tower (part 4)


After we finalized our plans and all the stuff we bought online slowly made its way from China to Switzerland, we could start assembling the tower. We started by constructing the frame.

Photo 19-06-15 18 43 29


The Frame is made of 4 aluminum bars on each corner. They are held together by threaded rods, nuts and bolts.

Close up of the frame

The first step is to drill holes into the aluminum bars. In the end The Acryl Glass will sit on the threaded rod and will create a “level”. So we had to think and calculate the distances between the holes. We also took into account of how high a Raspberry Pi v1 and v2 is.

Photo 19-06-15 17 44 41


As you have seen on our plan, we chose to have 4 “levels”. They are made of 5mm acryl glass.

Photo 13-07-15 18 26 09
The frame is almost finished

The cutting plans with and without holes can be downloaded here:


Laser cutting

The “levels” where the Raspberry Pis sit should also have some kind of drawer mechanism, so that we can pull the Pi holder out easily. This is made with the curtain rails we bought from a local store. The holes in the cutting plans serve as screw holes.

Photo 24-08-15 20 27 39

Raspberry Pi holder

The Raspberry Pi holder is a piece of acryl glass where the Raspberry Pi is mounted. We made plans to cut holes for a Raspberry Pi, but you can adjust them to mount a 2.5″ hard drive for example.


The Pi holders with Raspberrys


Unfortunately the structure wasn’t stable enough. A solution we found, was to cut long traversal pieces and mount them on each side of the tower. This resulted in a massive improvement of stability.


Photo 24-08-15 20 18 17


As engineers we’re not really gifted in creating art and decoration. But we tried our best and decorated the tower. So we made plans to engrave acryl glass and mount it on the front of the tower.


Tobias FIechter’s masterpiece
Philippe Wanner’s masterpiece
Build your own stackable Raspberry Pi Tower (part 4)

Build your own stackable Raspberry Pi Tower (part 3)


Before building the tower we had to organise and buy some material. Here is a shopping list which can be used as an example to build the tower. As mentioned before, we could use some really great tools like the laser cutter and professional drilling tolls from the FabLab Bern. If you don’t have access to such tools a short search on Google will probably help (like how to cut Acryl Glass).

Shopping list

All the stuff can be found on Amazon, Ali Express, Element14 or local stores

  • 3mm x 1500mm x 500mm and 5mm x 1500mm x 500mm Acryl Glass
  • 4x Aluminium bars
  • 1.5m curtain rail
  • enough bolts and nuts 3M & 2.5M
  • 2x 1500 threaded rod 3M
  • 20x plastic standoff 2.5M

Photo 19-06-15 17 44 54

  • USB Hub which can support 5x 5V
  • 10Port Ethernet Switch
  • 5x Ethernet Cable
  • 5x Micro USB Cable (for power supply)
  • 5x Rasperry Pi 2
  • 5x Micro SD Card
Photo 08-06-15 18 53 42
Finally some cool new hardware!


  • ThunderLaser Lasercutter (for cutting Acryl Glass)
  • drilling machine
  • hacksaw
  • all kind of tools to tighten screws and so on
  • … and beers to keep the efficiency high  😉
hard working


  • Visio – Microsoft Office
  • LaserGraph – ThunderLaser
  • Dropbox (for teamwork)

Photo 08-06-15 18 50 36

Build your own stackable Raspberry Pi Tower (part 3)

Build your own stackable Raspberry Pi Tower (part 2)

Draw the concept


I would say that the concept is the most important part of all! If you forget to think about the details, the cost will be higher, you will be wasting more time or your project will be useless. So, be aware! But keep in mind that “a simple concept is usually the better one”! Don’t do over-engineering!

Almost finished tower with stabilization

We have drawn 2-3 concepts before we were convinced we got the one which could be our best shot. To get some inspiration, we searched the Internet for some other Raspberry Pi Tower projects.  We were happily surprised that the official Raspberry Pi forum is full of amateur projects and ideas. Our concept was inspired great ideas and mistakes of other projects.


Let list some properties we want for this tower:

  • Scalable
  • Medium size (even if it is suggestive what medium means)
  • Modulable
  • Maximum 200$ with 4 RPis
  • Can be easily carried from place to place (it would be nice if we could take our prototype home…)
  • Can be prepared and assembled in less than one day

Draw the concept

In a logical way, we should draw the concept before going to the online-shop and buy thousands of things we won’t need. Here are the drafts we made.

First draft


Pro / Cons:
– Waste of space (only a few RPis can be placed on each level)
– Cable management: the RPis are not near to each other
– A fifth additional RPi would need a new level
+ Modularity: Each level can be swapped and they are similar


Second draft


Pro / Cons:
– Scalability: the height of each RPi stack is very limited
– Cable management
– Access to each module

– Stack stability
+ Modularity
+ Space management

Final concept


Pro / Cons:
+ Modularity
+ Extensibility
+ Scalable
+ Cable management
+ Easy access to each module
+ Space management
+ Each blade can contain a RPi, HD, SSD, Arduino, …
– Each RPi has to be mounted on a blade

Other concepts

Bitcoin mining Tower: How to make stackable tower Gridseed Rig with Raspberry Pi!

120 Raspberry Pi cluster: What would you do with 120-Raspberry Pi Cluster?

Build your own stackable Raspberry Pi Tower (part 2)

Build your own stackable Raspberry Pi Tower (part 1)


Hi there

Tobias Fiechter and I (Philippe Wanner) have worked together on an embedded project at the FabLab-Bern. There was a laser cutter and some professional power tools to turn any good idea into a working prototype.

The two towers enjoying some sun rays

Lucky us, after asking for a crash course how to handle these tools, we thought what could we build that would make our lab at home more professional, clean and proper. That’s how our Raspberry Pi Tower project was born.

You could ask yourself why would I need a Tower for some tiny raspberry Pis. Here are some self-explaining reasons:

  • You don’t have an extra room for a lab server.
  • You don’t want something noisy and your electric bill is already too high.
  • You have a tiny budget or you want to spend your money for a brand new car.
  • You love to build something on your own.

We are technology enthusiasts and love to learn by doing great things! Which also means we sometimes have to build some prototypes before it can go into production. This project is our first prototype, please be indulgent.

Build your own stackable Raspberry Pi Tower (part 1)