Building a home NAS on a shoestring budget with the Rock64 SBC (2018)
theramblinman.ca
theramblinman.ca
[1] https://www.friendlyarm.com/index.php?route=product/product&...
[2] https://www.friendlyarm.com/index.php?route=product/product&...
You can get a SATA hard drive adapter for the optical slot on many laptops. So you can put in two 2TB hard drives. My laptop only has USB 2.0, so that's a downside. But you have a built-in UPS (the battery), and my battery is a OEM high-capacity one which still works OK.
So the only new parts are the adapter (< $10 USD) and the SATA 2.5in hard drives. Just be aware of the height restrictions, some internal hard drive cavities on laptops can only take the 7mm or 9.5mm high drives, and not the 15mm drives that can be used on a NUC.
My old laptop is a quad-core AMD (which is OK-ish) and has 8GB of RAM, so it will be running some other stuff as well.
Personally, if I wanted to store valuable stuff locally, like photos, I'm guessing 250gb of space would be enough for a lifetime.
So what do people use these huge personal storage systems for?
I need more than 250GB just to download and install all the games I've bought on Steam at the same time.
I store the usual music (298GB), movies (3.2T) and TV shows (3.5T) which I think is what most normal people would do.
Where the less normal storage comes in is my own photos (5.2T) and videos (2.6T), an archive of all my "rewards" from Patreon (765G), an archive of English manga translations (5.8T), an archive of anime/manga fanart (7.2T) and a bunch of home security camera footage (2.2T).
In total I'm currently at 42T used but I see that increasing, hence the 96T of available disk.
You can find a lot of people doing archiving YouTube videos, educational content, porn, games, pretty much anything really on Reddit's /r/DataHoarder. Pretty much nobody is a professional.
Also a new game install plus dlc can be 50-100gb.
So the are valid reasons. But also Plex.
I have a 5TB capacity NAS, which ought to be OK for the forseeable.
Other folks I know with larger storage requirements tend to be into virtualisation tech/openstack etc.
HA! God no. Not for anyone that shoots RAW at least. I probably shoot 100Gb of photos a year. Plus I’ve got 300gb of music I’m not letting go.
1. Open source
2. 2GB ECC ram
3. 4 x SATA
4. Hackable GPIOs
The RockPro64 hardware is great. Very performant, especially when using the PCIe to SATA card instead of USB like the OP did.
[0] https://ameridroid.com/blogs/ameriblogs/how-to-build-your-ow...
When using this setup as a NAS, isn't your bottleneck the gigabit network from machine to machine? You'll saturate the 1 Gigabit link ( or even 2 Gigabit duplex ) before you can reach 5 Gigabits ( USB3 ) or 6 Gigabits ( PCIe )
I use 2 x 4TB disks in my homeserver, but I keep one online and have a script that brings up the other one periodically and rsyncs everything. This gives me a local backup, something RAID lacks, so I'm protected from fat fingering or accidentally deleting stuff. I also have very minimal downtime, because I can mount that drive in the place of the primary drive in just afew seconds.
I run xfs on the primary drive, and btrfs on the mirror, so I can take snapshots after I rsync and maintain differentials easily.
My point is, you should consider getting rid of RAID and just use the bare drive or LVS Volume.
tkaiser of the armbian project has a lot to say about this stuff. I find his posts in the cnx-software.com comments and armbian forums very helpful.
https://forum.armbian.com/topic/8097-nanopi-m4-performance-a...
ZFS on Linux isn't as memory-efficient as it would be on FreeBSD, which has a much closer file system cache / memory manager architecture to Solaris, but it works fine.
ZFS memory consumption really rockets when you want to use dedupe, which basically wants to store a hash of every block in memory. The sweet spot for its use is in things like multiple VM images - where there's a lot of duplication inside large files that are otherwise different. But there's often ways to structure things to gain back the same space, e.g. with stackable file systems.
Without dedupe, and for a NAS scenario where there isn't going to be a massive working set (typically source or sink for backups, streaming video, etc.), 4G has been more than sufficient for me for years.
If you're ok losing 24hours of data and not a performance junky, the backup plan becomes trivial and the raiding isn't really necessary.
To be fair, I don’t know about the capabilities of gluster, ceph, and minio.
https://en.opensuse.org/SDB:BTRFS
edit: I've had a couple hard crashes in this period. My homeserver's power button attracts little fingers.
If you're confident enough that your computer won't get stolen, burn, or zapped by a power surge, then you can keep the same hardware setup you have, but:
1. Use borg backup (or restic) instead of rsync (so that you can restore to any day in the past, not only to yesterday)
2. Disconnect the 'backup' drive when it's not being used (so that it's protected from malware or fat fingers).
Even better would be:
3. Have a separate computer host the borg backups, and have it run 'borg serve' in append-only mode (so that, no matter what you do the main computer, you cannot destroy or corrupt past backups).
Even better:
4. Have this separate computer in a different physical location (so that you're protected from fire, theft and the like).
Here is the documentation for borg serve with append-only:
https://borgbackup.readthedocs.io/en/stable/usage/serve.html
I only rsync every week, my data doesn't change often and if it does, I can trigger a manual rsync using the same script in my /etc/cron.weekly/
edit: I do use borg to backup to my cloud storage server, since it's encrypted.
Time4vps has super cheap storage servers, 1TB for about $20 a quarter. (my affiliate if anyone is interested; https://billing.time4vps.eu/?affid=1881)
Assuming a brushless motor and quality sealed ball bearings, it could be argued that the drive wears less kept spun up all the time.
My understanding is that spinning them down is primarily a power-saving measure.
That's automatic in virtually all HDDs.
"I was averaging 60-113mbps depending on the size of files being moved. This was a successful build in my mind! After selling my QNAP NAS, I came out ahead on my expenses for the build."
113Mbps is considered "high performing"?
"on a shoestring budget with the Rock64 SBC"
"TOTAL: $172.39 CAD before tax"
This is without the cost of the hard drives, doesn't seem ot include the cost of an enclosure, and results in:
* 1 Quad-core A53
* 2GB ram (the 4GB version is $45 USD without shipping, so it couldn't have been this one), which you can't ever change
* 0 SATA ports
* 1 USB 3 port
* 2 USB 2 ports
* 1x GbE
I would probably rather consider an HP Micro Server (e.g. https://www.amazon.com//dp/B079MFYDSL ), which for $282 provides:
* 1.6GHz dual-core Opteron
* 2 DIMM slots, 8GB DDR4 provided
* 5x SATA ports (4x in the disk bays, 1 in the optical bay)
* 4 USB3 ports, 2 USB2 ports, internal USB port
* 2x GbE
* 2x PCIe slots
* Hardware RAID support (I wouldn't use it, but it's available).
It would meet all of these requirements the poster had:
* Shoestring budget, under $300 preferred
* Scalable, not locked into a certain number of drive bays
* Gigabit ethernet
* USB 3.0 (for fast backups to my backup drives)
Preferred: compatibility with open source NAS offerings (OpenMediaVault, FreeNAS, etc.)
Low power usage (I don’t have high computing requirements for this system, so it doesn’t need to be driving up my electricity bill to run every month)
(I guess the Rock64 may have lower power consumption, but I don't think vastly lower).
I have a much older Microserver G7 (or NL54), which was much cheaper (I paid about $100), and it's great.
Edit: formatting
Just needed to rent, sorry, but why the heck do people frequently don't know there is a difference between lowercase b(it) and uppercase B(yte)...
I first ran FreeNAS, but eventually moved it to Ubuntu 18.04 so that I could run some containerized services on it (file sharing, Plex, and a remote virtual desktop).
16gb RAM is about right for running ZFS. 8gb worked OK, but I'd notice slowdowns from time to time.
If this machine ever decides to pack it in, I'll get a gen10.
That's only if you feel like tinkering, though; Ubuntu's a great choice as well.
I just use an old desktop with a pretty efficient CPU.
He also switched because of the noise of the previous setup. I feel like your suggestion doesn't cover that at all.
Except higher performance (which doesn't seems to be a requirement for him considering his QNAP gave much worse performance and it was still not an argument for new gear), what would he get from your 3x cost?
All of the always on parts of my home network are built out of compact low power parts that are faster than the rock64 and, no surprise it's expensive. I used a nano-itx celeron that's much faster than a rock64 and gives me 2 gbe links to bond. It would have cost him 10 dollars more and would use 2-5x the power.
This shit gets really tricky
Full build log: https://bburky.com/NAS/
I run ZFS on Ubuntu (ZFS is superb and one of the best things I've learnt in years) with a RAID 10 setup (2x2TB mirrored pair, 2x4TB mirrored pair). I'm actually just resilvering one of the 4TB drives right now as I finish migrating to them from a couple of old 1TB drives. RAM usage was high when I used dedup but now I've ditched that it's running much lower. I think the hardware will start to struggle once I get up over 10TB of usable space, but considering the cost of the actual machine I really don't feel like I've wasted any money at all.
I picked RAID 10 for this because I feel like with only 4 drives available it makes the most sense, weighing up resilver speed vs slightly better failure recovery if it was RAIDZ. On bigger servers I tend to go for RAIDZ3 instead.
For backups I use syncthing on various machines to copy data to the server, and then rsync the stuff I care about every hour (with a lockfile to stop overlap) to rsync.net, which then performs all the snapshots. I used to run borg but I swapped back to plain rsync because I felt more confident in being able to restore from it. rsync.net is fantastic. I'm currently storing about 1TB with them, and although it looks more expensive than other options for home backup, I feel like the lack of hassle is really worth it for me.
I'm not usually a fan of HP btw, but these little microservers are really well built and I actually ended up using a ton of them at work as well; we only ever had one failure (which I believe was due to PoE somehow being delivered to it, which was really fun to debug :|). When this one eventually can't keep up I suspect I'll just go for a newer model of it. The form factor is very convenient for the home, especially if you don't have the convenience of a spare room in which to put a rack.
It can be a little complicated depending on your Linux, but if you google "ILO virtual serial port" you should be able to find some decent directions.
I couldn't get the low voltage Xeons for a sane price in Germany, so I settled for a second-hand i3, which turned out to be more than enough for what I'm throwing at it.
I'm running ESXi as a hypervisor managing two Ubuntu VMs at the moment: a router and a fileserver managing two volume groups (6 TB dump storage for movies, music, etc. that's not too important and thus unmirrored, 2x2TB mirrored storage for photos and other important data that should not get lost). Thanks to the two network ports I can completely isolate the fileserver from the open internet as only the router VM has access to hat port. If I want to access my stuff from outside, I can VPN into the router and thus have access to the fileserver.
The next points on the list is Plex or something similar so I don't have to manually re-encode movies when my TV doesn't like the audio codec. Here, the i3 might struggle a bit, but we'll see.
As for the cost: I spent 200€ on the server itself, 88€ on 16GB RAM, ~20€ for the SSD case and power adapter cable and ~65€ on the SSD. The i3 was ~25€, so I'm up to roughly 400€ for the entire server (plus storage costs, but you'll have those anyways). Compared to what you'll get for that price it's an absolute steal, especially when you compare it with several "low budget"/homemade NAS builds floating around the net/youtube.
Bonus points: you can stack them on top of each other.
I haven't looked at gen 8 or 10 - where was 9? - since the arbitrary HP switch in policy to say you need an active support contract to download a BIOS update. For most people buying a MicroServer that's BIOS updates in first year only, which is far too hostile.
I'm more likely to self-build using a U-NAS 8 bay or something else with more bays next time around, or pick up a rack off ebay.
I used to run a dual network setup similar to that actually, and had my server's only access to the internet via a VPN tunnel on the router. I've stopped doing that recently as I got more interested in the link-aggregation setup, but I might do something more complex at the router-end to achieve a similar outcome at some point.
(1) I know it's old, but attempting a live upgrade to XigmaNas would be risky, so I'll reinstall it at the next maintenance stop.
(2) as files through NFS and SMB shares, not transcoded and streamed; ie, the player does the dirty work, not the NAS.
~2012 mini-itx AMD C60 does 60Mb/sec, at the time was ~60€
So I don't think we have answer yet as to why you wouldn't use USB.
So I don't think we have answer yet
as to why you wouldn't use USB.
The short answer is "USB has a widely known bad reputation"How did that bad reputation arise? A combination of factors:
* USB 2.0
* Platforms like Raspberry Pi, where both disk and ethernet are on the same USB link.
* Sellers marketing products with the USB link bitrate (5 Gbit/s) rather than the rate of data transfer from the ideal disk.
* Embedded platforms that don't have the performance needed to saturate a gigabit ethernet link (or 5 gigabit USB 3 link)
* Articles like this, reporting "60-113mbps" without going into enough detail to determine which components are the limiting factors on performance.
You don't want to do this. Buy a Swissbit Card of you don't want data corruption on your system.
So far, my experience has been SD cards faceplant by going read-only. They will mount rw, but a single write will cause a long hang, followed by a bunch of sd driver errors, and then it goes read only. It is still readable but will accept no writes, including blkdiscard (which gets translated into whatever the sd card equivalent for TRIM is).
I still wonder why EEPROMs don't have another pin for a high-voltage supply.
Especially for SSDs with multiple chips, would make sense to have 1 efficient voltage boost, instead of in-silico charge pumps on each chip.
[1] https://www.amazon.com/Samsung-Endurance-64GB-Micro-Adapter/...
Swissbit is one of the brands who deliver such. But there are other options as well [1]. I evaluated a bunch of ATP cards and thus far I'm satisfied.
[1] https://www.digikey.com/products/en/memory-cards-modules/mem...
To be on the safe side, I mounted /var on the enclosure, so the SD card in the CuBox is not stressed, and that has not failed once in 8 years. It wasn’t the cheapest thing (and it’s absolutely wasted on this task - it has good media capabilities and wifi that I don’t ever touch), but it sits in a small recess out of the way, and has been rock-solid. Every few months I dump all its contents to Glacier because I fear the enclosure will fail before the little box does.
I expect I’ll eventually replace the CuBox with a Raspberry Pi when it dies, but the overall model is sound, for something as simple as a fileserver. Just don’t open it to the internet - a lot of these small boards stop getting OS updates from manufacturers after a year or two, and their custom chipsets make it difficult to work with vanilla Linux - particularly if you need wifi or bluetooth.
This seems a bit too low in my opinion, I would expect an average consumer-grade NAS to perform a little bit better than that. Perhaps there was a bottleneck somewhere (e.g. network issues)?
I didn't test transfer speeds on my cheap Thecus NAS (with 2X WD Red 3TB in RAID 1) but now I'm curious so I think I will check when I get home.
What's your experience with NAS transfer speeds, HN people?
https://forum.libreelec.tv/thread/17540-early-mainline-image...
Not a deal killer, for sure, but it becomes a mess of cables quickly.
Tip: thread the shrinkwrap first before soldering. This will save you much swearing.
Look to be common for security cameras.
Like so: https://www.ebay.ca/itm/113713154440
https://linux.die.net/man/8/zfs
I personally value the data I store long-term more than this, but most likely would have played around with it when I was more cash strapped and daring/stupid about it.
I have hated all NAS that I've tried due to each one wanting to have more features than the next and all resulting in slow complicated messes.
EDIT: I guess no : https://borgbackup.readthedocs.io/en/stable/faq.html#can-pro...
But "recommended RAID levels are 0 and 1 under LVM and MD, and Linux MD RAID 10"[0]?
What you likely want is a 1, and if so it seems easier to keep two drives in your PC and rsync from one to the other[1]. (Also, such is the awesomeness of rsync that the syncs from one 10 TB drive to another literally takes seconds...)
I thought NASs' niche was more complex RAID levels which mitigate the data corruption our last-gen filesystems are still prone to. :D
0: https://www.crowdsupply.com/gnubee/personal-cloud-2
1: Cron "rsync -aPq --delete {$source} {$destination} >/dev/null 2>&1". (The scary delete flag deletes files on the destination that are no longer on source, handling renames and unwanted data as RAID would.)
It works great -- although it is as loud as a jet engine.
The ROCKPro64 with the PCIe slot has been out for a while.
It's been working perfectly. Sure, it's not the fastest thing ever, but mostly the limiting factor is our home WiFi, not the the RasPi.
EDIT: The USB drivers I use do not need external power supply, so the whole thing needs only two cables; power supply and Ethernet. Ethernet cable is not necessary if you are ok with WiFi speeds.
For context: MagFS (sold to EMC, as part of the acquisition of Maginatics) was a full-fledged cloud NAS (mostly following SMB2/3 semantics, although it was also mostly POSIX-compatible) and used cloud objects (e.g. S3 or OpenStack) for raw data storage instead of HDD blocks.
These days I'm running a SFF PC with 7TB of SSDs wedged in it, seems to be doing the job nicely.
I also have an old 10TB disk in a USB enclosure encrypted with LUKS that sits in my cabinet at work which serves as my off-site backup. Every ~6 months or so I bring it back and rsync it with a script and take it back to work.
Unfortunately, Apple doesn't even offer anything larger than 2TB, which is terribly small for anyone who's serious about photos or video. I have hours and hours of 4k60 (~400MB/min) video from events and vacations that I want to store. And this was taking using the smartphone in my pocket, I'm not a professional.
I checked Amazon and the hard drives were purchased on 10/8/2017 and they were $479/ea. The U-NAS case was $150 and the SSD was a random 120GB SSD I had after upgrading my desktop (it was the smallest of the "spare" SSDs I had in a drawer in my desk).
The 8TB HDD were Seagate Archive Drives that used to be the primary storage until I upgraded, so they became offsite backups. Those were purchased 5/8/2016 for $248. The external enclosures I use were $19.99 ("ORICO Toolfree blah blah" I can get you the exact model if you're interested but I assume you can find something newer and better).
So direct cost, I'm not really sure. A lot of it was "free" for me in the sense that it was spare hardware. But should be enough for you to guestimate what a setup would cost.
How long it will last is really hard to say. I monitor the disk health via smart and by keeping two copies I feel pretty safe. Luckily I'm also a Google Fiber customer (which means 1TB free Google Drive) and I sync a lot of critical stuff (software repos, personal photos, documentation like taxes, etc) to Google Drive for a third backup (following 3-2-1 rule). Right now I still have >1TB free on my primary 12TB drive, and the growth rate isn't very high. The most intensive thing I store is video from my iPhone, so that's really what dictates my rate of growth.