Openembedded Core Discussions
 help / color / mirror / Atom feed
From: "Vish" <vs.yocto@outlook.com>
To: openembedded-core@lists.openembedded.org
Subject: Issue: /var/tmp does not persist due to /var/volatile being tmpfs in fstab #scarthgap
Date: Mon, 17 Mar 2025 20:17:01 -0700	[thread overview]
Message-ID: <ZACt.1742267821118468937.mtpo@lists.openembedded.org> (raw)

[-- 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 --]

             reply	other threads:[~2025-03-18  3:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-18  3:17 Vish [this message]
2025-03-18  4:48 ` [OE-core] Issue: /var/tmp does not persist due to /var/volatile being tmpfs in fstab #scarthgap 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZACt.1742267821118468937.mtpo@lists.openembedded.org \
    --to=vs.yocto@outlook.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox