Composefs backend: /var unmount fails (at first)
- Lingua principale
- Rust
- Stelle
- 2.3k
- Fork
- 230
- Merge medio
- 3g 3h
- PR unite (30g)
- 36
Descrizione
I think this is a systemd shortcoming but one the project should be aware of. I tried to start a discussion here: https://github.com/bootc-dev/bootc/discussions/2333 and after messing with it a lot came to the conclusion there is an issue.
When using composefs, systemd fails to unmount `/var` (I think it later successfully unmounts it during the shutdown/ramdisk phase).
On standard Silverblue installed with bootc it works fine.
I believe its because systemd is not aware of `/var` so much when using pure composefs.
with Ostree
```
$ cat /run/systemd/generator/var.mount
##
# Automatically generated by ostree-system-generator
##
[Unit]
Documentation=man:ostree(1)
DefaultDependencies=no
ConditionKernelCommandLine=!systemd.volatile
After=local-fs-pre.target sysroot.mount
Before=local-fs.target
[Mount]
Where=/var
What=/sysroot/ostree/deploy/default/var
Options=bind,slave,shared
```
With composefs (pure)
```
$ systemctl status var.mount
● var.mount - /var
Loaded: loaded (/proc/self/mountinfo)
Active: active (mounted) since Mon 2026-07-27 13:05:52 BST; 5min ago
Invocation: 2f58249fc3cb42b5a7a3082a8853152d
Where: /var
What: /dev/vda2
```
With composefs it has to learn about the mount retrospectively from `/proc/self/mountinfo` whereas something has generated the mount already for ostree.
## Workaround
Create: `/etc/systemd/system/systemd-journal-flush.service.d/override.conf`
```
[Unit]
Requires=var.mount
```
Most other workarounds for general `/var` not unmounting properly dont seem to work.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia riproducendo l'avvio di pure-composefs e confronta il comportamento generato di /run/systemd/generator/var.mount con la voce in /proc/self/mountinfo. Leggi la discussione collegata ed esamina il workaround systemd-journal-flush.service.d/override.conf. Il lavoro è completo quando sono state stabilite la causa e una correzione o limitazione appropriata a livello di progetto, e /var viene smontato correttamente senza il workaround se è possibile una correzione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Ambito
- operating-systems
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 38/100