This message was deleted.
# elemental
a
This message was deleted.
w
Hi @few-jordan-3349! The tmpfs is mounted by the immutable-rootfs module which reads the
/run/cos/cos-layout.env
configuration file. Here is an example how to generate that file with the size set to 25%: https://github.com/rancher/elemental/blob/6e4e5808bc781c920de360353c52738c6fd67272/framework/files/system/oem/01_elemental-rootfs.yaml#L31
👀 1
f
hi, ok, if i place the yaml in /system/oem like this:
Copy code
name: "Customize Rootfs Layout Settings"
stages:
  rootfs:
    - if: '[ ! -f "/run/cos/recovery_mode" ]'
      name: "Layout configuration"
      environment_file: /run/cos/cos-layout.env
      environment:
        OVERLAY: "tmpfs:75%"
is this env variable than applied for all tmpfs mounts? In my case i just want to increase /tmp. Would it be aslo an alternative to just use systemd tmp.mount and change size there?
Copy code
[Unit]
Description=Temporary Directory /tmp
Documentation=<https://systemd.io/TEMPORARY_DIRECTORIES>
Documentation=man:file-hierarchy(7)
Documentation=<https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems>
ConditionPathIsSymbolicLink=!/tmp
DefaultDependencies=no
Conflicts=umount.target
Before=local-fs.target umount.target
After=swap.target

[Mount]
What=tmpfs
Where=/tmp
Type=tmpfs
Options=mode=1777,strictatime,nosuid,nodev,size=75%%,nr_inodes=1m
thamks for the help!
additionally like in your example the default
OVERLAY="tmpfs:25%"
is 25% when i check the .env file, but the /tmp size is 50%. It seems that this env is not applied for /tmp?
w
Hmm, good catch! Seems that
OVERLAY
is only used for the mounting of the overlayfs.
Did you try the systemd tmp.mount unit above?
f
yes, it seems working. I could build with that systemd unit and i got now an increased /tmp mount. I do not see any problems, but i only did a quick test for this.
w
Nice! Did you write it in a cloud-init stage? or add it to the image?
f
atm copied in image
at what stage would be the best way to modify this unit?
w
Looking at our example in elemental-toolkit I would even say it's better to have it in the image and put it in /etc/systemd/system/tmp.mount
f
ok, than i keep it that way for now. Thanks for the help! If i get any problems with that i will text here.
👍 1
w
No worries! good work on the tmp-mount! Will look into adding some documentation for that!
🙌 1