Re: [isar-cip-core][RFC][PATCH 00/10] Provide A/B snapshot support for persistent /var

Jan Kiszka
2025-01-30T16:11:31Z

On 30.01.25 10:39, Jan Kiszka wrote:
> This is a first attempt to provide a pattern and reusable recipes for
> saving and rolling back the persistent data during A/B updates. The
> obvious approach is using a filesystem that supports snapshots and
> linking those to the rootfs revision that is being booted. As first
> implementation, we are using btrfs. While the current implementation is
> built around btrfs, the concept should not. It may even work with
> device mapper snapshots.
>
> That said, the devil is always in the details. And even this "simple",
> btrfs-only implementation took some rounds to find a logic that neither
> piles up obsolete snapshots or deletes them prematurely. Still, careful
> review is highly welcome, specifically of patch 3.
>
> As we are currently having split /var and /home partitions, this does
> not cover anything in home directories. However, this will automatically
> change when [1] is addressed.
>

Forgot to mention some todos (which are related):
- handling of filesystem errors, likely by resetting to factory state
(blank /var)
- enabling factory reset via explicit requests

Jan

--
Siemens AG, Foundational Technologies
Linux Expert Center