tmpfs not offered in partitioner during install nor afterward.

I may miss something, because I could not find a way to install “/imp” in tmpfs using the partitioner during the install process or afterward.

You can add a soft link

ln -s /usr/share/systemd/tmp.mount /etc/systemd/system/

but you need to remove the /tmp folder in the root partition.

Any comment is welcome

I have this /etc/fstab entry for /tmp

tmpfs    /tmp    tmpfs    size=25%,uid=root,gid=root,mode=1777 0 0 

Is that what’s missing?

It is my impressing that “/tmp” as “tmpfs” is the “systemd” default, but openSUSE overrides that because of its traditional handling of “/tmp”.

Yes, I would like to see an install time option to have “/tmp” using “tmpfs”.

Up to Leap 42.3 you have the possibility to have “/tmp” using “tmpfs”.
In the partitioner you have the option to add partition using tmpfs :

This options is also indicated in :

I use to use this way during install up to leap, 42.3.

It is what I said.
You can do that with the partitoner during install.
Up to leap 42.3.

But I did it with an editor.

Here the none answer :

Happy new year.

Hi, jcdole. You say in #1:

You can add a softlink...but you need to remove the /tmp folder in the root partition.

However, when I ran

ln -s /usr/share/systemd/tmp.mount /etc/systemd/system/

per the SDB:SSD Performance Doc, I didn’t have to remove the /tmp directory. The doc says:

It is highly recommended to put the most volatile parts of your data  on a TMPFS - this especially includes the /tmp directory. This directory  only contains temporary files which are deleted upon reboot. Having  this in memory is an excellent way to save your SSD some work. Note that  if you keep your system running for a long time, the size of this  directory (hence its memory usage) can balloon quite a bit. It is  recommended to log out of your DE, remove the content, and log in again  if you're experiencing memory pressure. 
Mount /tmp in a tmpfs filesystem: 
 # ln -s /usr/share/systemd/tmp.mount /etc/systemd/system/
 This will create the /tmp folder in memory on a fresh boot. 

Nothing about having to remove the /tmp directory. (Perhaps the behavior has been changed? I see removing /tmp is mentioned in the bug report. )

What I try to ask is ( and my post is a question ) :
During install , the install process create a folder ‘/tmp’
If the install process create a folder ‘/tmp’ in /If after first reboot you want to create a folder ‘/tmp’ using tmpfs

[INDENT=2]If you succeeded then [/INDENT]
[INDENT=3]you got two ‘/tmp’ folders ( But I guess it is not possible )
[INDENT=3]you first destroy the folder ‘/tmp’ in /
you secondly create ‘/tmp’ using tmpfs
[INDENT=2]If during install , the install process has created silently the folder ‘/tmp’ using something like tmpfs by the mean of systemd
[INDENT=3]it should be appreciated to be informed that there is nothing to do.
[INDENT=3]if the way that systemd use to manage the ‘/tmp’ folder authorize a simple command like [/INDENT]

[INDENT=3]it should be appreciated to be informed that there is nothing more to do.



Any comment is welcome.

I’ll just say that I have recently followed your suggestion on creating that symbolic link. And it has worked to give me a “tmpfs” file system for “/tmp”.


I think you are not fully understanding how mounting works.

A file system is always mounted on top of a directory. So the original “/tmp” becomes the mount point, and the “tmpfs” file system is mounted on top of that.

When you mount a file system on top of a directory, the root directory of that mounted file system becomes, in effect, the same directory name as the mount point.

If “/tmp” does not already exist, the “systemd” creates it when it first tries to mount the “tmpfs” file system there.

So I have created the suggested symbolic link. And then I reboot. And, after reboot, I check the output of “df” and see that I do now have a “tmpfs” file system mounted as “/tmp”.

I can then do:

mount --bind / /mnt
cd /mnt/tmp

I should then be looking at the old “/tmp” before the “tmpfs” file system was mounted on it. And I can compare the file times in the current directory with those of the mounted “/tmp”

ls -l
ls -l /tmp

That’s a good cross check that they are different directories. And since I should not need any of those older files, I remove them:

rm -rf *
rm -rf .??*

And finally, I undo the “bind” mount with

cd /
umount /mnt

and the directory (mount point directory) should now remain empty, because everything new goes to the tmpfs mounted “/tmp”.

Yes I agree.

Presently if the Opensuse install process mount ‘/tmp’ in tmpfs I have nothing to worry about.
If not, it seems sufficient to add a line in /etc

tmpfs   /tmp   tmpfs    defaults   0 0

or somethings like that.

Any comment is welcome

Yes, I have sometimes done it that way.