understanding underlying file-system layout for transactional server

I am running the Transactional Server variant of Leap, just installed from the current distribution media, for version 15.4.

I am struggling to understand how the file system is organized physically on the Btrfs partition, and assembled into the various mounted parts.

In particular, I am unable to determine where the upper layers of /etc are stored. The fstab file shows the layered file system constituted of various directories under /sysroot, but I have found no actual directory of such a name within the various root snapshots or other subvolumes.

I believe that the mounted /etc is meant to contain the read-only versions of files supplied by the packages, overlayed by user modifications stored separately. Where are these modified versions physically stored?

They are subvolumes btrfs subvolume list / AFAIK /etc is writable but to ensure changes are captured run transactional-update shell make changes boot into new snapshot. For example I make changes to /etc/default/grub then use transactional-update grub.cfg

There is no subvolume specifically for /etc, according to my observation.

The /etc directory is overlay.

This is my /etc/fstab overlay snippet from MicroOS Desktop;

cat /etc/fstab 

overlay /etc overlay defaults,lowerdir=/sysroot/var/lib/overlay/55/etc:/sysroot/etc,upperdir=/sysroot/var/lib/overlay/56/etc,workdir=/sysroot/var/lib/overlay/56/work-etc,x-systemd.requires-mounts-for=/var,x-systemd.requires-mounts-for=/sysroot/var,x-initrd.mount 0 0

Yes, I understand, but where are these components physically? Where is /sysroot?

In /var/lib/overlay/ with sysroot = /

I see. Where is staging root file system created, with sysroot then being mounted below it?

In my case 55 and 56, see the output as did an update earlier…

transactional-update dup
Checking for newer version.
transactional-update 4.1.0 started
Options: dup
Separate /var detected.
2022-11-08 08:11:58 tukit 4.1.0 started
2022-11-08 08:11:58 Options: -c55 open 
2022-11-08 08:11:58 Using snapshot 55 as base for new snapshot 56.
2022-11-08 08:11:58 Syncing /etc of previous snapshot 54 as base into new snapshot "/.snapshots/56/snapshot"
2022-11-08 08:11:58 SELinux is enabled.
ID: 56
2022-11-08 08:11:59 Transaction completed.
2022-11-08 08:13:45 Application returned with exit status 0.
2022-11-08 08:13:45 Transaction completed.
2022-11-08 08:13:45 tukit 4.1.0 started
2022-11-08 08:13:45 Options: close 56 
2022-11-08 08:13:45 New default snapshot is #56 (/.snapshots/56/snapshot).
2022-11-08 08:13:45 Transaction completed.

Please reboot your machine to activate the changes and avoid data loss.
New default snapshot is #56 (/.snapshots/56/snapshot).
transactional-update finished

I am extrapolating a process to be similar to as follows:

  1. Create an in-memory file system.
  2. Create in it a sysroot directory.
  3. Mount the snapshot to sysroot.
  4. Mount the var subvolume to the var directory in sysroot.
  5. Mount the etc overlay to the etc directory in sysroot.
  6. Mount the other subvolumes under sysroot.
  7. Change root to sysroot.

Where is this process managed?

Maybe this explains better for you? https://github.com/openSUSE/transactional-update

I have not found an answer to the particular question in the referenced documentation.

I would create an issue on github, the developers should be able to clarify for you :slight_smile:

I thought the forum would be a more appropriate location for asking such questions.

The Forum is more peer to peer user support, for in depth, better to discuss with developers, there is also IRC, Mailing lists etc: openSUSE:Communication channels - openSUSE

In which case you depend on other users that are venturing into what you are doing. I doubt there are many.

For most projects, the issue tracker is used to report problems, whereas a forum, if one is maintained, is preferred for asking questions, regardless of the level of expertise required to answer them. It seems that the openSUSE community operates differently.

Correct, the openSUSE developers prefer the Mailing Lists, IRC. Some do swing by on occasions…

So asking the question through Github would be agreeable, or not?

Should be fine AFAIK.

You can of course ask on every expertise level. Bit it depends on your fellow members if they have any knowledge about the subject.

And part of helping here is pointing to places where you may get better and quicker help.