Skip to content

u/leothrix

In this archive from Apr 2014 to Nov 2023

12
posts
132
comments
2
media
1k
score

Haha, thank you for catching that, I don't usually look at the other static pages, I'm impressed at your attention to detail. I've updated that page, I appreciate it (the change might take a little time while the CloudFront cache clears)

2 points

I think I've often conflated those two definitions of stability, I appreciate that comment. I'd agree that tends to be my experience; the OS is pretty stable but change is pretty constant.

Lately, I've sort of separated out my server applications into containers or sandboxed instances apart from the OS-level machinery. Thanks for highlighting that distinction.

3 points

This makes me anxious. What's some particular things to watch out for? Did you experience dataloss or was it just a matter of reconfiguration?

There's really not a diplomatic way to say this, but: gluster isn't very polished. There are a few of us on reddit that do ODroid gluster clusters, and threads like this one confirm that some modes like disperse volumes are pretty buggy, so I would steer clear of those sorts of volume configurations. As another example, gluster 7.x completely broke my setup - I had to rollback and fix my volumes, and things are fine again under 6.x, so the project apparently ships very broken releases occasionally. I have had data loss, but I could probably avoid it now with what I've learned.

What kinds of benefits do you expect in Ceph over Gluster?

I mention Ceph because the storage engineers I talk to just laugh when I talk about gluster, but indicate Ceph is much more mature and battle-tested. I haven't made the jump to Ceph because I'm still sort of nervous about running distributed storage, and if you don't use erasure encoding with gluster, you can always recover files since they exist as normal files on the underlying disks if things ever get really bad. It's sort of my last defense if things ever get bad, because distributed storage has proven to be the most challenging thing I've ever run.

I'm also pretty keen on helios64, but availability of the ECC model (which from my understanding is more important with ZFS) is going to take some time.

FWIW I run ZFS on an espressoBIN, which doesn't have ECC, and ZFS works fine - I think "ZFS needs ECC" sort of an endemic tale, because any filesystem will be more reliable with ECC, since data has to be cached somewhere before an fsync(). I don't think ZFS has dramatically different RAM requirements from any other filesystem, unless you make use of things like deduplication.

Also I really like the idea of not having a single point of failure in the NAS node in the inevitable need of restarts/reconfiguration of individual nodes - it seems nice to be able to take down the gluster nodes one by one.

I had the exact impression about running distributed storage - rolling maintenance, et cetera - and my ultimate conclusion is that has pros and cons, and isn't necessarily totally better or totally worse than a single-host ZFS pool. I do really like being able to update hosts without storage downtime, and it's much easier to grow volumes when your needs increase. On the other hand, I desperately miss advanced features of COW filesystems like ZFS (cheap snapshots, zfs send/receive, etc.) that I use heavily elsewhere, so there are tradeoffs with each.

1 points

I have a homelab that looks almost exactly as you describe: https://blog.tjll.net/distributed-homelab-cluster/

I opted to run storage nodes (6 ODroid HC2 SBCs) that run gluster, minio, and Elasticsearch separate from my compute nodes (ODroid MC1). The MC1 hosts are entirely stateless, each is identical mount-wise (they all have gluster network mounts for each volume in the gluster cluster).

The actual drivers that run gluster/the endpoint processes is up to you and pretty arbitrary - I run glusterfs from the Arch Linux ARM package (do not use 7.x) but run minio from a nomad job, it’s pretty equivalent.

The biggest problem I have right now is gluster: although it’s been okay-ish maintenance-wise, I’ve had to blow away and rebuild some volumes over time. I’d love to either investigate Ceph more, or build another NAS on a Helios64 and just run my nomad jobs from NFS mounts from a RAIDZ pool.

You touched on a few questions in your original post, so if there are specifics you’re curious about, I’d be happy to answer them for you.

3 points

To add another perspective here: I host lots of web-based services in my homelab on just a few Pi-style ARM SBC's. Allocating a VM per site feels like a tremendous amount of overkill to me - if you want some segmentation, maybe run them in containers, but certainly leverage a reverse proxy like nginx/traefik/haproxy to fan out your requests to wherever those backend sites live.

1 points

TBH I'm reluctant to run a server that I want stability from on Arch.

Is it stable for you? what problems have you had with it?

I actually used to run this NAS/hypervisor on FreeNAS, then CentOS 6, and now Arch. I chose Arch specifically because I didn't want the pain of upgrades (for example, moving from CentOS 6 to 7 wasn't simple to perform in-place) and wanted a rolling release. Every few years Arch requires manual intervention to resolve a breaking change, but think of if this way: you're either paying that rolling release tax intermittently every few years, or overhauling your setup for a major version update when your distro releases a new version.

