36TB FreeNAS Home Server Build
ramsdenj.github.io
ramsdenj.github.io
Firstly the claim that freebsd has wider testing is utter trash. In terms of TBs installed ZFS on linux >> freenas/freebsd
the amount of money behind ZoL is now surprisingly large.
Also, extensive memtest of ECC ram is pointless, ECC ram has checksumming built into the chip which will tell you if there is a memory error and correct it if possible.
As for most drive fail in the first hours: https://www.backblaze.com/blog/how-long-do-disk-drives-last/ evidence says other wise. Infant mortality is a thing, but its a matter of months, not hours. (internal QA grabs most of the ones that die within a few hours.)
The best way to combat simultaneous failure is to mix hardrive types, this makes it much less likley that a single fault class will be triggered on all disks.
Yes, but if the chip is getting lots of memory errors, correctable or uncorrectable, I probably don't want it. I don't want to build my system and put it into production and then find out.
You can check that known pattern to see if the bit changed properly.
With ECC this is redundant, as each byte(or word, or some unit of memory) has a hardware checksum. So using ECC ram in normal operation will indicate if there are errors.
The reason to run memtest on ECC memory is to verify that every bit of memory is good before you finish building the system, installing an OS, and putting it into production. If you have, say, 32GB of memory, there's no guarantee you'll hit those bad bits for ECC to log an error until you're doing something memory intensive two weeks later.
The primary use case of ECC is to handle random bit flips from cosmic rays and whatnot, not to mitigate bad hardware. If you have bad memory, replace it, don't rely on ECC. The only way to test memory is to run something like memtest, where you read and write from every bit in memory.
If you're OK with finding out a month later that ECC is logging a hundred uncorrectable errors an hour whenever you do anything memory intensive, then sure, don't bother memtesting. If you would rather deal with it beforehand, then run memtest.
I (and I would guess most people) don't want to find out a month (or more, potentially much more) from now that the memory module is bad, I want to know now so I can RMA it and get it over with without having to take a running system down and apart.
That's the problem that memtest solves, ECC does not solve the same problem at all.
In that case OmniOS (or any IllumOS based) distribution is a much better choice. It has a more full featured ZFS (features not yet ported to FreeBSD or ZoL) and a more complete set of DTrace probes to analyze problems. Moreover it's still the OpenZFS upstream for all intents and purposes, but that may change in the future. On top of that ZFS on Solaris doesn't try to fit into a foreign kernel. I'm not sure but FreeBSD's GELI or Linux's LUKS may be missing on Illumos (but exists in Oracle Solaris 11), so that can be a disadvantage.
If none of Linux, Illumos or FreeBSD is to your liking, you can try ZFS on NetBSD.
It's still true that if you want to analyze serious issues, IllumOS DTrace probes will be more complete.
With that being said, I'm glad to hear FreeBSD is not behind IllumOS ZFS. FreeBSD has wider hardware support than IllumOS and thus is preferred by most users.
When it comes to stability and performance FreeBSD == Illumos. I wouldn't worry so much about features anymore, because as soon as they're available they get pulled in. Last I looked the awesome ZFS features that are coming still weren't fully accepted upstream yet.
The most visible, even if you are not using ZFS is using the SMART output http://www.techrepublic.com/blog/linux-and-open-source/using... There are a number of metrics that might indicate the health of the drive
not all raid cards support this, however most consumer devices do. If you have a card that doesn't do this, either its a highend jobby with another mechanism, or a pile of shite.
second when you actually bump into a hard error, you'll see things in /var/log/messages that say "disk timed out, retrying" (but then you're probably fucked by then)
However using ZFS/BTRFS data is checksum'd when written and read. This means that bit flips and otherwise silent bit rot has a greater chance of being caught early. Performing "scrub" (consistency checks) often means you're more likely to catch errors early. (this is another reason why you'll want, but ECC ram. as it'll tell you when you get bit flips in ram, which undermines on disk checksums)
Part of the reason why people choose raid6/z2 is because it takes a long time to rebuild an array after a disk crash. It involves reading all the data again and computing the hamming code to recover the lost data.
when you buy a job lot of disks, they tend to be the same batch, which means they could be prone to the same bug/defect. So this general means that multiple disk failure happen at the same time. having another parity disk means you can withstand more failure before total loss.
However, none of these mechanisms are a replacement for a backup. even if you have a 36 gig raid, you still need a backup. There will always be a time where something goes horrifically wrong and you need to get access to an archived version.
anyone who fights against this has yet to experience the fun of total failure.
>even if you have a 36 gig raid, you still need a backup
and a backup of that backup too.
I'm happy with many copies of my core files that I desperately need (photos and or stuff that gets me money)
I have my ZFS box, which is backed up to a remote disk miles away. My time machine has a few local copies too.
Just be ware, snapshots are not the same as a full backup.
They are brilliant, but not a backup.
Although I ran into a problem a couple of months after setting it up where the NAS became so slow, it was unusable. I saw that my IOWait was 100%, so I figured it was a disk, but nothing indicated a problem. Eventually I was able to get to a log that showed that one of the drives had some weird error messages, so I bought a new drive from Amazon that came the next day, pulled the drive, and replaced it and instantly everything was okay again.
I would have expected something on Synology's status programs to show a problem, but they were all green, so that was annoying.
> It's really convenient, ...
> ... would have expected something on Synology's status
> programs to show a problem, but they were all green,
> so that was annoying.
So perhaps not all that convenient.I went down the QNap path a couple of years ago, on the assumption it'd be robust, well patched, more convenient, and basic functionality would work / be tested. I was wrong on most counts, and am now basically scared off these low-end SOHO systems entirely.
For example, a while back I had to track down an issue on a server with Nagios constantly triggering memory low errors. Turns own that when you stat a lot of files, XFS will load all of that file information into cache in the kernel's slab. This causes some RAM stats to be skewed. This RAM will be instantly freed if needed, but some system stats count it towards "RAM usage."
My question is: How does one incorporate all such edge-cases into something that is user-friendly? How many system admins even know how to track down such an issue (in the absence of a flashy UI)?
Unless you want to vertically integrate the system from hardware => kernel => UI, then you're bound to have these sorts of issues where everyone is only paying attention with what's happening in their own little area of concern and multiple decoupled systems can end up interacting poorly (even when their local actions make sense to them).
Or was your NAS behaving subtly different from the standard above? (eg how ZFS cache doesn't appear as FS cache in ZoL despite freeing in much the same way as the above)
A case like these: http://www.newegg.com/Product/Product.aspx?Item=N82E16811219... http://www.newegg.com/Product/Product.aspx?Item=N82E16811219... http://www.newegg.com/Product/Product.aspx?Item=N82E16811163... http://www.u-nas.com/product/nsc800.html
Low power usage?
Well many Synology units use Intel Atom CPUs. Anyone can buy a small board that has these same Intel Atom CPUs and stick them in those cases.
Or make your server with NUC parts which use laptop CPUs. Like <15W parts.
Even higher end CPUs these days idle at really low wattage. So your NAS when idling wont use much power.
I just bought a QNap TS-251+ to replace my Microserver FreeNAS since I was tired of all the sysadmin work, needed something lower profile and wanted features like automatic Google cloud storage sync. It seemed like QNap has a boatload of excellent features, and I was really hoping it works without glitches. But now that I'm stuck with it.. we'll see...
After six months they were all reconfigured to expose a single iSCSI drive and a Linux box did everything else.
It's very well supported (running kernel 4.3 from testing now, the only thing that doesn't work is the crypto accelerator) and it gives you a lot of flexibility while keeping the advantages of the hardware (low cost, footprint and power consumption).
The hardware is decent for the price, it's just the software that's problematic.
My primary need was native (robust, sane, GUI-driven) iSCSI presentation ... which it completely failed to provide out of the box. That is, with a single iSCSI target, any significant activity over a GbE link would cause the QNap to crash. QNap support guided me towards a beta release of their software -- this solved the immediate problem, but I've never felt comfy upgrading (a one way process) from that release for fear of breaking iSCSI or other basic features. A less than ideal situation.
During that time I've had to replace two drives (I'm still running 4 x 2TB in RAID5), and rebuilds take me about 10 hours.
It's not a perfect device, but it still fits my needs for now. Eventually I'll probably build my own, likely using FreeNAS, but then I'd probably want to at least go with 8x6TB drives, and I'm not ready to spend that money yet.
My one complaint is that when I use the web-based file browser sometimes it tries to generate thumbnails for all the items in the current directory and ties itself up for a few minutes if there are lots. I've only encountered it a few times because I use SSH.
Also, having used a Synology I think it's a niche product. It's too powerful for people who simply want to put files and backups on their network. But for people who like to tinker and control, it's too restricted. You can basically only install software that has been ported to Synology. Getting it to do automated tasks the way you want to can be annoyingly complicated. I would recommend it to an advanced customer, who needs features like Owncloud or VNP without having the burden to maintain a system.
I wouldn't necessarily want to depend on it for something "mission critical" but it's a convenient solution along with online backup for media storage and security cam management. My only regret is not buying one with a more powerful processor since this one isn't really capable of transcoding media. Instead, I have all of my home media backed up to the Synology and run a Plex server on my primary desktop. The Plex server reads the media from the NAS and can then send to Chromecast or be accessed from Plex or Kodi running on my Android TV.
And built a multi VM box (with VM in VM support): https://pcpartpicker.com/user/okigan/saved/#view=nmQD4D
Btw, pcpartpicker was useful during my built, Node 804 was a case I considered, but wanted to have an External 5.25.
RAID6 rebuilds of a 12 4tb drive array take nearly a full week on my DS1812+
I'm in the process of moving everything to a OmniOS server and will not look back.
This is one of the actual reasons that enterprise drives can be better - almost all of them support an equivalent of TLER (time-limited error recovery), which is basically a programmable timeout on read/write errors.
Most parts of the IO stack, hardware and software, on every platform I've used deal a lot better with explicit errors than a device that hasn't appeared to vanish but is acting like a black hole.
Is there a synology solution for checksums to pevent bitrot which ZFS advocates talk about a lot?
https://www.reddit.com/r/synology/comments/3qpezu/btrfs_and_...
https://www.reddit.com/r/synology/comments/402m8d/so_i_was_g...
The higher performance models I would expect. DS716+ and various rack-mount models presently listed... I think you would be needing an Intel-based model at least to support this when DSM 6 is released.
This can only detect one bad drive, if you have two you are toasted.
I'm not 100% convinced myself that a 'majority wins' strategy like you described wouldn't be superior, but I can see why they decided otherwise.
It just overwrites the corrupt sector with a new value to make the parity data consistent. It doesn't know which is right or wrong even though technically with RAID6 it would be possible to determine.
I've been the eying the Lenovo Thinkserver TS-140: http://amzn.com/B00FE2G79C with a Xeon E3-1225v3.
Some comments state that it has an idle draw of less then 40 watts. Which is hard to believe. My Dual core intel atom box idles at about 50 watts (of course there is no difference between idle and full load draw with the atom, just super slow either way...)
http://ark.intel.com/m/products/59683/Intel-Atom-Processor-D...
I have an older low end AMD system I built with the intention of having it be low power. It draws around 40W at idle.
My estimates for my power usage are:
Chipset/motherboard: 15 watts
CPU: 6 watts
2 hard drives: 10 watts
really old crap PSU from 2002: 20 watts
Although I didn't measure each component by it self, all the power requirements and specs are posted online mostly. Except my really old PSU, I can only assume that is where the power is going. I probably should have bought a new PSU for the build, instead I bought $20 in adapters just to make the PSU work with the board :) But my killawatt meter clearly shows the box drawing 50-55 watts around the clock.And if you are nosy, this is what the dual core atom box runs: http://shorewall.net/XenMyWay.html
I got tired of having a separate web dev box and firewall box in my house. So I stood up Xen on a debian OS on the atom hardware, and now my firewall and web dev box are Xen guest. Make for fun Dom0 host upgrades when the internet is being provided by a guest that it is itself hosting...
I had one of the older Ion 2 Atom 330 boxes that were popular for media center PCs and it didn't really matter if it was made by nVidia either - power draw was pretty much the same no matter what.
Power bill for the apartment typically runs me ~80-100$ a month, (I'm mildly embarrassed that this is the metric I gauge my server by as opposed to true avg. wattage) not insane, higher than I might like though. I'll likely shrink to whatever the latest gen of that neat Intel mini-itx server board they recently released is, when the big build starts to go, but I'm not sure how much that will end up helping.
reports 30w when idle, 42w when reading from the array, 75w when transcoding in plex
My energy bills aren't crazy, and I leave it on 24/7
I am lucky though that here it is only $0.06. But in summer months it goes to $0.14 for every kWh over 600. Staying under 1000 kwh's a month is hard to do.
Anyway, as always, be cautious. And, when too many things are down, don't fiddle.
What did you expect here? 50% is typical trade off these days in disk arrays.
Personally on my ZFS based home built server I use mirroring, due to the well publicized issue with the extreme difficulty of increasing the size of ZFS's VDEVs. Which has the same 50% usable space reduction.
I had a low spec CPU in the NAS and went through hell and back to build/install/jail a few packages from source (along with their dependancies). It was a steep learning curve and wasn't terribly fun.
When it came time to add a second NAS, I chose Ubuntu and ZFS on Linux. It's been running like a champ for well over a year without a single hiccup. I don't think I've even built a single package ever. Best of both worlds, in my opinion.
One thing that is definitely true about FreeNAS is that you should read all the documentation and advice on the forums before you order a single part.
Even with ZFS as I understand it, you should just set up your storage pool then mirror it and be done....boom 50%
Specifically, the showoff thread: http://hardforum.com/showthread.php?t=1847026
It sums up to around $2600.
Full specs here: https://pcpartpicker.com/user/Viper007Bond/saved/xwP9TW
What if something goes bad with a drive? Well, ZFS to the rescue. Maybe even two.
What if the whole batch was bad?
I've built my NAS with not quite as much storage but more drives using drives from different vendors and different batches from different manufacturers.
However, given that the problems that arise with a bad batch are physical ones, properly burning in the drives does, I think, alleviate those concerns.
We burn ours in for 5-6 days[1] before we put them into production and history shows this weeds out the bad ones. If there was an entirely bad batch, we would catch it that way.
In my opinion, far, far more likely to find yourself with fake-new drives than with an actual "bad batch". We see that all the time from amazon sellers that claim brand new drives, but SMART says otherwise...
[1] with a zero tolerance policy for even the tiniest deviation from normal in the SMART output. Even a blip and that drive is out.
You're a very optimistic guy. That test would not have caught IBM deathstars or the more recent Seagate 3tb barracuda failures.
I lost 6 of the 8 drives in my NAS due to that last one.. luckily not all at the same time.
http://www.silverstonetek.com/product.php?pid=452
It's what I'm using right now for my server and I love it. I have it filled up with 6 drives and haven't had any issues with heat so far. Can't say the same about the ASUS P9A-I motherboard I'm using it with though...
https://amzn.com/w/MHNNS9EDAORX
Side note, I would love to have a list or something on Amazon because the wish list isn't right. A purchase list perhaps? It doesn't include the quantity by default when clicking Add to Cart. I had thought about adding in the Amazon Associates code but I've never actually had that make any money.
It would be great if whatever virtualisation is built into FreeNAS supports the AMD Turion II the N54L uses but support for AMD virtualisation sometimes seems a bit spotty (not supported in SmartOS for example).
RAIDZ-2 is recommended on lots of drives for the same reason RAID6 is, so that's not something unique to the FreeNAS community.
https://forums.freenas.org/index.php?threads/hardware-recomm...
I'd like to know when that will be. The forums on freenas.org don't seem to discuss specifics like that. FreeBSD 10.2 has been out for about 5 months, but FreeNAS 10 doesn't seem close to being released.
In another comment I mentioned that I'd like to know what, other than a GUI, FreeNAS adds to the base FreeBSD. It must be extensive since it takes quite a few months. But the whole activity seems quite cryptic.
At least they're patching the SSH CVE from today, but it's not just a pkg upgrade, it's a tarball that upgrades the whole root drive.
[] The answer to multiple independent requests about backing up the NAS to a USB enclosure, and met with a refrain of "USB drives are crap, so you're stupid for using them. You should back up your NAS to another NAS, that you never move." Fuck you. I know the limits of my failure model.
Dedup uses a ton of memory, and has a lot of "please don't do this unless you really know what you're doing" flags, but the compression is basically free.
Even with the use of mdadm, it doesn't provide near the sort of protection that ZFS does. Due to pervasive checksuming of data, ZFS handles the bit-rot and corruption that a dying disk does much better than the traditional raid that mdadm provides. For example if you have your disks mirrored or RAIDed, if the disk doesn't provide a read error, mdadm will pass the data back to the OS. Since the data isn't checksumed, there is no way for it to know if it needs to read from the mirrored disk or the parity drives.
- any LVM or mdadm mode with parity contains a functional checksum. To use it for data integrity, do a regular scrub. You should be doing a regular scrub with ZFS anyways, so ZFS's checksum on read doesn't add much except for slowing things down.
That doesn't work. Scrubbing the RAID can detect errors, but when they occur, the block layer has no idea which copy is the correct one. I haven't verified for LVM, but at least for mdraid, Linux explicitly does not make any attempts at recovering a 'correct' block even in cases where there is more than one copy. It just randomly picks a winner and overwrites the other versions. You still want to scrub for the error detection.
It's the successor to the 20-disk system I setup while I was still at my parents house, though that's a lot noisier (but fortunately lives in the basement service room) - downside is it's all based on 1.5 and 2TB disks, upside is RAIDZ3 is really nice to have.
As far as I know dedup scatters small data chunks by hash across the disk. Absolutely awful performance when your seek times are non-zero. I was looking at speeds in the single digit megabytes per second. Compared to saturating things just fine with dedup off.
I gave it a chunk of SSD for L2ARC and that didn't help either, and it never wrote more than a few hundred megabytes of data to it.
Currently I'm doing out-of-band deduplication on btrfs and it works great. Dedup uses the same copy on write as snapshots do, and causes zero problems.
There are some threads of overstatement of the necessity of ECC RAM or the opposite, but the above is the best advice. It might be more wise to invest your money more efficiently in backup resources than more expensive RAM.
There is no use investing money in offsite backups if the onsite backup is corrupted already from faulty RAM.
The most difficult thing about setting up a home NAS was swallowing the cost and reading about all the tradeoffs I'd inadvertently made.
The author was inexperienced and so chose FreeNAS for "ease of use". But what, other than a GUI, does FreeNAS really provide? I've never read a detailed explanation. The forums on freenas.org don't seem to address this fundamental question. Everything seems to be predicated on the choice already having been made, nothing helps people make the choice in the first place.
Perhaps FreeNAS is more aggressive than FreeBSD about patching storage related bugs?
Can anyone point to a detailed discussion about choosing vanilla FreeBSD vs FreeNAS?
It comes with a lot of features in the web interface that any decent FreeBSD admin could install and manage, and many out of the box settings are optimized for situations that are common for SOHO file servers. This buys a bit of time and makes it easier for others to maintain that may not be FreeBSD gurus necessarily.
There are a few tunings (sysctl stuff) and customized options specific to ZFS servers that FreeNAS offers as well. For example, most ZFS users don't have an encrypted scratch partition created on each drive in their ZFS vdevs, but FreeNAS creates them for you by default as a strong recommendation unless you explicitly turn it off with a slightly obscure setting in the web GUI.
I'm putting together a home NAS and am leaning toward FreeNAS. Someone else here mentioned waiting for FreeNAS 10, but it probably won't have any "gotta have it" features above what FreeNAS 9.3 already has.
The FreeNAS Mini (not mentioned in the article) seems a bit underpowered (Atom processor) but it's a turnkey solution for $1000 plus disks. I might go that way rather than trying to screw together a box by myself.
Otherwise, it seems quite neat!
I would love a rackmount for drive accessibility, but I can't justify 10x the case cost and additional engineering in making it as quiet and clean as my fractal design R4. Rackmount stuff just isn't designed to be either of those, high static pressure fans and expectation of pre-filtered air. (That said I'd totally be willing to pay ~500$ if such a case existed)
I picked up a 24 bay supermicro case on eBay for $265. This came with 24 hotswap bays and even a SAS2 expander backplane so I only have to connect 1 cable from the motherboard SAS controller to the case, and all 24 disks just work.
As far as making it quiet. Well that consisted of buying a $11 fan wall, installing 3 120mm Noctua PWM fans inside it and writing a simple script to govern the fan speeds based on the HDD temperatures to keep them in check with the minimum fan speeds necessary.
It's sitting in my bedroom next to my bed and I can hardly hear it.
I will concede the dust issue, but I have a normal air filter in my room and don't normally have dust issues with my computers. Maybe I clean them out once a year in the spring if they need it.
as for OP, i share your concerns - i'm skeptical of the reliability of consumer gear in an application like this, especially in the absence of an actual backup solution (maybe he doesn't care).
he calls it a backup server, but it's actively serving files.
When FreeNAS can handle that, automatically and on the fly, I'll switch to that.
- in addition to raid it's worth having automated off-site backup. the best solution i could find is duplicity as its encrypted and supports a bunch of backends.
- freebsd supports full disk encryption using geli. with some work its possible to make it boot (only) from a usb key, so some protection if the server is stolen. I believe newer versions of Intel Atom support hardware AES acceleration, so this isn't a large overhead.
- if the memory requirements of ZFS are too large (which to be honest for a soho application they are!), then you can use UFS together with freebsd software raid1 (gmirror)
I'll assume the media mentioned in the article that's stored is illegal. From the cost of that home server you could very likely legally watch everything and actually support financing the creation of new stuff. Even if that's not true, how many of the movies you watched do you watch more than once? And 24 TB? How do you find time to watch that much stuff?
this might be true if you live in the US, but in some other countries it is still hard to actually buy movies or tv shows.
as for the legality itself: in some countries downloading media itself for personal use is not illegal.
for example in switzerland, there is a media tax/fee included in the price of every device that potentially could store pirated materials. the income from this tax is then distributed to media producers and artists. in return, copying copyrighted material is tolerated for private use and consumption... this excludes redistribution and uploading.
I actually live in Germany, and you also can't get everything here, so this is true for me as well. Sometimes you simply have to accept that something is not available. It's not like there's not enough media out there.
> in some countries downloading media itself for personal use is not illegal.
But offering the download you use is still illegal. But that's all just semantics and doesn't matter that much. What I find more important is the moral issue.
> for example in switzerland, there is a media tax/fee included in the price of every device that potentially could store pirated materials. the income from this tax is then distributed to media producers and artists. in return, copying copyrighted material is tolerated for private use and consumption...
We have a very similar fee in Germany and it's there to allow normal copying in personal use (something that would be called fair use in the US). I guess the swiss fee is there for the same reason and is not there to allow people to get the majority of their media for no additional money. The fee most likely is not enough to finance the media producers and artists. Why spend it on hardware when you can give it to the people that produce what you enjoy?
Mainly I use my NAS as a bit of protection against losing those files that would be difficult or impossible to recover if my local storage in the workstation failed. Online backup is good too but for quicker or more frequent access, a NAS fills the gap nicely.
The other big storage hog is security cam video. There are occasional reports of burglaries in my neighborhood and sometimes I just like to know if a package was ever dropped off or someone bumped the car while parallel parking. So I picked up a couple of inexpensive IP cameras and rather than shelling out monthly for some unreliable and potentially insecure "cloud" storage plan, I use Synology's Surveillance Station IP cam software to manage recording, playback, and storage of camera footage. The amount of space on the NAS means I can easily keep a week or more worth of recordings from both cameras and with the actual NAS being stashed away out of easy view, it's unlikely to be stolen in the event of a burglary. Granted I could include those files in online storage but currently I don't have it set up that way.
Either way, the point is that many modern homes have plenty of sources of large files outside of pirated movies that can make a NAS useful.
If I don't watch it more then once, why would I keep it at all, or need a media server in the first place?
All your statements contradict each other.
Between me and my wife we have our phones, a SLR, and then there are other people's phones. Whenever they fill up I dump them onto my file server and delete from the phone; it's amazing how fast the terabytes get filled up. Nice problem to have I guess.
My ZFS pool is 12x4TB in RAIDZ2 and when I query zpool list I get: name size alloc free tank 43.5T 25.3T 18.2T
The size reported by ZFS itself is 43.5TiB which is close to the 48TB that 12x4TB is.