13 ms·
A modular, extensible DIY NAS
- charliebrownau 6y agoThose HP microservers are popular but have issues IME + Intel CPUS No 6th bay for proper Raid 5/6 system They take too long to release a new model No support for 2.5/5/10gbe onboard No support for Ryzen APU
- Mave83 6y agozfs works great, you have a lot of benefits on a nas like snapshots, scrubbing,...
- ed25519FUUU 6y ago> I hear and read conflicting testimonies about ZFS which supposedly handles data corruption better and will give it a try at some point. For now, I use md5sum to create and verify checksums of my backup .tar.gz archives and parchive to create error recovery files. I’ve written about parchive before and remain to this day a dedicated fan. I’m very surprised you went through the trouble of building such an amazing NAS and skipped ZFS! Definitely give it a try. It’s especially useful for combatting disk rot. Not to mention how easy it is to setup and use.
- selfhoster11 6y agoZFS adds complexity and licensing issues into the mix. parchive is a good way to separate different layers of concerns to achieve similar end point.
- julianwachholz 6y agoIt definitely sounds overwhelming at first but once you get the gist of it it is quite easy to manage. I even somehow managed to migrate my FreeBSD pool to OpenZFS without any major hurdles.
- ggeorgovassilis 6y agoThanks. I haven't tried ZFS so far for historical reasons: the post describes the latest evolution of my NAS; in fact, there were several hardware versions before with the hard disks being transplanted (and later upgraded) from the previous to the next. The filesystem structures are over a decade old, having been upgraded from ext2 to ext3 and now ext4. The next thing I will try out is dm-integrity.
- electricant 6y agoWhy not also have a look at btrfs?
- pronoiac 6y agoI bookmarked a ZFS-inspired storage system for preserving data integrity, and dm-integrity has a role there: https://insanity.industries/post/preserving-data-integrity/ https://insanity.industries/post/preserving-data-integrity/ Hacker News discussion: https://news.ycombinator.com/item?id=24372662 https://news.ycombinator.com/item?id=24372662
- MayeulC 6y agoMost filesystems that are designated as "modern" include checksumming, snapshots, cow, etc. However, do some include support for CRC? That would allow not only detecting, but also correcting bitrot. I assume that's what Raid6 does, albeit less granular than per file, and more aimed at recovering a full file than a few bits? Can anyone point me to a FS that supports it, or to the reason it's not done? As for ZFS, I think I'll keep avoiding it until it is mainlined. I don't really want to play that game.
- systemvoltage 6y agoI don't understand why anyone would do this instead of running FreeNAS. It comes with everything you need including ZFS pools.
- shock 6y agoBecause you can't easily change the size of the disks one at a time. How would you migrate from 4 x 4TB to 4 x 6TB disks by buying one disk at a time?
- yjftsjthsd-h 6y agoYou replace each disk in turn, then grow the pool, right? You don't get the increased capacity until you're done, but still workable.
- theshrike79 6y agoWorkable, but not the point. This is why I picked Synology as my nas. The Synology Hybrid Raid system let me just shove all my extra drives in the 4 bay NAS and still have parity protection. Then I just slowly upgraded all drives to the current money/capacity optimum one or two at a time. If I was made of money and could afford to upgrade all the drives in a pool in one go, I'd definitely go for ZFS too.
- hestefisk 6y agoYou don’t need to upgrade at once. You can upgrade gradually with the right config.
- hestefisk 6y agoYou gradually replace one disk at a time, resilver then repeat. ZFS automates most or all the work mentioned in this article and it comes with built-in bitrot detection. Btw I have run a NAS similar to this machine for 6 years now using FreeNAS. It’s awesome.
- Hamuko 6y agoThe problem with extensibility here is the fact that the enclosure is limited to four drives. Growing the capacity is quite hard but probably necessary considering the RAID 6 only gives you two HDDs worth of usable storage.
- ggeorgovassilis 6y agoI have worked around that with external USB drives. Which is very slow :-(
- ValentineC 6y agoDo you include your external drives in your RAID-6? That sounds dangerous.
- ggeorgovassilis 6y agoNo :-) The comment was about reshaping/expanding RAID. Since all 4 HDD bays are already taken, I usually connect an external HDD through USB for the reshaping.
- ksec 6y agoQnap OS Hero Edition [1], They said it will be coming to consumer version soon. Hopefully we will soon be able to buy a consumer NAS with ZFS without too much fiddling. [1] https://www.qnap.com/quts-hero/en/ https://www.qnap.com/quts-hero/en/
- julianwachholz 6y agoWhile I'm quite new to the DIY NAS, I have been running a FreeNAS instance for about a year and finally decided to switch to Ansible-NAS[1] about 6 months ago. It has all the features I'd want and seamlessly supports ZFS as my filesystem without standing in the way (since it's all just Ansible playbooks) [1] https://davidstephens.uk/ansible-nas/ https://davidstephens.uk/ansible-nas/
- davestephens 6y agoHey, thanks for the shout :-)
- vbezhenar 6y agoPlease note that modern microserver called HP Microserver Gen10 plus. Also to make Gen8 almost silent, it's necessary to utilize built-in fake-raid (not very convenient with Linux).
- justoreply 6y agoI don't think it is true: I have an almost silent gen8 and I'm not using the built-in raid
- ggeorgovassilis 6y agoI think there is some spread of the fans (case and power supply) used in the gen8. My gen8 is ok for an office or a large room, but too loud for a study room. Unfortunately the fan has a special pinout and cannot be replaced easily with a quieter piece: https://www.youtube.com/watch?v=ZPn8tXP-ZjI https://www.youtube.com/watch?v=ZPn8tXP-ZjI
- justoreply 6y agoah ok, because I can barely hear my fan (and I never changed it)
- vbezhenar 6y agoI checked with iLO and fan rotates at much lower speed with RAID configuration. I would be happy to run it without RAID, but it's too loud. I've found that solution on homeservers forum, so I guess, I'm not the only one.
- ggeorgovassilis 6y agoI think they fixed that in a firmware upgrade.
- shock 6y agoCan you please post(or send me over email) your BIOS/iLO versions? I plan do do a NAS build with a Gen8 and it would greatly help me to know what versions don't have the fan noise issue. Thank you in advance!
- lilSebastian 6y agoI'd love HP to release a Ryzen based MicroServer
- Havoc 6y agoAsus already has one (zen2) and Asrock is about to. I’d imagine HP is only a matter of time
- lilSebastian 6y agoCan you link to any or provide model names?
- Havoc 6y agoAsus one is PN50. 4300U - 4800U Unsure about asrock. I think they maybe have pivoted to a non renoir cpu
- dsr_ 6y agoThe PN50 is not a miniserver: total storage is an NVMe slot and space for a 2.5" SSD. It's a mini-desktop, successor to their A500. The A500 is very nice, though in practice it needs a USB3 hub sitting next to it.
- deleted 6y ago[deleted]
- lilSebastian 6y agoThanks, this looks like a really small form factor PC, not a server/nas.
- srle 6y agoI’d urge anyone planning on building or buying a home server to try out Unraid. It’s not free or open source, but it’s only $130 iirc for the unlimited lifetime license and it Just Works^tm. You install it on a USB stick, and the web interface has you up and running within like 2 minutes. The only hard rule is that your parity drives must be as large as or the same size as your data drives, but other than that you’re completely free to add or remove disks one, two, or ten at a time and all it takes is like 3 button clicks. The community is large so there’s always someone to help should you run into trouble but in general the whole thing is pretty brainless. Click button, server work.
- nine_k 6y agoThe whole point of the exercise is to have a device completely under your control. Closed source need not apply for security / trust reasons. Otherwise, e.g. Synology produces excellent devices, etc.
- nix23 6y ago>Synology produces excellent devices, Sorry but had quite the opposite experience even with the professional lines. The only NAS i trust is a Server (at least HP mini server) and ZFS. Stuff like unraid is for Windows mindsets, i don't trust HW-Raid and i especially don't trust Closedsource Software BS for stuff like that, exceptions are Enterprise stuff like EVA's or NetApp and EMC.
- nine_k 6y agoWhat is the point to run RAID6 on 4 drives, instead of RAID10? With both, half the space is usable, but with RAID10 read speed is twice as high, and resilvering is twice as fast. RAID6 makes sense for 5-8 drives.
- oarsinsync 6y ago> What is the point to run RAID6 on 4 drives, instead of RAID10? With RAID10, if the 'wrong' two disks fail, the array will go offline. With RAID6, any two disks can fail and the array will still be online. EDIT: The author has also demonstrated that they've gone through various growth permutations over the years. 4 disk RAID6 under md-raid has a supported growth mechanism, allowing you to add additional disks and have it restripe data automagically for you. It's not a good idea as far as performance is concerned, but for a home use nas that is primarily intended for streaming media, it's not a major issue, and enables you to grow to your heart's content (even if it is a bad idea, as I successfully proved growing from 4 disks to 16 over a few years, before respinning as multiple 6-disk arrays)
- electricant 6y agoActually, according to recent testing by ArsTechinca [0] performance with RAID the topic is more complicated. The testing is focused on ZFS but, quoting from the conclusion: If you're looking for raw, unbridled performance it's hard to argue against a properly-tuned pool of ZFS mirrors. RAID10 is the fastest per-disk conventional RAID topology in all metrics, and ZFS mirrors beat it resoundingly—sometimes by an order of magnitude—in every category tested, with the sole exception of 4KiB uncached reads. [0] https://arstechnica.com/gadgets/2020/05/zfs-versus-raid-eight-ironwolf-disks-two-filesystems-one-winner/ https://arstechnica.com/gadgets/2020/05/zfs-versus-raid-eigh...
- oarsinsync 6y ago> it's hard to argue against a properly-tuned pool of ZFS mirrors ... ZFS mirrors beat it resoundingly Emphasis on 'properly-tuned'. This doesn't hold as true as the OP states for the defaults (which is what the majority of home users will be using)
- ragnak 6y agoA NAS seems like a nice way to consolidate my photoalbums and have redundancy in terms of physical storage. But that whole cloud thingy is something I don't need, heck, I don't want! I would say that a good router is the way to go and I think I should replace the one my ISP has given me. Can anyone point me in the direction for a guide to a hardware router and appropriate firmware, so I can be sure to control what the NAS (or any other device within the network) can connect to on "the internet"?
- nsomaru 6y agoSounds like you’re looking for a router that supports OpenWRT
- ragnak 6y agoThank you, I'll look into it.
- deleted 6y ago[deleted]
- ValentineC 6y ago> Can anyone point me in the direction for a guide to a hardware router and appropriate firmware, so I can be sure to control what the NAS (or any other device within the network) can connect to on "the internet"? If you're looking to build something more powerful, OPNsense on an x86 box is the way to go. I also think that the interface is much more intuitive compared to OpenWRT's.
- mrb 6y agoBeen building DIY NAS servers for 15 years for my personal use. ZFS with initially OpenSolaris, then FreeBSD. Typically 5 to 7 drives in raidz2. I found it very strange the guy is happy with & measured 100 Mbps throughput over the network. Any 2+ drive NAS from the last 5 years should be able to saturate a 1Gbps link.
- julianwachholz 6y agoI think the OP means 100 MB/s and not 100 Mbps here
- ggeorgovassilis 6y agoI wrote "100 mb/s" - I now realise capitalisation is important.
- ggeorgovassilis 6y agoWell, there is also the LUKS encryption overhead which caps transfer rates from the RAID. I also run boinc (giving back to the community) which limits available CPU.
- vetinari 6y agoLUKS is capable of using AES-NI, and most CPUs are faster at AES-NI than two-lane NVMe drives at delivering that data. It should be absolutely no problem with SATA.
- nix23 6y agoHis CPU has no AES-NI, then it is a bit of a problem. But i was really astonished that a celeron supports ECC...quite nice ;) https://ark.intel.com/content/www/de/de/ark/products/71074/intel-celeron-processor-g1610t-2m-cache-2-30-ghz.html https://ark.intel.com/content/www/de/de/ark/products/71074/i... EDIT: He upgraded to a XEON..so forget all above.
- anilakar 6y agoI've relied on hardware RAID over one hardware failure, for the first and last time. We were running some services on a stack of older Dell servers with mostly identical hardware. The RAID controller and mainboard on one of them let the magic smoke out. We (a sysadmin team of three) promptly decided to move the RAID array to another unused server in the stack in order to avoid a lengthy reinstall and manual restoring of daily backups – this happened before the almost-one-click provisioning of devops and virtualization tools was the norm. The other server lacked the RAID license dongle that was on a pin header on the mainboard, so we just tried to cannibalize it from the server corpse that barely had stopped smoking. The new mainboard promptly rejected the license because the service tag differed, and the only way to change it was to install Windows 95 or 98 and run the tag changer tool. In addition, we had to downgrade the controller firmware to match that of the old one. One nightlong unattended rebuild later, the server was up and running the next morning. When we upgraded the server hardware a bit later, we migrated it over to mdraid and haven't had any problems with hardware failures since. Moral of the story: If you are depending on certain hardware features, you need to have a cold spare available with identical hardware and firmware. If you cannot afford one, it's better to either use a software implementation, have a really good service contract with the vendor or just let a VM provider take care of your infrastructure.
- oarsinsync 6y ago> Moral of the story: If you are depending on certain hardware features, you need to have a cold spare available with identical hardware and firmware. If you cannot afford one, it's better to either use a software implementation, have a really good service contract with the vendor or just let a VM provider take care of your infrastructure. +1 for this. Hardware raid absolutely has its place, but if you expect to be able to rebuild an array without restoring from a backup, you absolutely need to have spare parts that are tested in advance. Also, RAID is not a backup. RAID provides high(er) availability. You need to have backups still!
- anilakar 6y ago>Also, RAID is not a backup. RAID provides high(er) availability. You need to have backups still! Absolutely true. In this case we underestimated the workload caused by the service tag and firmware version issues and the fact that the new controller wanted to check and rebuild the array, when the disks themselves should have been fine. In hindsight it might have been faster to reinstall the OS and services plus restore the backups.
- 3guk 6y agoI've been using Unraid - https://unraid.net/ https://unraid.net/ - for the past few years now (after playing around with countless FreeNAS and custom setups). I'm really impressed with how stable it is - never had any issues with it and no dataloss, even with a couple of hard drive failures along the way. I know many of you will prefer to customise everything and take a deep dive into the way things are set up, but I really do enjoy the simplicity of Unraid.
- jnsaff2 6y agoSo I had this QNAP TS451+ sitting and gathering dust after a move. I had no interest in dealing with the terrible QNAP OS on it and wanted to do something open source. The only somewhat difficult part was preserving data from the old disks as QNAP has custom extensions to LVM or MDRAID which work nowhere else. So there were a few back and forth of removing a few disks from the pool, rebooting to a normal linux, formatting them without the custom garbage, booting back and copying over. In the end I decided to go with NixOS as I've already used it on my laptop/desktop for about 5 years. I also wanted a modern CoW file system and went with bcachefs. Getting it working with NixOS takes some fiddling, especially if you also want encryption but it works. It now runs samba, matrix-synapse and soon maybe nextcloud. Not quite there yet with everything but quite happy that I went down this route. The only thing missing from the HW side is an SSD, but the box has USB3 and UAS support so I might add an external one that bcachefs can use as a faster tier.
- nix23 6y agoRead "DIY NAS" and was thinking...sure a HP Mini and Freenas or pure FreeBSD or Xigmanas and what do i see, Ubuntu...but that's probably just because of the Bitcoin mining....with a Celeron... :)
- ggeorgovassilis 6y agoI upgraded to a Xeon because of LUKS encryption; Celeron doesn't have hardware support for encryption. Indeed I run a computationally heavy workload - boinc with protein folding and TB prevention :)
- nix23 6y agoAh nice...because of AES-NI! Being a longtime user/giver to World Community Grid.
- Qwertious 6y agoWhat's the power use on this? I would have thought x86 is a terrible choice for a NAS, as it only does the one thing and you don't need much processing power to do it (and implicitly x86's advantage lays primarily in being 1: fast and 2: compatible with x86 binaries, not in being low-power).
- StavrosK 6y agoI run a similar setup and run various things like Wireguard (so I can connect in), an HTTP server, Home Assistant for my house automations, automated nightly backups, etc etc. It's more than just data access.
- ggeorgovassilis 6y agoI upgraded to a Xeon processor because LUKS encryption was way too slow on the stock Celeron.
- fomine3 6y agoDecent x86 desktop computer (or server that uses same platform like this Microserver) consumes around 10-20W at idle that isn't "terrible". It also provides great performance. Atom is better for power consumption. Arm isn't option now because there's no equivalent parts.
- CaptArmchair 6y agoA quick word of caution: RAID is not a backup (as already mentioned elsewhere in the comments). Even more so in home solutions whether they are DIY or off the shelf. Why? Because storing a single copy of your data on a single local RAID array doesn't protect you from disasters such as fire, theft, accidental fluid spills, small children/pets, a power surge after a lightning strike, flooding, and so on. Basically, a lot of the stuff you'd fine in your home insurance policy. RAID doesn't guarantee data integrity either. You lost data after an unintended deletion or corruption by some computer program? RAID won't help you get your data back any more then a single disk scenario would. If the original file got overwritten and mirrored across the array, and all you had was that one copy, you won't be able to go back to that original. A more exceptional scenario would be a drive silently failing and RAID happily mirroring corrupted data across the entire array. Unless you use a filesystem that implements checksums - like ZFS - you wouldn't notice this unless it was too late. [1] [1] https://superuser.com/questions/112683/does-raid-1-protect-against-corruption https://superuser.com/questions/112683/does-raid-1-protect-a... I'm not advising against RAID. I think there's merit in using RAID when it comes to convenience and availability. Like, your data remaining available when you experience a sudden disk failure, and not having to spend hours or days getting everything back on line again. I'd say that RAID and backups are complementary. So, what about backups then? The 3-2-1 backup strategy is a good start: 3 copies, 2 local, 1 physically remote. That could be as simple as copying your drives every week to a separate HD or SSD drive, and every month to another separate drive which is safely stored outside of your home, i.e. a family member, friend, or at the bank. You could step it up a notch and choose to rsync your data across two connected drives, while rsync a third copy to specialized cloud storage service such as Borgbackup or Wasabi. Add in scripts that perform regular checksums control and reports the results daily and you've got a pretty solid solution. The final step is looking at your data and differentiating between the stuff you absolutely can't afford to lose (e.g. family albums) and the stuff you may afford to lose (e.g. software downloads). The goal here is to calculate the costs associated with required storage volume and bandwidth, and land on an appropriate backup solution that matches your budget and your needs. Finally, that's just safeguarding your data in the present and short term future. Neither RAID or backups are a long term preservation strategy. Which is a whole other can of worms, including such challenges as migrating obsolete data formats (Yeah, I have WordPerfect 5 and AutoCAD files in my own personal archive), or dealing with obsolete hardware I/O (Yeah, I have a bunch of old IDE drives in a cardboard box for which I had to buy an I/O converter).
- deleted 6y ago[deleted]
- FerretFred 6y agoI tried something similar after looking at what I really needed a NAS for: serving music and video to my home network, and via Wireguard VPN if needed. When I actually looked at the requirements in detail I set up a Raspberry Pi 4B with 2Gb memory, a 1Tb SSD connected via USB3/SATA and just installed Samba and MiniDLNA. Careful tweaking of the Samba config file ensured that it played nicely with all devices here, including Roku and Apple. It's simple, works well and is backed up to another, offline disk.
- PAPPPmAc 6y agoI built a similar little machine a couple years ago, mostly for storing my big archived files, being a borg backup target for my other machines, and subsequently mirroring said backups offsite with rclone. I went for a Chenbro SR301 case (I don't know what's changed in the still-available SR301 Plus model) + modest commodity parts over the HP or Supermicro turnkey boxes in a similar form-factor mostly because it takes standard components (mini-ITX boards, ATX PSU, standard fans... nothing I couldn't overnight from any major vendor for cheap) for easy replacement. It was also a little cheaper. I did btrfs "RAID10" instead of RAID. Hardware RAID is always a hassle, btrfs is in-kernel, and it has all the nice modern data integrity features (two spindle rule, I have a timer that scrubs it periodically for to verify checksums, etc.) - I've been really pleased with that except for the lack of good automated monitoring/notification tools for btrfs. Documentation I wrote at the time, more about the backup scheme than the machine at https://pappp.net/?p=1627 https://pappp.net/?p=1627 I'm still using that setup, eventually I'll need to swap some discs as capacities increase, but that machine has required zero fucking around since it was set up.
- fomine3 6y ago> The script is a bit more complex than that as device names are not stable and various error conditions need to be taken into account I always use /dev/disk/by-id/* .