BPI-R2 based DIY NAS/Router

I thought I’d share my finished project using the BPI-R2 here. I built a tiny NAS/router inside a hot-swap hard drive cage. The dimensions of the BPI-R2 were excellent for this size, it’s basically the size of a 3.5" hard drive and all the I/O ports are on the same edge. Luckily I could position the SD card at the front and it is still accessible.

SATA and network speeds are perfectly fine for a non-SSD NAS. The 300MB/s limit would be a problem for connecting two SSDs though. The CPU is fast enough as a NAS but is a little slow if I want to run other things on it too. I’ll consider an aarch64 board next time, otherwise I may switch to x86_64 boards if I need speed. More RAM and a 64-bit OS are preferred for ZFS, but it I actually got it running on the BPI-R2 anyway (I did have to manually give the kernel more RAM with vmalloc=496M during boot).

It wasn’t possible to connect an internal power supply so I had to solder the power lines to the pins of the barrel plug. That worked fine, but was kind of weird.

The full build details are on my website:


Hi Bburky

It’s wonderfull I was trying the same thing from my side, but I was more interested about the software layer. What Kernel version are you running ? How do you build ZFS ? (native, fuse etc…) I’m yet using ZFS from my side, compil it was not easy. It’s running slowly but it works: using snapshot dedup and FS compression.

What was your issue about virtual memory ?

Very good jobs again !

Native ZFS. I built zfsonlinux from source following these instructions for kmods. Compression is probably okay as long as you’re not using gzip, it can be very slow. Deduplication is likely a bad idea with only 2GB RAM, it needs lots more.

I manually tuned vmalloc by trial and error. That was needed because the kernel doesn’t always have much RAM allocated for itself on 32-bit devices. I was seeing slow 10MB/s write speeds that went up to 60MB/s after tweaking it.

Also, I have gotten read speeds up to 108MB/s over SMB on large files (ZFS can read from both drives of a mirror at once).

You probably cut that acrylic on a laser cutter? Would you mind sharing the details (measures, draws)? I want to build a 3d printed case for my Bpi-R2.


Have you seen the 3d case from felix and my svgs for laser cutter?

The diagrams are in the article on my website including the PDF outlines used for laser cutting. The outlines weren’t quite perfect, I did have to remove the thin piece of plastic between the WAN and LAN ports.

I did the front panel by hand though. Just cut out the SD card slot with a router.

I found it really easy to get outlines of the ports by just tracing an image of them from a flatbed scanner.

I hadn’t.

I have know. Thanks!

I didn’t saw the article at first. Cool article btw.

Thanks for it

That thing looks like sth I was planning for my bpi w2. Great read.

Banana Pi BPI-W2 source code public on github :slight_smile: