After two hard drives in my Home Theater PC failed this summer, almost resulting in some significant data loss, I decided to move toward a better local backup solution. My previous backup strategy involved syncing hard drives on my HTPC. Although this was a simple and effective solution, it wasn't the most efficient use of my hard drive space and it doesn't provide much redundancy. After looking at my options I decided that a FreeNAS Server was the way to go.
- Case - Fractal Design Define Mini
- Power Supply - Antec Earthwatts 380W
- Motherboard - ASRock B75 Pro3-M
- Processor - Intel Pentium G630T (2.3GHz, Dual-Core, 35W)
- RAM - 8GB GSkill DDR3
- Hard Drives - (4) 3TB Western Digital Red
- OS Flash Drive - 4GB Sandisk Cruzer Fit
For my server build I not only wanted to keep the cost down, I also wanted it to be as quiet and power efficient as possible. I chose the case because of its noise reduction features in addition to its build quality and 6 hard drive bays. The motherboard offers 8 SATA ports and 4 RAM slots for future expansion. I was planning on using an Intel Celeron processor, but the Pentium G630T is more efficient, generates less heat, and doesn't cost much more. I considered reusing some of my 2TB Western Digital Green drives from my HTPC, but in the end I decided to get 3TB Red Drives instead. Besides their larger capacity, they are specifically designed for this application as well as offering a better warranty and support from the manufacturer.
FreeNAS has a lot of useful documentation, but I found Engadget's tutorial to be a better starting point for basic setup. This got me started with basic CIFS sharing that I can access with both my Windows & Linux PCs. I set up my 4 hard drives as a RAID Z2 array which should be able to survive one hard drive failure without affecting performance and two hard drive failures without data loss. After creating the array, I ended up with about 5.5TB of space available for storage. This should be more than enough for the forseeable future, but I can aways get two more hard drives and recreate the array to increase my storage capacity. Another key part of this setup is the recognition that my server will be used for backups only, never as the sole repository of data.
I ran into some issues, however, when I tried to RSYNC from my HTPC to the FreeNAS box. Using a scheduled RSYNC every night is how I plan to backup my media files and is critical to my local backup strategy. After a lot of Googling and experimenting I discovered how to properly setup the permissions on both the FreeNAS server and my HTPC in order to be able to RSYNC properly.
For my purposes I only have a Guest account on the FreeNAS server. This account does not require a password and has full access to all of the files in the share. On the HTPC side I setup Ubuntu to mount the remote share every time it boots by modifying the "/etc/fstab" file with the following line:
//192.168.10.200/Archive /mnt/Server cifs guest,uid=joe,gid=joe 0 0
In this application 192.168.10.200 is the IP Address of the server as perminently assigned by my router. "Archive" is the name of the CIFS share I created on the FreeNAS server. The directory "/mnt/Server" is the local directory on my HTPC that I created to mount the server's share to. CIFS (Common Internet File System) is the file sharing standard. The next three additions are key to getting the permissions correct: "guest" is the user ID on the FreeNAS server, "uid=joe" designates my user ID on my HTPC, and "gid=joe" designates my group ID on my HTPC. When the server's share is properly mounted I then had to make sure that the files I planned to share gave full read/write access to both my user and group.
With these set properly I can now RSYNC my media files from my HTPC to the server with the following command:
rsync -avru --delete --progress /local_directory/ /mnt/Server/remote_directory
Now that I have my permissions and RSYNC issues resolved, I am very pleased with my FreeNAS server. With the fan speeds set low it is very quiet and over a week of use it had an average power usage of 48 Watts. File transfer speeds are also pretty good over my newly installed Gigabit network. FreeNAS is a versatile platform and I look forward to learning more about it in the future.