Raspberry Pi File Server

Raspberry Pi File Server

Having a bit of time on my hands and a spare RPi I’ve been going a bit mad 😀 PiHole has been a great success (no more adverts when browsing in my house) and I have also created a web enabled controller for my Ubiquiti wireless kit. That should save me some money on the Amazon server (although it isn’t much).

Anyway, I visited a retired mate of mine and he really could do with some network storage (NAS) to replace the multiple USB drives he backs up to, but even a basic Synology takes some thinking about money wise. So I started thinking, what about attaching one of his USB drives to an RPi instead? So the whole thing snowballed and I started doing some serious testing using an RPI B wired and wireless, a 1 bay Synology DS112j on Gigabit Ethernet (GbE) and a 2 bay Synology DS216j on GbE. Clients were a desktop on N300 wireless, a laptop on AC433 wireless and a desktop on GbE. The same 2.5″ 5,400 rpm USB drive was used throughout and the NAS both have the same Toshiba P300 3TB drives. The 2 bay is RAID 1.

Yes some of the results seem inconsistent, but the author of the testing software makes no claims about it being super accurate. It is good enough however to see what’s going on to the extent we need to.

The first thing that struck me was how much quicker the 2 bay is than the 1 bay. The next thing was how crap the Pi wireless is and N300 whilst better is no great shakes. If you only have N300 a Synology NAS is basically going to waste as just a file server, but of course you can do so many other things with it.

With the Pi on it’s 100 mbps Ethernet both the GbE and AC433 maxed out the connection. On the Synologys they appear to have maxed out the USB drive. The new Pi 3B+ has 300 mbps Ethernet and AC wireless. Extrapolating these figures out (dangerous I know) I reckon it will achieve mid 30’s MB/s the same as the Synology as the USB and connection will bottleneck at about the same time.

To me that make a Pi 3B+ very viable indeed as not only a file server but also a simultaneous PiHole and UniFi server and probably a million and one other things that don’t require loads of CPU time.

All these benchmarks don’t of course tell the full tale. Yes in real life the Pi on wireless does seem sluggish, but if you’re only transferring a few dozen files the 100 mbps connection is very usable indeed. Where all this really matters is when you are doing things like transferring big files (like videos) or backing up whole machines, it’s then that the Synology kit earns it’s keep. However I have small businesses that are doing a weekly archive of their Synology to my Synology through the internet, which is 10 mbps at best even on fibre. The first backup takes hours and hours, the weekly incremental ones are a matter of minutes. So if you use proper backup software, like ToDo, Acronis, Paragon etc. once you’re over the pain of making the first one it’s all downhill.

It makes a good target for an IP cameras storage too.

The guide I used to set up Samba is here:

It’s not quite correct (but an awful lot easier to follow than some) and you have to umount your USB drive first (Raspian will mount it automatically when you plug it in). The default samba.conf file didn’t look quite like theirs but it was easy to spot the difference and the bits you add to the end are the same. So £65 for the all-you-need Pi 3B+ starter kit plus an old USB drive and you have a capable NAS box of your very own. Have a go and if you get in a pickle just wipe the drives and start again 🙂

 

Spread the love

Comments 2

  1. D-Dan

    For NAS on PI you don’t need a a dedicated NAS unit. Any USB drive will work. You let the Pi handle the NAS functionality itself.

    To avoid power problems, I use a powered USB HUB and connect the drives to that, and then the HUB to the Pi, which works a treat.

    I’m currently restoring my NAS drive from a backup on a separate NAS drive connected to the same Pi, using FTP on my main rig, and so I’ll be able to get a sense of speed of transfer at some point (right now it’s transferring lots of small files and so there’s no indication, but I have a folder with many large files. Once that starts, I’ll give an indication).

    0
    0
  2. D-Dan

    OK, not great (though remember this is via FTP) but coming in at around 10 MiB/sec. Nevertheless, for peanuts in terms of cost, no so bad. (ethernet, not wireless)

    0
    0

Leave a Reply