[feat] setup BTRFS root system as recommended for snapshots and rollbacks
Work is ongoing to enable filesystem snapshots and automatic rollback
snapper has support for btfrs
as well as for thin-provisioned lvm
-volumes containing filesystem of choice (covering the usecase of downstream kernels without btfrs support).
OpenSuse has used snapper, btrfs snapshots and rollbacks; in both community and enterprise distros, for years.
RHEL supports the use of snapper
and lvm
-volumes.
For easy btrfs
snapshots and rollbacks, it is recommended to make a flat subvol layout, with an unmounted parent subvol.
Currently, pmOS makes a single subvolume for the whole root+home filesystem. We don't want to roll back logs, and certainly not home
, as that leaves the system in an undefined state (read: borked) and may cause data loss. At the very least, it's a sticky situation to get out of (ref: my experience today).
@Arnavion has suggested changes to pmbootstrap
(in pseudo-code) that would address this subvol layout, here.
I opened this issue to further that discussion, here where it eventually would have to be implemented
*edit: related issues: #60