I've had problems here and there: a dkms package might not work with a kernel update, which makes the ZFS raid disappear, or systemd might make a breaking change, which requires a tweak somewhere in /etc/systemd/.... I also have btrfs problems, but that's a burden I willingly took on because I wanted to experiment. These sorts of bumps might crop up every couple of years, maybe less frequently.

From a maintenance/stability perspective, after maintaining this setup (and in comparison to CentOS, FreeNAS, NixOS, Fedora, and others), I prefer Arch to other distros for the following reasons:

  • If you're building modern infrastructure, I hate fighting old packages and libraries. Updates to projects like ZFS on Linux, Docker, btrfs, or python/ruby/node can make a big difference, and older/further behind distros might wait a long time to get those improvements. With Arch, you wait a very short amount of time for those updates.
  • My typical workflow is to use aurutils/aurto to plug into the AUR packages I want, which make them available as a normal repo. Then, I run through updates maybe every 2 or 3 months. This has been very stable and a pretty reliable pattern to follow. I even run linux-lts to avoid bleeding edge kernels and some more stability, and that works great.
  • The minimalism of Arch means there's less complexity and things to break, hence more stability. For example, in CentOS or Ubuntu I invariably have to install the EPEL or some PPAs, respectively. Arch has a wide upstream repo, or just something in the AUR, and it's always just $latest_version. Less fighting versions.

If I were to greenfield another NAS, I'd do Arch again. Probably not for everyone, but there's a simplicity I've come to appreciate by dumbing it down. As a concrete example: I've used ZFS on Linux via the FreeNAS/Nas4Free web UI, and by managing it from the shell on Arch via zpool/zfs. I setup a snapshot and remote backup scheme with ssh on the latter with a few tiny scripts and systemd timers on Arch.

2 points

I suppose I’ll be the “Arch btw” guy, but: I’ve done Arch+ZFS+Docker for many years with success. Note that most of the ZFS related packages live outside the official repos (either in a community repo that ships you precompiled packages, or just doing it yourself from the AUR) but it’s really nice to have very up-to-date ZFS packages. Either precompiled modules or dkms packages both work great.

Docker/whatever else is typically well supported. It’ll be a little more hands on than something like Rancher, but it’s also a simpler system, which means it’ll be easier to debug and maintain.

2 points

I opt for the homelab option (although I do run one Ramnode VPS for a mailserver) but mitigate power costs (and, to a significant degree, hardware costs) by running cheap ARM SBCs. I run a ton of stuff (probably over 30 services spread across my cluster) and the reality is that for a homelabber, I don’t think you need the insane amount of power that you’d get with a half-filled server rack. For context, you can run an ODroid HC2 for tens of dollars per year. I think last I measured via kill-a-watt, my entire power draw (which includes ~20 hosts, an x86_64 machine, switch, and UPS) might cost me $200/year in power.

2 points

Typically you can run lots of services on a single RPi; the modern pi revision has sufficient cores to operate simultaneous services without many problems. I run many services on older armv7 boards, which are less powerful than a modern pi.

However, you do need to factor in what types of services you’re trying to co-locate. Although a DNS server is not very demanding - especially in the case of a home network - zoneminder can really push a machine, especially once it starts crunching data for motion detection, et cetera. My hunch is that while you could run a DNS server alongside some other lighter daemons, you might hit performance problems running zoneminder.

1 points

I run Arch on my servers and have done so for... 5-ish years now? I started with my first installation on an old HP N40L server moving from FreeNAS to Arch + ZFS on Linux via DKMS and it's been a good experience. The most telling aspect of my setup is that I'm able to maintain nearly 20 machines total with Arch and don't have the typical "but don't upgrades break you" FUD that I often hear about.

My network includes:

  • The old HP N40L. I used a btrfs root for this and would never do so again, btrfs has caused me worlds of pain. This is been running arch the longest (>5 years) and is the same installation, so the rolling upgrade model has been wonderful in that regard (no scary distribution upgrades). I've avoided most issues by staying up-to-date on Arch bulletins (use pacmatic to see them inline, it's what I do).
  • I have Arch on 3 Raspberry Pi's ranging from Model A to Model B+ (Arch Linux ARM, technically). They range from Kodi media centers to 3d printer servers with Octoprint.
  • Two espressobins, one is my router and the other is a backup host, again both are Arch Linux ARM.
  • I run a GlusterFS cluster on 4 separate ODroid HC2s and one arbiter node on an ODroid HC1 (all Arch Linux Arm).
  • I have a 4-node ODroid MC1 cluster on Arch Linux ARM as well.
  • One ODroid C2 as a Kodi frontend to my media library.
  • One ODroid XU4 as a printserver/general-use server.

