Don't fret about ssd lifespan, unless you are planning on writing tb a day they will outlive your setup. I wouldn't personally use zfs for this, unless you have a lot of memory just laying around.
Selfhosted
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam posting.
-
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
No trolling.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
Fair about the SSD life. How would you go about achieving the frequent backups without zfs? I wouldn't want to implement it separately for every app I use, though I'm open to it if this doesn't work out.
I'll easily buy more memory if needed, the box now has 8GB and isn't struggling in any way.
I won't use fs snapsots as backups especially one as poorly supported on linux as zfs. I would go with external qcow disk snapshots and they can be pretty easily automated.
This is what I'm doing currently, but it's not really feasible to have the services shut down hourly for snapshots. This is indeed why I started looking towards filesystem-level snapshotting Obviously I will have other types of backups as well, I'm simply looking to have the on-the-fly immutable snapshot capability here somehow.
You do not need to shut down services to make snapshots, why would you?
Uhh, from most what I have gathered from self-hosting so far, doing that is not trivial as you'd need to flush the ram contents to disk first basically. I'm starting to realize though that the same holds equally for filesystem level snapshotting. What I'm really after is making my data live on separate pass through storage that has all the fancy filesystem level stuff so I can just relax about the VM backups.
You are overthinking it, without flushing ram everything works fine. OS inside VM would just boot as normal and that's it.
ZFS, hands down, it doesn't even begin to hurt the SSDs, it's basically the best choice, just try to not fill the whole volumes or it starts thrashing like crazy.
ZFS has encryption, but LUKS is fine too.
I've run Raidz2 for well over a decade, never had data loss that wasn't extremely my fault, and I recovered from that almost immediately from backed up snapshot.
Thanks! Can I ask what is your setup like? ZFS on bare metal? Do you have VMs?
Zfs on Debian on bare metal with nfs server. Edit: and it hosts the worker vms
Vlan for services with routed subnet
Sriov connectx4 with 1 primary vm running freebsd and basically all my major services in their own jails. Won't go into details, but it has like 20 jails and runs almost everything. (had full vnet jails for a while which was really cool but performance wasn't great).
1 vm for external nginx and bind on Debian vm on isolated subnet/Vlan and dmz for exposed services
1 vm for mailinabox on dmz subnet/Vlan
1 Debian vm on services vlan/net for apps that don't play well with freebsd, mostly dockers, I do not like this vm, it's basically unclean and mostly isolated.
Few other vms for stuff.
It's a Dell r730 with 2 2697(or 2698? 20c/40t each) with 512gb. Edit: v4 so broadwell
12x16tb hgst h530s with 2 nvme drives and 2 Sata ssds, somewhere in there is a zlog and l2arc.
Can't figure out how to fit a decent GPU in there so currently it's living on my dual Rome workstation, this system is due for an upgrade, thinking about swapping the workstation to a much lighter one and push the work to the server, while moving the storage to a dedicated system, but not there yet.
Love freebsd though, don't use it as my daily driver, tried a bit, it worked but there was just enough trouble to not make it work, but freebsd has moved on and so have i, so it's worth a shot again.
Decent i/O, but nothing to write home about, think it saturates the 10g but only just, I have gear for full 100g (I do a LOT of chip startups, and worked at a major networking chip firm a while) but it takes a lot more power, and i have PGE so I can't justify it till I can seriously saturate it.
Also I'm in process of moving to Europe, built a weak network here and linked via wire guard, but shit is expensive here and I'm not sure how to finish the move just yet, so I'm basically 50/50 including time at work in the valley.
Ok so wrapping my head around this, what I think I need to be clear about is the separation between applications and data. Applications get the nightly VM snapshot way of backing up, and data will get the frequent zfs snapshots (and other backups). Kinda what I tried to do to begin with, so I will look more on how to do this separation for the applications I intend to use.
Still unsure if samba is the way to go for linking it together on the same physical machine.
Should I just run syncthing on the bare metal host...? Will sleep on it.