Jump to Navigation

Lab on a budget Part 1/3 - FreeNAS: Not as bad as you might expect.

As part one of my three part series called, “Lab on a Budget” I’m going to describe my recent experience with FreeNAS V 9.2.1.8 x 64. After a recent hard drive failure in my cobbled together file server scared me half to death, I determined it was time to get serious about protecting my data for my home lab. I wanted a true RAID array, hot swappable drives, iSCSI support so it can be shared between multiple physical servers and VM Hosts, LDAP support, multi-NIC support for port channeling or at least management/storage segregation, dual power supplies, at least 2TB of capacity and I wanted it to be fast enough that I didn’t want to blow my brains out when loading up a KiCAD drawing, or running a VM. The problem is, I didn't have the budget to buy anything like that. The answer was FreeNAS.

I’ll be honest, I almost never get excited about a free, open source, Linux based stuff. It’s very rarely worth the time and morale sucking, endless, internet scavenger hunt that precedes the successful implementation (and that’s a term I use very loosely when talking about free Linux garbage) of most free Linux software projects. I can assure you, assuming your hardware is supported, FreeNAS is a crazy easy install/setup. I assure you, that once you’ve built one FreeNAS box, you’ll be addicted, and run around your house or office scooping up old hard drives and looking for PCs to salvage to setup more FreeNAS boxes. I’m so confident in the ease of setup, the value and the usefulness of FreeNAS that I’m presenting on the topic at the Brainstorm 2015 Technology Education Conference this spring. I know. I know. It’s crazy, anyone that’s spent any time with me professionally knows that whenever some ironically dressed hipster starts rattling on about open-source this and free that, and repeating "just use Linux, it's free", I just about pull a muscle rolling my eyes. FreeNAS is different. No really it is…. Trust me.

I’m not going to give you a step-by-step installation guide for FreeNAS. There’s plenty of documentation out there which I will link inside this post, and it’s pretty straight forward really. I want to give you a general overview of installing/configuring FreeNAS and how it is truly a great budget friendly option for your home lab, or low priority items at work.

Overview
FreeNAS converts standard PC or Server hardware into a dedicated storage device that is functionally similar to most SANs or NASs you’ll find in the enterprise market. This is not software you install on top of Windows or Linux, the FreeNAS OS literally creates a dedicated storage appliance out of whatever hardware you install it on. FreeNAS recommends that you run the actual FreeNAS OS on an SD card or flash drive so you don’t have to take up disk space with the OS. I’m running on a USB flash drive. That makes me a little nervous, but that’s why I do backups right?

I’d like to start off with the two most often asked questions when I’m explaining to people what I did with FreeNAS.

Why the frack do you need a SAN/NAS for your home lab?
It’s not that I don’t trust cloud providers, because I use them and for the most part I trust them. I just like keeping as much of my regularly accessed data locally on my network. Having a SAN/NAS is an economical and reliable option for running a small ESXi based infrastructure also. You can easily setup iSCSI connections to your VM host and carve up storage on your FreeNAS box, just like you would on the enterprise hardware you have at work. You can also connect physical Windows servers (and I assume Linux too) directly using the iSCSI initiator. I keep everything local, then only send what I want to a cloud provider for offsite storage/backup. To, me this is a more secure option. I can keep better control of what is out on The Internet. Having large local storage is faster to access, and much more flexible.

You know you can just buy a NAS from Bestbuy or whatever right?
I’ve used smaller pre-built NAS boxes before from SnapServer, HP, Iomega, Buffalo, Drobo and one other one… it was a silver box…crap… what was that thing? Anyway, I can’t remember. The point is, ALL of those failed and I lost data. They were proprietary, some of them required special hard drives, none of them supported iSCSi, none of them integrated with LDAP and ALL of them were basically a mess. Sure, I could store data on them, but they were WAY too slow for anything production. They were eventually shoved off and used as backup targets – which eventually failed.

The Hardware
The official HCL for FreeNAS is a bit elusive, but I’m sure it’s out there somewhere. Most of the common DIY computer hardware out there will probably work but, I’d recommend using as much brand name hardware as you can. If you can salvage an old HP or Dell workstation or server, that would work great. If you can score something with a RAID controller, all the better. Old servers and workstations are available all over the internet for very reasonable price. A quick scan of eBay right now and I found 25 reasonable boxes for under $200. I was able to get my hands on a 7+ year old Dell PowerEdge 2900. In its original 2007 configuration, it’s a dual Xeon 2.33GHz box with 8GB of RAM, dual power supplies and Dell’s standard RAID controller with 5 – 72GB SAS drives installed. When I got it, I swapped the SAS drives for some 1TB SATA drives (purchased from Amazon) and configured the RAID controller for RAID 5 giving me 4TB of usable storage. I still have a few bays left, so I should be able to add more drives and configure a second array if I want to. This works fine with single drives in a workstation if that’s what you have available. Just keep that in mind when you are deciding what you are going to use your new storage appliance for. At this point the server POSTS, and then tells me I need an OS installed. I’m ready to go.

The Install.
I downloaded the current stable version (at the time) from the FreeNAS website 64-BIT.

The download is simply an ISO file that I burned to DVD. As I noted before, I planned on installing the OS on a USB flash drive which I had already plugged into the back of the server. Make sure your BIOS is configured to boot from DVD first, then USB, pop your DVD in and fire it up.
The DVD boots, and it launches into the setup utility. Using this video from the FreeNAS website, I completed the install making sure to install the OS on the flash drive and not on the volumes I planned on using for data.

Once I was able to login to the web interface of my FreeNAS box and I changed the IP information, I used this video to help me setup my FreeNAS volume(s) as an iSCSI target. As recommended by the video, I did not use ZFS. I don’t know enough about the different file system types to make my own judgment. I can always move my data somewhere else and change that if I want to. After that, I pointed my ESXi host at my FreeNAS box and Boom! Instant ~4TBs of storage.

You can see here that I’ve got my Unitrends VM using my FreeNAS box for storage. I also have a few other VMs using it for both the OS partition and data storage. With a reasonable quality gig switch used for iSCSI traffic, the performance difference between local storage and FreeNAS is minimal. It’s slower, but it’s not enough for me to worry about.

Quick overview of features
Again, I’m not going to go into detail on these items, but I want to show you what is available. Here you can see the network support I was looking for. Multiple NICs, link aggregations (failover, LACP, Load balance, round robin), VLANs and more. My HP Procurve switch supports LACP trunks, so I’m excited to try that out.

Here you can see some of the storage features that are typically available on enterprise appliances. Snapshots, replication, etc. Seriously. That’s pretty amazing right?

Here you can see some of the sharing, connection and monitoring options. If you wanted more of a NAS setup, you could do CFIS, AFP or NFS, if you are looking for something that looks more like a SAN, iSCSI is probably your choice. You can see that FreeNAS has native support for many other services as well. I’m using SNMP so I can monitor/report on performance with my Observium VM.

Great stuff. So far, I’m REALLY impressed. Its fast, seems reliable and there’s an endless number of plug-ins for various technologies and services available as well if you are into that sort of thing. There are tons of graphs and reports to keep you on top of performance issue or simply integrated it into your existing monitoring system like I did.

Conclusion
I’m very happy with FreeNAS for my home lab, and for my home network. I’m planning on resurrecting some retired servers I have at work to use as FreeNAS boxes as well for temporary storage and for non-critical VMs and data. I just hate to see good hardware go to waste.

Note: I’m not crazy though, I wrote a python script that RoboCopy’s all my important data off to a USB hard drive periodically. If this thing takes a huge dump, or I need to bug-out, I can always go to that.



Main menu 2

Dracula