Since I’ve been writing about bits and pieces of my set up, I thought it might be useful to give it a bit of context.
I’ve been running email on my home system for years, starting with Sendmail and Pine then moving onto a more sophisticated system giving group-ware functionality.
A purchase of a digital camera 13 years ago (followed by several generations of replacement cameras and the ubiquitous mobile phone) has meant that a huge number of family photos were now only in digital format, and only stored on one disk.
A project to digitise my CD collection to reduce the clutter in the house also left various audio files sitting on a couple of machines and my phase 2 project to do the same for my DVDs put on hold.
The mail system was adequate, but I was feeling more uneasy about the storage situation, especially the photos.
The cost per MB has continued to fall, so my initial project was to build a NAS.
Phase 1: Selection of a NAS
I originally started from the perspective of getting an off-the-shelf dedicated NAS and putting in several disks (raid-5, not mirrored) and putting the device out of the way somewhere in the house. After digging around the internet and reading reviews, I came to the conclusion that a RAID-5 NAS was going to be rather more expensive than I’d budgeted for. In the course of my research I’d come across several NAS projects, but the one that grabbed my attention was FreeNas. This is made by iXsystems, and is based on FreeBSD. iXsystems provide the system in a two-tier method. There is a commercial system with all the support options and backup that a company would require, and a edition aimed for home users that relies on community support. (It should be noted that this approach isn’t just confined to iXSystems – other companies that provide solutions based on GNU/Open Source software also do this.)
I had an old machine sitting around unused, so I just upped it’s memory to the max (8GB) and purchased a disk so that I had three identical disks.
This was done several years ago, so the version of Freenas I started with has subsequently had a couple of rounds of upgrades, and the new version had features that blur the line between NAS and application server … but more on that later.
Installing Freenas
This is one of the simplest installs I’ve ever done. I downloaded the ISO and made the CD (you can also use a USB key) and followed the prompts. The documentation is easy : easy to read, easy to follow and takes you through the steps clearly. It explains the pros (and cons) of different decisions and details the hardware requirements clearly. My installation was done on an AMD Athlon configuration onto a desktop grade ASUS motherboard.
Once I’d set it up the process of copying all my photos, documents and music across to it was done.
Knowing that I was no protected from a disk failure (nasty incident years ago with one of these has made me a little paranoid) and that the files were safe and sound was a good feeling.
Pushing Freenas a little more.
Now I’d got my files up onto the NAS, there was one other major thing I wanted to do. My accounting package (running small business accounts) had a Postgresql back-end. Could I run this on FreeNas? I knew that the hardware was capable of taking this. In its previous life, the box had been a Linux (OpenSuse) desktop which also ran the PostgreSQL server whilst doing all the other critical desktop functions (web browser, playing music, ripping CDs, email etc).
One thing that was new to me was the fact that FreeNAS is based on FreeBSD, so the package system is different to Linux, and the layout of the file system is different.
Again, so after applying some Google-fu, I located some guidance of how to install extra software onto a FreeNAS system. (This isn’t an issue with the latest versions of FreeNAS as it supports Jails – a type of light-weight virtualisation).
The installation took a little work (not worth describing now), but the service ran flawlessly and I was able to move my databases across to this new system, and gain the security of the disk protection given by FreeNas.
Now what?
After installing Freenas, I got to thinking about other ways to improve and consolidate my setup.
At this stage, my system looked like this.
This doesn’t show the clients – comprising of Linux, Mac, Android and Windows systems, plus smart TV, AV receivers and Blu-Ray player devices. Centralising the storage onto the NAS keeps out files safe. Anyone can play music or stream video to the TV or a desktop.
The mail server is the other critical thing – running a small business + domestic and family accounts.
So the next stage was to install dnsmasq onto the FreeNas box, and use this to serve as the name server and DHCP server for the network.
Next Steps
- Install dnsmasq onto the NAS
- migrate the postfix system from using flat files to using the postgreSQL server and use postfix admin to maintain this
- Setup the time machine for the Mac clients (really easy)
- install a proxy server so that the internet connection can block unsuitable content for the children