helloSystem / helloSystem/hello
Use ZFS features (but simple!)
- Dominant language
- No language data
- Stars
- 2.5k
- Forks
- 59
- PR merge metrics
- No merged PRs in 30d
Description
ZFS is this incredibly powerful tool that 99% of "mere mortals" desktop users will never entirely wrap their head around.
Hence, we should pre-configure it in a way most suitable to desktop users, and provide some really easy tools (ideally with zero configuration) to do the most common jobs, like scheduled local snapshots, rollbacks from within the boot manager, and network backups.
## ZFS features I want to make use of
* Snapshots: Taking a snapshot should make a "cheap" copy of the _whole_ system one can easily revert back to, should things go wrong. It should also be possible to go back and forth between different snapshots.
* Boot environments: I would want them to work like "I can select every snapshot directly in the boot manager to decide which one to boot into at boot time". Ideally, every snapshot is a boot environment and vice versa. (I don't need subtle differences to exist between the two.)
* Replication (network backups): I want to backup (image) the whole system to a network device, which I can restore from ("bare metal") like with a Time Machine network backup. Doing subsequent backups should copy only what has changed ("delta backups"). PC-BSD had a graphical installer that could restore systems from network servers (e.g., FreeNAS) using ZFS replication over SSH. I would want to re-create something like that.
Ideally I want to configure as little as possible as I am not a system administrator but a mere end user (zero configuration).
## ZFS complexities to be understood/handled
While ZFS seems incredibly powerful, turns out it is also a lot more complex than needed, at least for desktop use.
Especially when plugging in and out external disks all the time, which I tend to do a lot. For example, I want to take the internal disk, put it on a SATA-to-USB3 adapter, and attach it to another target system, then copy stuff from `/home` on that disk to the internal disk of the target system.
### Datasets
There is a concept of datasets which is some weird mix between partitions (Mac "volumes") and directories but not quite. Why is there yet another concept that we need to deal with? I would probably like to have just one dataset per pool so that things become as simple as possible.
This stuff reminds me of the old times when people set up different partitions for `/home`, `/var`, `/usr` and so on. I never liked having to deal with more than one partition on a disk, because I never knew which one would need how much space over time. With ZFS datasets, I no longer need to define sizes for those, but for some strange reasons, it seems that people still are dealing with different paths individually. I am used to systems where everything is on one partition, which makes everything much simpler for me.
So, is there a way to make it so that there is just one "/" dataset and that is it? Especially I want the whole disk behave the same and not run into unintended surprises like the ones outlined below.
### Mounting external disks
When attaching an external disk with ZFS on it, then it doesn't just get mounted as an external disk. Instead, one has to "import the pool" (whatever that really means) and, suprise!, this mounts stuff over the booted system. For example, /home on the external disk doesn't get mounted under `/media/external/home` or something like it, but under `/home`.
This is referred to as "clobbering or replacing the current file system.
The behavior can be different for different datasets, depending on on whether some esoteric ZFS options like "canmount" have been set.
What is this good for? I find this dangerous, because it is very unexpected. How do I copy stuff from `/home` on the external disk to `/home` on the internal disk?
https://unix.stackexchange.com/questions/296972/how-to-mount-external-zfs-file-system-without-clobbering-altering-current-or-ext
### Boot environments
When I played with boot environments, I thought "it does not work" until I found out by watching a YouTube video that actually `/home` is not covered by boot environments by default. What good is that for? To me, this violates POLA. Why can't I just have the whole system, without any exceptions, covered by boot environments? What good are "backups" when they leave out the most important type of data, the user's own? There should be at least a BIG RED WARNING that boot environments do NOT protect user data. (Probably the inventors thought of boot environments of something that covers only system changes while leaving user data as-is; whereas I experiment with user-side settings a lot, like changing to different desktop environments and playing with their settings, and want to use boot environments for that.)
Contributor guide
Assessment
This issue has not been assessed yet.