Mailinglist Archive: opensuse (1239 mails)

< Previous Next >
Re: [opensuse] How should one make /media a tmpfs under 12.3?
Andrey Borzenkov said the following on 06/28/2013 06:11 AM:
On Fri, Jun 28, 2013 at 1:50 PM, Carlos E. R.
<robin.listas@xxxxxxxxxxxxxx> wrote:
On Friday, 2013-06-28 at 06:28 +0400, Andrey Borzenkov wrote:

See? Something creates /media as a real directory.

Do you want to have it mounted as tmpfs or to remove it on every boot?


I do not know. If you want to ask, how to get rid of /media completely,
please say so :)

Something, I don not know what, creates /media on every boot, as my code
above demonstrated and you did not read.

I want to have it a tmpfs and it doesn't work, because something runs a
"mkdir /media" on every boot!

May be I do not understand what you mean under "have it a tmpfs". To
have /media as tmpfs you need to mount it as tmpfs, and to mount it
you obviously need mount point - /media.



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.

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 :-)

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 :-)

# 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.

"You may have to fight a battle more than once to win it."
-- Margaret Thatcher
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups