[opensuse-factory] Mounting /tmp via tmpfs
Hey, for many years I've been using the following steps to mount /tmp via tmpfs: 1. Removing tmp from /etc/fstab 2. mkdir -p /etc/systemd/system/local-fs.target.wants 3. ln -s /usr/lib/systemd/system/tmp.mount /etc/systemd/system/local-fs.target.wants/tmp.mount Recently, I installed Tumbleweed on a spare partition for testing purposes and this trick stopped working. There is no /tmp mounted anymore and the system won't boot successfully. Any ideas? Gruß Jan -- Social legislation cannot repeal physical laws. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Monday 2020-06-22 16:41, Jan Ritzerfeld wrote:
for many years I've been using the following steps to mount /tmp via tmpfs: 1. Removing tmp from /etc/fstab 2. mkdir -p /etc/systemd/system/local-fs.target.wants 3. ln -s /usr/lib/systemd/system/tmp.mount /etc/systemd/system/local-fs.target.wants/tmp.mount
Recently, I installed Tumbleweed on a spare partition for testing purposes and this trick stopped working. There is no /tmp mounted anymore and the system won't boot successfully.
For one, there is no /usr/lib/systemd/system/tmp.mount in leap-15.1 or tw-20200620. 16:47 a4:~ # find /etc/ /usr -name tmp.mount /usr/share/systemd/tmp.mount -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Jun 22 2020, Jan Ritzerfeld wrote:
3. ln -s /usr/lib/systemd/system/tmp.mount
Does that actually exist? I only see /usr/share/systemd/tmp.mount. I think all you need is systemctl link /usr/share/systemd/tmp.mount. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Am Montag, 22. Juni 2020, 16:41:50 CEST schrieb ich:
Hey,
for many years I've been using the following steps to mount /tmp via tmpfs: 1. Removing tmp from /etc/fstab 2. mkdir -p /etc/systemd/system/local-fs.target.wants 3. ln -s /usr/lib/systemd/system/tmp.mount /etc/systemd/system/local-fs.target.wants/tmp.mount
Recently, I installed Tumbleweed on a spare partition for testing purposes and this trick stopped working. There is no /tmp mounted anymore and the system won't boot successfully.
Any ideas?
You're both right, Jan and Andreas. Instead of looking into the bash history, I blindly copied the instructions from an very old mail into this one :-D https://lists.opensuse.org/opensuse/2013-07/msg00141.html So, on Leap 15.1 and current TW my step 3 actually is: ln -s /usr/share/systemd/tmp.mount /etc/systemd/system/local-fs.target.wants/tmp.mount That worked for Leap 15.1 but not for TW. Gruß Jan -- A wise man gets more use from his enemies than a fool from his friends. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Moin, On Mon, 22 Jun 2020, 17:34:55 +0200, Jan Ritzerfeld wrote:
Am Montag, 22. Juni 2020, 16:41:50 CEST schrieb ich:
Hey,
for many years I've been using the following steps to mount /tmp via tmpfs: 1. Removing tmp from /etc/fstab 2. mkdir -p /etc/systemd/system/local-fs.target.wants 3. ln -s /usr/lib/systemd/system/tmp.mount /etc/systemd/system/local-fs.target.wants/tmp.mount
Recently, I installed Tumbleweed on a spare partition for testing purposes and this trick stopped working. There is no /tmp mounted anymore and the system won't boot successfully.
Any ideas?
You're both right, Jan and Andreas. Instead of looking into the bash history, I blindly copied the instructions from an very old mail into this one :-D https://lists.opensuse.org/opensuse/2013-07/msg00141.html
So, on Leap 15.1 and current TW my step 3 actually is: ln -s /usr/share/systemd/tmp.mount /etc/systemd/system/local-fs.target.wants/tmp.mount
That worked for Leap 15.1 but not for TW.
I certainly don't want to start (another) flamewar against systemd, but what's wrong with putting this into /etc/fstab: tmpfs /tmp tmpfs mode=1777,uid=0,gid=0 0 0 Used to work since decades.
Gruß Jan
Cheers. l8er manfred
On Mon, Jun 22, 2020 at 07:12:47PM +0200, Manfred Hollstein wrote:
I certainly don't want to start (another) flamewar against systemd, but what's wrong with putting this into /etc/fstab:
tmpfs /tmp tmpfs mode=1777,uid=0,gid=0 0 0
Used to work since decades.
And is "in general [...] the preferred approach" (see
systemd.mount(5)).
ciao Arvin
--
Arvin Schnell,
Moin, am Montag, 22. Juni 2020, 19:12:47 CEST schrieb Manfred Hollstein:
[...] I certainly don't want to start (another) flamewar against systemd, but what's wrong with putting this into /etc/fstab:
tmpfs /tmp tmpfs mode=1777,uid=0,gid=0 0 0
Used to work since decades.
There's nothing wrong. Quite the contrary: | In general, configuring mount points through /etc/fstab is the preferred | approach. See systemd-fstab-generator(8) for details about the conversion. man systemd.mount IIRC openSUSE changed the default behaviour of systemd to not use tmpfs for tmp. And I want to restore the original behaviour. Adding an fstab entry that generates a systemd unit that systemd would have done anyway just doesn't feel right. Gruß Jan -- Democracy is based on the assumption that a million men are wiser than one. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Wed, Jun 24, 2020 at 11:32 AM Jan Ritzerfeld
Am Montag, 22. Juni 2020, 16:41:50 CEST schrieb ich:
Hey,
for many years I've been using the following steps to mount /tmp via tmpfs: 1. Removing tmp from /etc/fstab 2. mkdir -p /etc/systemd/system/local-fs.target.wants 3. ln -s /usr/lib/systemd/system/tmp.mount /etc/systemd/system/local-fs.target.wants/tmp.mount
Recently, I installed Tumbleweed on a spare partition for testing purposes and this trick stopped working. There is no /tmp mounted anymore and the system won't boot successfully.
Any ideas?
You're both right, Jan and Andreas. Instead of looking into the bash history, I blindly copied the instructions from an very old mail into this one :-D https://lists.opensuse.org/opensuse/2013-07/msg00141.html
So, on Leap 15.1 and current TW my step 3 actually is: ln -s /usr/share/systemd/tmp.mount /etc/systemd/system/local-fs.target.wants/tmp.mount
That worked for Leap 15.1 but not for TW.
Simply get a copy of tmp.mount from the systemd git repository. cd /etc/systemd/system wget --timestamping https://raw.githubusercontent.com/systemd/systemd/master/units/tmp.mount ln -s /etc/systemd/system/tmp.mount /etc/systemd/system/local-fs.target.wants/tmp.mount reboot It is a shame it was decided to deviate from the default., -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Wed, Jun 24, 2020 at 2:44 PM Olaf Hering
Am Wed, 24 Jun 2020 11:39:26 -0400 schrieb Cristian Rodríguez
: It is a shame it was decided to deviate from the default.,
Do you happen to know what the default is?
Default currently is always mounting /tmp on tmpfs that can only use up to 10% of the system ram. SUSE default is mount /tmp on disk filesystem. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Am Wed, 24 Jun 2020 15:11:41 -0400
schrieb Cristian Rodríguez
Default currently is always mounting /tmp on tmpfs that can only use up to 10% of the system ram. SUSE default is mount /tmp on disk filesystem.
Ah ok. Since we make SUSE Linux, and in SUSE Linux /tmp is on-disk, we are fine. Olaf
hi, Am 22.06.20 um 17:34 schrieb Jan Ritzerfeld:
You're both right, Jan and Andreas. Instead of looking into the bash history, I blindly copied the instructions from an very old mail into this one :-D https://lists.opensuse.org/opensuse/2013-07/msg00141.html
So, on Leap 15.1 and current TW my step 3 actually is: ln -s /usr/share/systemd/tmp.mount /etc/systemd/system/local-fs.target.wants/tmp.mount
That worked for Leap 15.1 but not for TW.
i have on TW linked /usr/share/systemd/tmp.mount -> /etc/systemd/system/ and this does the trick for me. and this is the contents of the tmp.mount file: # SPDX-License-Identifier: LGPL-2.1+ # # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [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 -- Best Regards | Freundliche Grüße | Cordialement | Cordiali Saluti | Atenciosamente | Saludos Cordiales *DI Rainer Klier* DevOps, Research & Development namirialLogo _________________________________________________________ Namirial GmbH Phone: +43 7229 88 0 60 - 758 | Mobile: +43 664 610 17 06 Haiderstraße 23 | 4052 Ansfelden | Austria Website: https://www.xyzmo.com/ Support: https://www.xyzmo.com/contact/support The sender of this email disclaims any intent to be bound hereby, except where the sender clearly and explicitly provides otherwise. namirialAd -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Am Donnerstag, 25. Juni 2020, 10:52:59 CEST schrieb Rainer Klier:
[...] i have on TW linked /usr/share/systemd/tmp.mount -> /etc/systemd/system/
and this does the trick for me. [...]
Many thanks, I've just tested it: It works. Gruß Jan -- Parkinson's Axioms: Officials want to multiply subordinates. Officials make work for each other. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Am Mittwoch, 24. Juni 2020, 17:39:26 CEST schrieb Cristian Rodríguez:
[...] Simply get a copy of tmp.mount from the systemd git repository.
cd /etc/systemd/system wget --timestamping https://raw.githubusercontent.com/systemd/systemd/master/units/tmp.mount ln -s /etc/systemd/system/tmp.mount /etc/systemd/system/local-fs.target.wants/tmp.mount reboot
Many thanks! Just putting tmp.mount to /etc/systemd/system/ seems to be enough. Do you have any idea why it is actually enabled without explicitly enabling it by linking it into local-fs.target.wants?
It is a shame it was decided to deviate from the default.,
Yes, indeed... Gruß Jan -- You never know what is enough until you know what is more than enough. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (8)
-
Andreas Schwab
-
Arvin Schnell
-
Cristian Rodríguez
-
Jan Engelhardt
-
Jan Ritzerfeld
-
Manfred Hollstein
-
Olaf Hering
-
Rainer Klier