Openembedded Core Discussions
 help / color / mirror / Atom feed
* Issue: /var/tmp does not persist due to /var/volatile being tmpfs in fstab #scarthgap
@ 2025-03-18  3:17 Vish
  2025-03-18  4:48 ` [OE-core] " Chen, Qi
  0 siblings, 1 reply; 9+ messages in thread
From: Vish @ 2025-03-18  3:17 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1603 bytes --]

The current Yocto basefiles fstab mounts /var/volatile as tmpfs, which results in the loss of all files stored in /var/tmp upon reboot.

fstab in base-files:

https://git.yoctoproject.org/poky/tree/meta/recipes-core/base-files/base-files/fstab?h=scarthgap&id=3cc8c3520cedb66500757f843f757646da69ab30#n7

Since /var/volatile is a tmpfs, its contents are lost on reboot.

This commit might have introduced the issue - s ince /var/volatile/tmp is inside a tmpfs mount, it gets wiped on reboot, meaning /var/tmp is also cleared.
Commit - https://git.yoctoproject.org/poky/commit/meta/recipes-core/systemd/systemd/00-create-volatile.conf?h=scarthgap&id=3cc8c3520cedb66500757f843f757646da69ab30 ( https://git.yoctoproject.org/poky/commit/meta/recipes-core/systemd/systemd/00-create-volatile.conf?h=scarthgap&id=3cc8c3520cedb66500757f843f757646da69ab30 )

This commit links /var/tmp to /var/volatile/tmp
*Expected Behavior*

* /var/tmp should retain files across reboots, as per standard Linux behavior.
* Using a symlink to a volatile tmpfs directory contradicts this expectation.

*Impact*

* Any application expecting persistent temporary storage in /var/tmp will lose data after a reboot.
* This behavior may break software relying on the standard /var/tmp persistence.

Should /var/tmp continue following standard Linux behavior by *not being linked to /var/volatile/tmp* , or is this change intentional for specific use cases? If persistence is desired, this approach seems problematic.

Would appreciate input from the maintainers on whether this is a bug or intended behavior.

[-- Attachment #2: Type: text/html, Size: 3860 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-03-19 18:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-18  3:17 Issue: /var/tmp does not persist due to /var/volatile being tmpfs in fstab #scarthgap Vish
2025-03-18  4:48 ` [OE-core] " Chen, Qi
2025-03-18 16:11   ` Vish
2025-03-18 22:22     ` [OE-core] " Richard Purdie
2025-03-18 23:24       ` Vish
2025-03-19  6:57         ` [OE-core] " Alexander Kanavin
2025-03-19  9:11         ` Richard Purdie
2025-03-19 18:28           ` Vish
2025-03-19  4:55     ` [OE-core] " Niko Mauno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox