50 comments

[ 90.4 ms ] story [ 446 ms ] thread
FreeNAS is based on FreeBSD and provides great platform (allowing you to use such awesome features like ZFS, BSD/Linux Jails virtualization and many others)for self made NAS appliances made out of any hardware available, but also for very solid business product (like TrueNAS), when proper hardware is used. Personally, I've switched to FreeNAS after being in love with Synology for many years.
I have a Synology atm but I'm thinking of making a FreeNAS machine when I'm done with the Synology. What would you say are the biggest differences? What features did you miss the most? What features did you gain by using FreeNAS that you thought were very nice?
What I've really lost is a no-brainer solution, as in purchasing, plugging and that's it, I've also lost a vendor lock in but I dont really miss any of these ;) The most important thing I've gained is the reliability - in case Synology dies we're screwed until we're able to buy the same or close enough model in order to get back our data. With FreeNAS (and the bare FreeBSD based solutions people mentioned here) I can simply take out the disks and plug them into anything that has the ability to run FreeBSD/NAS to get back my data, since its just ZRaid on top of ZFS. I've also gained the flexibility of building the right NAS for my needs thanks to the wide hardware choice, FreeBSD and Linux Jails virtualization, and most things I really was afraid of, that are AFP support and Time Machine targets are there. And, the coolnes factor, you get a chance to dig around and build it on your own, gazzilion TB's of storage ;)
Is there a recommended motherboard or cpu to use this in a house?
Basically, its anything that FreeBSD can run on (and that's a lot, on its own: http://www.freebsd.org/releases/9.2R/hardware.html) and that will at the same time fill your needs (in terms of platform architecture, power consumption, number of available/supported IO/storage options, size and so on). If you're still unsure, there's a great community and forum available, and some general hardware guide can be found here (it covers entire NAS appliance): http://forums.freenas.org/threads/so-you-want-some-hardware-...
I built mine on an HP Proliant N36L MicroServer. There are doubtless newer models now, but these can usually be found for less than $300, and it ran out of the box flawlessly (though I added 8GB of RAM). Depending on your needs, this is a great platform - low power, small case, built with installing multiple drives in mind.

This is the newest equivalent product: http://www.newegg.com/Product/Product.aspx?Item=N82E16859107...

I picked up an n54l recently. Slapped freebsd9/ZFS on it, and it has been working great so far.
I just built one recently. Motherboard-wise you should get one that supports ECC ram. Other than that it doesn't matter that much. You typically don't use the onboard SATA ports either, so the motherboard specs aren't very important. I built one recently. A bit of CPU overkill, but otherwise a pretty standard build. You can see the hardware list here:

http://toys.lerdorf.com/archives/58-Building-a-NAS.html

What reasons are there for ignoring the onboard SATA ports?
Well he has a RAID controller in his build, so I would assume you ignore the built-in SATA so you can use RAID. He's also using SAS connectors to convert four SATA cables into one SAS connector (to avoid having to have eight cables running from the drives to the board).
No, FreeNAS uses ZFS for RAID. Generally, you want to disable any RAID features in your card so it presents the disks as JBOD to the OS to avoid incompatibilities, which he did.
It is also hard to find a motherboard with 8 SATA ports. They are out there, but you end up getting them split across different types of controllers which makes things complicated. And since you can pick up an M1015 for around $100 and flash it to IT mode I see no point in messing around with shaky onboard SATA controllers.
Recently you can also get an Asrock Avoton motherboard with 12 SATA ports, spreaded across three controllers, but that shouldnt be any problem.
That board actually splits the SATA ports across 3 controllers and they are not all 6Gbps. It also costs nearly $400 and doesn't support ECC ram. If you are going to build a ZFS-based NAS you really should be using error correcting ram. Buying a cheap $130 Supermicro board and a $100 M1015 seems like a smarter and cheaper solution.
It uses 3 controllers, true, but 8 ports out of 12 are SATA III 6GB/s ports, and the controllers split should not be an issue. The statement about not supporting ECC is untrue, that board in fact does support ECC RAM. Also, its $400, but its not a board alone but it also includes the CPU and cooling for it, it wont require PCI controller due to high number of ports (wider choice of smaller cases) and requires amazingly low amount of power.
Ah oops, misread the ASROCK specs and that board does support ECC ram so in that sense it is ok. And the low power consumption of the Atom chip would work well. I still don't like the price though.
Getting split across multiple controllers is not a bad thing if you want to avoid corruption due to failed / faulty controller (I've got six controllers in my box, driving 12 disks).
If the controllers were the same type I would agree, but that seems to never be the case with these.
You shouldn't want controllers of the same type, no? That increases chances of data loss due to design flaw.
I am more worried about driver issues. For example on my hackintosh the SATA ports on the Marvel controller are extremely flaky. It may be that the fbsd device drivers are great for the various on board Marvel or Jmicron controllers you are likely to see but I still feel better using the known LSI driver.
Very nice build there! Question though: Have you measured how much power it consumes when idle and when under load?

That's been my main thing holding me back from building a beefed up home server/NAS box. Friend of mine used to have an all-in-one HTPC/NAS/webserver box that would put close to $30 a month on his electricity bill. (Although you could argue he needed to run the heater less as a result..)

No, I have been meaning to, but the drives spin down when idle and it is a Haswell CPU which has decent power saving features as well so It will be nowhere near $30/month.
So crazy that I have been parting out an almost identical build with an E3-1230v2 and a Supermicro board, Fractal design case, etc... and then boom the creator of PHP mentions that he built one too.

That's the sign I needed. Gonna take the plunge. @rasmus have you been on the 9.2 RC's and now the release or are you on 9.1? I've been having significant issues with 9.2. It's the best software out there to roll your own NAS though. Nas4Free is pretty rad too but falls significantly short when you compare it side-by-side with FreeNAS.

Also, regarding LAGG/LACP, I noticed some pretty radical throughput increases after experimenting it on my home network. It took me a while to decide on a Layer 2 managed switch, but I ultimately went with the TP-Link SG3216 (new from Amazon, pretty cheap for a 16port gigabit managed device) and it's been great.

I think that once a connection is open, it will route through one single interface, so it won't help much between two boxes. But, as you said, having multiple devices connecting and backing up simultaneously will take advantage of the multiple links.

No, I didn't try any of the 9.2 releases yet. I am still on 9.1.
Hey, I have that exact same case for our server. It's a couple years old, with a Sandy Bridge cpu, but it's worked perfectly, is pretty quiet, and doesn't use a lot of power. I only used onboard SATA though.
At least some of the Haswell core i3's also support ECC. The 4130T in particular uses about half the power of the Xeon mentioned, for a bit less money.
The power/performance envelope is about the same for both processors (Haswell version of the Xeon (E3-1230v3) and i3-4130T) . So you are trading performance for power in a full load scenario, the idle power usage is going to be similar. Geekbench scores, price and full load power usage for the i3 is about 1/2 of the Xeon, go figure.
I'm thinking about building a NAS this week. Any build recommendations, suggestions on where to start? I know people used to recommend NAS4Free over FreeNAS, is that still the case?
FreeNAS was suffering from technical debt because it was build on the code base of a firewall appliance for small CF cards. The project initiator gave up on it and it needed a rewrite. Most active contributors had a Linux background and wanted to use a Linux distro as starting point. At that point iX Systems moved in and offered to take over. They started the rewrite and leveraged the improvements made in FreeBSD. The new FreeNAS lacked some features home useres wanted e.g. a BitTorrent client and media streaming until the new plugin mechanism was ready.

I'm a FreeBSD user and tend to avoid any automagic between me and the system but the FreeNAS 9.2.0 RC looked very promising.

I enjoyed a brief experience with FreeNAS but ended up wishing I had a full FreeBSD system -- it's easy to miss things like ports and the like. I was able to upgrade in-place to FreeBSD 9-STABLE however, which was a great experience.

I probably should have better documented by upgrade-in-place procedure but at the time I didn't know whether it would work. It was fairly straightforward, using documentation for root on ZFS.

I would recommend FreeNAS as this is what I've used, it has great community and serious company behind it and it seems to be more up to date with FreeBSD releases which is always a nice thing. When it comes to build recommendations, the main thing seems to be about RAM - you dont need a lot of it, contrary to popular belief, but you might want a lot, as ZFS loves large amounts of RAM (it can run with a smaller amout too, things like prefetch, and others, can be disabled). More important, you want the ECC RAM, given the ZFS unability to control memory errors. Beside that, you're free to do as you like, with a small advice of building at least RaidZ2 or even RaidZ3 (there are a lot of horror stories about people running RaidZ and loosing more than one disk in short time period).
https://news.ycombinator.com/item?id=4122937

Lowcost home file storage,

HP Proliant Microserver (mine is N60L me thinkz) Can get cash back on it if you look around (sometimes 35% back) ECC memory 8gb max (recommended if going for ZFS) Western digital reds 3tb x 4 (reds have 3 year warrently and built for raid) ZFS in raid 2 i think. (one disk redundancy)

Total space is about 7.9tb

Running FreeNas from a usb inside the case.

it works, and cost wise it was cheap minus the drives.

HP UK are currently offering £50 cashback on servers bought on/before the 31st December.[1]

So basically, you've got until newyears to get one ordered.

CCLonline[2] and ebuyer.com[3] are offering the servers for £180, so £130 after cashback.

I've got one already at home and plan on ordering two more tomorrow. Surprisingly powerful boxes, can take upto 16gb DDR3 (ecc unbuffered), internal USB and proper hardware virtualisation.

[1] http://h41225.www4.hp.com/UK_focus/PA0074%20-%20HP%20Microse...

[2] http://www.cclonline.com/product/108949/704941-421/Branded-S...

[3] http://www.ebuyer.com/430446-hp-proliant-g7-n54l-2-2ghz-micr...

PS> "zfs in raid 2" -I believe you mean raidZ, the zfs equivalent of raid5. raidZ2 (zfs raid6) would only leave you with approx 6tb usable space rather than the 9 you're quoting. As the microserver has only 4 drivebays (well, 5 if you use the optical bay) you'd probably get better speeds and same real space by using the zfs equivalent of raid10 rather than raidz2.

Thanks, nice find! But doesn't the max RAM say 8 GB?
16gb works just fine, regardless of what the sticker says :-)
Which RAM are you using? I've only been able to find 4GB sticks and that are unbuffered ECC. All of the 8GB I've found are registered ECC.
The sticker does say 8, but I've had 16gb in mine absolutely fine.

It will also work win _non_ ECC ram -though if you've got ZFS on the go it's highly recommended.

Thanks, nice find! But doesn't the max RAM say 8 GB?
re: The ECC recommendation w/ ZFS

I was not certain about ECC being particularly important when using ZFS, so I dug [0] and discovered a multitude of intriguing resources about ZFS robustness.

Apparently, ZFS has no built-in detection or recovery mechanisms where memory corruption is involved.

HardOCP [1] led me to an academic investigative study about ZFS robustness [2]. Many conclusions were drawn, including:

    In the last section we showed the robustness of ZFS to disk corruptions. Although
    ZFS was not specifically designed to tolerate memory corruptions, we still would
    like to know how ZFS reacts to memory corruptions, i.e., whether ZFS can detect
    and recover from a single bit flip in data and metadata blocks. Our fault
    injection experiments indicate that ZFS has no precautions for memory
    corruptions: bad data blocks are returned to the user or written to disk,
    file-system operations fail, and many times the whole system crashes.
Additional sources about ZFS and ECC can also found at http://en.wikipedia.org/wiki/ZFS#Data_Integrity.

-

[0] https://www.google.com/search?q=zfs+ecc

[1] http://hardforum.com/showthread.php?t=1689724

[2] http://research.cs.wisc.edu/adsl/Publications/zfs-corruption...

ZFS is great. But one thing scares me away from using it. With ZFS, you can't just simply add a new disk raidz set. You have to either build a new pool to send your data to, or :

1. Buy the same amount of (but larger) hard-disks 2. Replace them one by one 3. After the last disk is done, the size will grow. 4. Sell your old hard-disks.

Much more painful then other raid solutions.

Depending on how you have the arrays organized, I'm sure you can expand a zpool with additional sets.

http://www.itsacon.net/computers/unix/expanding-a-zfs-pool/

zpool add -f poolname raidz[or raidz1,raidz2,etc] /dev/driveid /dev/driveid /dev/driveid ...

You'd then have a pool with another raidz section within it, whose size was represented by the capacity of each of the sections within.

You can just add a new raidz (or any type of vdev) to the zpool.
For reference, you can also grow your pools by adding a new raidz array to an existing pool.

Edit: Looks like mbell and brianlweiner posted just before me. Bah :)

You can apparently add a new raidz, though. So adding 3 new drives would be possible (but not very efficient):

http://alp-notes.blogspot.no/2011/09/adding-vdev-to-raidz-po...

[edit: perhaps there should be a listing of "replies added since you hit reply"-function (with a "confirm" to reply anyway-button) to cut down on redundant replies.. and trade them for upvoting reasonable replies...]

Has anyone successfully written a FreeNAS plugin? My experience is with Linux, not FreeBSD, and I'm struggling to figure out how to package up my server as a FreeNAS plugin.