by notjulianjaynes · 5y ago · 0 comments
If anyone had some tips on how I could get into these machines it would be much appreciated.
Because right now i'm just using consumer hardware (an Athlon 200GE for its low 35W TDP, some cheapo RAM and a number of Seagate BarraCuda HDDs) in combination with Debian, which also runs on my other cloud servers. It's all mounted on my other devices either through SFTP or a Nextcloud instance that's also running on them for easier file replication. I don't even have RAID or ZFS/XFS/Btrfs file systems, just ext4 because any sort of clustering would introduce unneeded complexity to the setup - instead, a cron job with rsync backs the data from the "primary" HDDs to "secondary" ones every day in an incremental manner (well there's also BackupPC that does network rsync backups across servers).
What purpose would running a NAS oriented OS distro even serve, for simple uses cases like that? It feels like the current "ad hoc" setup is really affordable and easy to operate.
I think a SoC would also be nicely suited for this, as long as there is sufficient I/O capability. In regards to phones, however, i feel like drivers for obscure devices could probably become problematic quickly.
- ECC RAM, to avoid corruption on write
- Software RAID, to avoid data loss due to drive failure
- Some kind of checksumming and error-correcting filesystem, e.g. ZFS, to prevent data loss due to bad sectors
- Enough CPU to transcode media in real-time
- Vanilla distro with SSH, SMB filesharing, Plex, and networked printing
- A spare PSU in the closet
I explicitly avoid:
- Hardware RAID (unnecessary, expensive, harder to fix)
- Any OEM prebuilt NAS products (more expensive, less capable, less user control)
- Any specialty NAS-oriented distros or OSes (more feature bloat, bigger attack surfaces)
I use plain old Debian for my home NAS. I'd switch to OpenBSD in a heartbeat if it supported a checksumming and error-correcting filesystem.
Ok it's old but: raid is not backup.
I've personally worked for a small online shop that was selling digital items and shut down when their raid failed. Of course, they had ignored my warnings to build a mirror system or do copies on removable drives or ... anything resembling an actual backup.
Edit: that said, I do have a box that's pretty similar to what you're describing.
So you recommend ZFS but not TrueNAS? It more or less is FreeBSD with zfs and NAS-oriented defaults+utils. There's not much I'd count as bloat.
- power management
- semi-closed source applications
On power management, I don't use the NAS box continuously, and there can be long gaps between accesses. Having the box "sleep" for 95% of the day, and wake up the disks only for one or two bursts of activity is interesting to me.
I tried doing that with DIY solutions, including Raspberry Pi+SATA disk type of arrangements. Overall it didn't work great and was a PITA.
On the semi-proprietary apps, I am thinking about Synology's apps. I could totally live without them, but it's a nice addition to the package, they're easy to install, seem to be well maintained and work decently well.
Have you really managed to get that to work? I got a QNAP TS-230 a few months ago hoping I could do just that, but it turns out that even this smallest NAS box they are offering isn't really designed with this "occasional use" in mind. There are so many user questions about this (https://www.qnap.com/en-us/how-to/faq/article/why-are-my-nas...) that they even built a half-baked utility that's supposed to give you a hint which process is preventing the drives from going into sleep mode, but it's not a great help. I have disabled all services (photo indexing with face recognition and other such crap) except for the most basic ones, but still the drives are happily chugging along, flashing their LED every few minutes, not spinning down. I know that it's basically a Linux computer, and there are probably utilities I can install to diagnose the issue better than with the above-mentioned software, but isn't this something that's supposed to work out of the box, or at least be easy for an average user to accomplish?!
As you said, it's very low energy and zero noise (rubber feet and quiet fan).
It's also effortless to set up and run with their RAID system and syncing etc is very good. It'll let me know if there is a problem with a drive, it keeps itself updated and I've never had to reboot it.
I do not use it for Plex as it wouldn't be able to handle it. They are a bit under powered but they're very optimised for their main purpose, Network Attached Storage, and that's the most important thing for me.
It is also very neat and tidy, unlike most home made solutions.
just one nitpick with your setup:
if your primary hdd corrupts, rsync will not notice/care and corrupt your backup as well. zfs is all the rage because it aims to have two sources for the data aswell as a checksum, so it can tell which data-source is flawed AND fix it.
Right now i have incremental backups over the network with BackupPC: https://backuppc.github.io/backuppc/
That software solution sort of dances around the issue, because if any files were to become corrupted, i could just go back in time to their older versions, though that approach isn't necessarily good either - since that means having to store the original "full" backups for a long time and also takes up more storage, which i do for the essential data, but not the stuff that i'm willing to lose. And, since the data stored can be arbitrary and therefore checking for corruption would have to be done manually, there are serious drawbacks to that, in regards to even knowing when things have gone wrong.
Of course, there's also the possibility to use additional sources of redundancy, like versions within Nextcloud should the actual file contents of a particular version become corrupt, however for certain scenarios file systems like you've described indeed do become the way to go. Maybe not for every homelab out there, though.
Not (really) true, there is not much hard data backing this up as I see it, and for what there is, the retention would be 1+ year. The thread is not about offline backups, but an always powered backup server anyway. And SSD does make sense for a lot of reasons: HDD speeds are likely slower than local CAT cable, the higher IOPS helps on parallel workload cases, not to mention the way lower power draw and zero noise (no moving parts for the rest of the setup), compared to a chirping HDD.
Once you have usb debugging, I can recommend Vysor, super easy to use to control your phone from the pc.
I'd also recommend turning on Talkback (assistive technology) and VoiceAccess as that can help you use the device even if you cant see anything on your screen. That helped me a lot with my phone that has a broken screen where nothing but the touchscreen works.
Re-enabling USB debugging was the following process:
1. use USB-OTG to go into the bluetooth menu to connect a bluetooth device to.
2. enable usb debugging using mouse
3. connect to PC and use the bluetooth keyboard to allow USB debugging
4. use scrcpy to control the device
Obviously this only works reasonably well if you can see at least some portion of the screen.