Skip to content

[16.0-stable] pkg/storage-init: Fix CONFIG partition tmpfs size#5673

Open
rene wants to merge 1 commit intolf-edge:16.0-stablefrom
rene:fix-config-tmp-mount-16.0
Open

[16.0-stable] pkg/storage-init: Fix CONFIG partition tmpfs size#5673
rene wants to merge 1 commit intolf-edge:16.0-stablefrom
rene:fix-config-tmp-mount-16.0

Conversation

@rene
Copy link
Contributor

@rene rene commented Mar 13, 2026

Description

Backport of #5668

How to test and validate this PR

Run EVE and check if /config is mount with the correct size (1MB):

mount | grep "tmpfs on /config"
tmpfs on /config type tmpfs (ro,nosuid,nodev,noexec,relatime,size=1024k,mode=755)

Changelog notes

Increase the CONFIG partition tmpfs mount size from 256KB to 1MB to match the physical partition and prevent data truncation.

Checklist

  • I've provided a proper description
  • I've added the proper documentation
  • I've tested my PR on amd64 device
  • I've tested my PR on arm64 device
  • I've written the test verification instructions
  • I've set the proper labels to this PR
  • I've added a reference link to the original PR
  • PR's title follows the template
  • I've checked the boxes above, or I've provided a good reason why I didn't
    check them.

During storage initialization, the CONFIG partition is mount to a read-only
tmpfs to be accessed during runtime. Although the size of CONFIG partition
is 1MB, the script is mounting the tmpfs with only 256KB. This leads to a
subtle buggy behavior: depending on how much storage is used, some data
will not be accessible on the tmpfs. For instance, if we just create some
files and consume some storage on the physical CONFIG partition, during
run-time we might see files, like /config/server completely empty, even
though the contents are correct on the disk.

This commit fixes this bug by mounting the tmpfs with the same size of the
physical partition (1MB).

Signed-off-by: Renê de Souza Pinto <rene@renesp.com.br>
(cherry picked from commit 0c40792)
@rene rene requested a review from eriknordmark March 13, 2026 10:34
@rene rene requested a review from rouming as a code owner March 13, 2026 10:34
@rucoder rucoder self-requested a review March 16, 2026 11:15
Copy link
Contributor

@rucoder rucoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants