View previous topic :: View next topic |
Author |
Message |
minkanjin n00b
Joined: 29 Jan 2017 Posts: 42
|
Posted: Fri Sep 01, 2023 7:56 pm Post subject: Semi-immutable Gentoo |
|
|
I would like to propose that Gentoo adopt some of the features from immutable distros. I’m not sure if all the features are possible, but the ability to roll back to a previously working system should be doable.
The one option seems to be to use btrfs’ snapshot ability to create snapshots of the root filesystem. What I like about this idea is it is using a mechanism that is already there, and it deduplicates a lot of things. But it binds everyone to one filesystem.
The other option seems to be something akin to git. This seems to be the better option, since it is the most versatile and powerful, and can probably work with other filesystems.
I think we should go for the git method, where the administrator can periodically commit newly emerged packages to the git tree. We can look into an automated way of doing it, but I think first we need a manual way to do it. We will also need a way to distinguish between things added by emerge and things added by the administrator, and what and what not to commit.
One problem is the git commit history will keep growing, so there needs to be a way to prune.
The other is we need a way to deduplicate stuff, so maybe combine it with btrfs, or commit new stuff to a squashfs file and then mount multiple squashfs files as needed with some kind of filter.
We will also need a way to select a particular commit at boot. Maybe such a feature can be added to grub.
But before we tackle this, I think we first need to tackle the idea in another thread that aims to use gentoo to build other distros like Arch. We can get a lot more developers to help with Gentoo if we do that. |
|
Back to top |
|
|
szatox Advocate
Joined: 27 Aug 2013 Posts: 3477
|
Posted: Fri Sep 01, 2023 8:45 pm Post subject: |
|
|
LVM offers block-level snapshots, independent of filesystem.
If you want to keep multiple snapshots, and have some menu to select version to boot at runtime, you'll need a custom initramfs (way easier to modify than grub). It will also become unmanageable very quickly, but it is technically possible, and you can easily prune old data by just removing old snapshots (which also makes it more manageable again).
Squashfs can be used to back system root too, I have done it myself and was quite happy with the result, but I don't think it would meet your expectations. If you want to let all those versions live side-by-side for extended time, update them and take advantage of deduplication, install it on ZFS. Possibly with another layer of indirection, since you might run into some issues if you change_root into a subvolume and cut yourself off from the main volume on the device.
Quote: | But before we tackle this, I think we first need to tackle the idea in another thread that aims to use gentoo to build other distros like Arch. We can get a lot more developers to help with Gentoo if we do that. | And why would anyone want to use gentoo for building other distros?
My first choice for building arch would be arch. My second choice would be whatever I already have around.
You won't make devs interested in arch or whatever other distro switch to gentoo for sake of working on that other thing. Scratch your own itch instead of coming up with hypothetical itches someone else could possibly want scratched on the day all stars align. |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20540
|
Posted: Fri Sep 01, 2023 9:17 pm Post subject: |
|
|
Regarding immutability, I was thinking about whether or not using a custom profile could isolate a Gentoo "Base System," where the Base System would be made up of the stage tarball and as little else as possible -- RAID, LVM, networking?, firewall?, etc. After that, everything else is installed to /usr/local. Extending that could include separating Base libc from /usr/local libc. FreeBSD does this, I'm not sure about other BSDs. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
pietinger Moderator
Joined: 17 Oct 2006 Posts: 5269 Location: Bavaria
|
Posted: Fri Sep 01, 2023 9:38 pm Post subject: |
|
|
szatox wrote: | [...] If you want to let all those versions live side-by-side for extended time, update them and take advantage of deduplication, install it on ZFS. Possibly with another layer of indirection, since you might run into some issues if you change_root into a subvolume and cut yourself off from the main volume on the device [...] |
AFAIK our Gentoo developers prefer now XFS (has also COW and deduplication now). This was expressed by the change in the filesystem recommendation for the root partition in our amd64 handbook:
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Disks#Default_partitioning_scheme |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20540
|
Posted: Fri Sep 01, 2023 10:45 pm Post subject: |
|
|
I'd be curious to know the motivations of using XFS. RH switched to it at some point too. With SGI out of the picture, I wonder if it was available for "maintenance ownership " _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|