As you can tell I heavily rely on ARM-based systems over x86 ones, but the maintenance has been pretty similar to my N40L x86-based machine. I used to be heavily dependent on CentOS, but the "reinstall to get to 7" soured me on the experience so I went rolling-release-or-bust and been very happy with it.

If you're considering Arch as a server OS, the advice I would give is:

  • Always, always, always use pacmatic instead of pacman. It will help you keep up with .pacnew updates, notify you about important Arch news, and is essentially the same CLI interface as vanilla pacman.
  • Use aurutils as your AUR helper. I discovered aurutils late in the game, but it is by far the best AUR helper if stability and reliability is important to you. You can build AUR packages in a clean chroot, then when you're ready to do a system upgrade, your AUR packages are just a normal repository during upgrade time, no stop-and-confirm or other nonsense.
  • If Docker is how you want to run your apps, that's fine too. Personally I use nomad with my MC1 cluster to run my apps, which means I can bring nodes down or kernel upgrades/etc. and my workloads will migrate to live hosts so I can do maintenance whenever I feel like it without interrupting my services (I know about docker-swarm, but I don't like it).
  • Backups are obviously important, but when I'm feeling lazy I just drop etckeeper on the host to backup /etc and move on.

I'm a happy Arch as a server OS customer, let me know if you have questions about it.

11 points

Other people have said it, but I hope another comment can save you: avoid btrfs if you can, please.

I’ve run btrfs alongside ZFS for over a decade and btrfs is an actual, living nightmare. Fragmentation, shoddy RAID, and broken tooling is just some of the pain you’ll go through compared to the sane and solid solution that ZoL is.

If anyone has doubts about these claims, I’d be happy to defend them if it would sway anyone to choose ZFS.

2 points

One particular case that illustrates more complicated use cases is event-driven service activation: for example, I've used device and service units to start a process to rip an optical disk when a disk was inserted with a really simple .device relationship. Contrast this with writing a udev rule, and the device/unit approach ends up being a lot simpler to understand and use.

6 points

You can always set up syslog forwarding for that, can't you?

Definitely, but I'm referring to cases in which you've got an unmounted disk for a crashed system you're doing something like forensics on. Pulling binary journald files of a disk like that is super inconvenient to work with when you're looking for a problem.

DBus, however, really is cancer, and Lennart is a fucking asshole. Won't argue with that. But until someone finally gets around and writes a proper DBus and systemd replacement, it's still the best we have.

I'm glad somebody else feels the same way; DBus is a pretty horrid tangle and Lennart's behavior can be pretty baffling.

4 points

I've coded against the systemd dbus APIs, written probably hundreds of unit files, and worked heavily in the guts of systemd-journald, so I think I can offer some perspective from the technical side.

systemd, like any technical solution, has good and bad parts. systemd in particular is so polarizing because, aside from the kernel itself, it's probably the most pervasive part of the system, and thus effects so many people. Lots of people cite its additional complexity, but it's a double-edged sword: more complexity means more things can break, but you can also do much more with it.

The following bullets are mostly compared against SysV init since it's the only related init system that reached the level of adoption that systemd has (yes, I know s6/openrc/daemontools are useful, too). Some of the high-level benefits of systemd I'd note are:

  • Real process management. In SysV init scripts, there's little if any standardization around a) how PIDs are managed, b) how process signaling happens, c) zombie/orphaned processes are handled, and d) how processes are kept alive. systemd gave us a system flexible enough and powerful enough to take any daemon and make it stay up, stay tracked, and easier to manage. I'd lump making cgroups/resource constraints easier to use into this category as well.
  • Dependencies. This is one of those two-edged swords, but the positive is that we can finally express things like, "If my backup drive isn't mounted, don't run my backup software".
  • Programmability. systemd actually exposes an API that you can query for unit state, logs, and so on (along with a configurable permission model). This isn't immediately useful for end-users, but it's essential if we want to write higher-level interfaces that can interop with hosts.

There's tradeoffs, though.

I'd note that I was initially pretty anti-systemd, but I've accepted it as the best solution we've got and tried to help steer it towards the type of tool I'd like to use with upstream bug reports/issues. As backwards as the public development of systemd can be at times, open source development can be pretty harsh and I do hope that they succeed in making both systemd and the environment they develop it in better.

89 points

As others have mentioned, static site generation is extremely convenient if you're already savvy (i.e. a developer). The fact you're impervious to any vulnerability inherent to dynamic sites (such as SQL injection) is a huge from a maintenance standpoint, and you never really have to worry about speed.

Personally, I use jekyll for site generation, Discourse to inject comments into each post, and host it on S3 which runs maybe $0.40 a month in storage and transfer fees.

3 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.