Mailinglist Archive: opensuse (1239 mails)

< Previous Next >
Re: [opensuse] How should one make /media a tmpfs under 12.3?
  • From: "Carlos E. R." <robin.listas@xxxxxxxxxxxxxx>
  • Date: Fri, 28 Jun 2013 20:38:12 +0200 (CEST)
  • Message-id: <alpine.LNX.2.00.1306281929220.15368@Telcontar.valinor>
Hash: SHA1

On Friday, 2013-06-28 at 12:59 -0400, Anton Aylward wrote:
Andrey Borzenkov said the following on 06/28/2013 06:11 AM:
On Fri, Jun 28, 2013 at 1:50 PM, Carlos E. R. <> wrote:

So long as it is in /etc/tmp*.d/<whatver> or the /usr/lib equivalent it will be recreated by systemd-tmpfiles on every boot. As the man page says, you've read that, I presume, if you don't want that action you symlink the relevant filename to /dev/null.

I don't understand this. Symlink /media to dev/null?

Carlos, the only way you will stop that is to remove the relevant file or symlinking it.

If you want /media to be a tmpfs as is

# mount | grep tmpfs

devtmpfs on /dev type devtmpfs (rw,relatime,size=1242868k,nr_inodes=209865,mode=755)
tmpfs on /dev/shm type tmpfs (rw,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,mode=755)
tmpfs on /var/run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
tmpfs on /var/lock type tmpfs (rw,nosuid,nodev,relatime,mode=755)

/run then look how /run gets created.
Its done with systemd, of course :-)

That is precisely what I did. I looked some documentation, which I did not comprehend properly, then did:

grep: /*.conf: No such file or directory
/usr/lib/tmpfiles.d/clamav.conf:# clamav needs a directory in /var/run:
/usr/lib/tmpfiles.d/clamav.conf:d /var/run/clamav 0755 vscan vscan -
/usr/lib/tmpfiles.d/legacy.conf:# systems. /run/lock/subsys is used for
serializing SysV service
/usr/lib/tmpfiles.d/legacy.conf:# /run/lock/lockdev is used to serialize access
to tty devices via
/usr/lib/tmpfiles.d/legacy.conf:# changed for openSUSE : only /run/lock should
be available
/usr/lib/tmpfiles.d/legacy.conf:d /run/lock 0775 root lock -
/usr/lib/tmpfiles.d/legacy.conf:#d /run/lock/subsys 0755 root root -
/usr/lib/tmpfiles.d/legacy.conf:#d /run/lock/lockdev 0775 root lock -
/usr/lib/tmpfiles.d/nscd.conf:d /var/run/nscd 0755 root root
/usr/lib/tmpfiles.d/screen.conf:# Screen needs some files in /var/run:
/usr/lib/tmpfiles.d/screen.conf:d /var/run/screens 0755 root root -
/usr/lib/tmpfiles.d/screen.conf:d /var/run/uscreens 1777 root root -
/usr/lib/tmpfiles.d/systemd.conf:d /run/user 0755 root root ~10d
/usr/lib/tmpfiles.d/systemd.conf:F /run/utmp 0664 root utmp -
/usr/lib/tmpfiles.d/systemd.conf:d /run/systemd/ask-password 0755 root root -
/usr/lib/tmpfiles.d/systemd.conf:d /run/systemd/seats 0755 root root -
/usr/lib/tmpfiles.d/systemd.conf:d /run/systemd/sessions 0755 root root -
/usr/lib/tmpfiles.d/systemd.conf:d /run/systemd/users 0755 root root -
/usr/lib/tmpfiles.d/systemd.conf:d /run/systemd/shutdown 0755 root root -
/usr/lib/tmpfiles.d/systemd.conf:F /run/nologin 0755 - - - "System is booting

to find some examples. But you see, there is no entry there for "/run" or "/var/run", so I took the example from a wrong entry.

On my 12.3 (recently upgraded) system that is
/usr/lib/systemd/system/var-run.mount for the tmpfs on /var/run
var-lock.mount for the tmpfs on /var/lock

So you have a bind-mount there :-)
You could bind-mount to /dev/shm -- people used to do that :-)

Ah. Indeed. So it is not created the way I thought, it is created directly by a service!

# ls -dli /run /var/run
2429 drwxr-xr-x 23 root root 720 Jun 28 11:49 /run
2429 drwxr-xr-x 23 root root 720 Jun 28 11:49 /var/run

So why isn't/usr/lib/systemd/system/tmp.mount being used?
Cristian has pointed out previously in this list that openSuse has been modified so that it isn't. HOW? you ask? That is what Andrey has been telling you!

Because /usr/lib/tmpfiles.d/tmp.conf is creating them first.

Ok, so if I want /media to be a tmpfs, either I bind-mount it to somewhere, or create it with a service like "/etc/systemd/system/media.mount similar to "/usr/lib/systemd/system/var-run.mount".


Hmm, no, "/usr/lib/systemd/system/var-run.mount" creates a bind from "/run" to /var/run". Then where is "/run" created?

I could, then, create a directory under "/run", and mount-bind "/media" to it. Or create an entire new tmpfs.


- -- Cheers,
Carlos E. R.
(from 12.3 x86_64 "Dartmouth" at Telcontar)

Version: GnuPG v2.0.19 (GNU/Linux)

To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >