You are not logged in.
Pages: 1
I use MC a lot with large archive files. As a result, I've found that I need /tmp as physical hard drive space - otherwise MC keeps running out of space to extract archive contents to.
I edited /etc/fstab, commented out the tmpfs /tmp tmpfs nodev,nosuid 0 0 line. Which worked fine until I converted the machine to systemd. Now, looking at the journal, I get this:
Oct 13 22:05:33 sirius systemd[1]: tmp.mount: Directory /tmp to mount over is not empty, mounting anyway. (To see the over-mounted files, please manually mount the underlying file system to a secondary l
Oct 13 22:05:33 sirius systemd[1]: Starting Load Random Seed...
Oct 13 22:05:33 sirius systemd[1]: Mounted Temporary Directory.
Sure enough, if I run mount, I get this:
tmpfs on /tmp type tmpfs (rw)
I must have missed something, but can someone tell me how to get /tmp left as part of the hard drive?
Paul.
Last edited by toothandnail (2012-10-15 14:08:25)
Offline
/usr/lib/tmpfiles.d/tmp.conf
Offline
/usr/lib/tmpfiles.d/tmp.conf
Thanks. Read that (and the associated man page), but it doesn't help much so far as I can see.
After a bit more digging, I found /usr/lib/systemd/system/tmp.mount, which looks like its the culprit:
[Unit]
Description=Temporary Directory
Documentation=man:hier(7)
Before=local-fs.target
[Mount]
What=tmpfs
Where=/tmp
Type=tmpfs
Options=mode=1777,strictatime
Trouble is, so far, I've not worked out how to override it, or even if its possible. I guess I could edit it, if necessary, but I really don't like that idea - any changes I make would be overwritten on the next systemd update, not to mention I don't really know what changes would be necessary to make it do what I want.
More reading is necessary, I guess....
Paul.
Offline
Well, you could mask tmp.mount. But I am pretty sure systemd-tmpfiles would still want to clear out the now non-tmpfile after 10 days.
BTW, you are right, that tmpfiles.d file is just there to make sure that the directory is cleaned every 10 days.
Offline
Copy it to /etc/systemd/system, and edit that instead. This won't be overwritten, and will override the stock file.
Or in this case, since you just want to disable it, you might try "systemctl mask tmp.mount", which creates a symlink of that name in /etc/systemd/system which points to /dev/null.
Offline
Well, you could mask tmp.mount. But I am pretty sure systemd-tmpfiles would still want to clear out the now non-tmpfile after 10 days.
Thanks. I'm finding the systemd docs less than crystal clear - hadn't even seen the 'mask' command. That did it...
BTW, you are right, that tmpfiles.d file is just there to make sure that the directory is cleaned every 10 days.
That is something I'll need, since /tmp is no longer on volatile media. I was looking at installing tmpreaper, but I'll see what systemd does.
Paul.
Offline
Copy it to /etc/systemd/system, and edit that instead. This won't be overwritten, and will override the stock file.
Useful to know, though in this instance, I'm not at all sure what edit would work.
Or in this case, since you just want to disable it, you might try "systemctl mask tmp.mount", which creates a symlink of that name in /etc/systemd/system which points to /dev/null.
That did it. Thanks.
Paul.
Offline
I tried out the masking, but ended up with booting troubles. Lots of messages which I cannot remember, but to the effect that root / was read-only. Probably systemd (?) scripts relying on /tmp being writable (as it would have, had it been on tmpfs), even though root has not yet been remounted as rw. Could that be...
Last edited by quite (2013-02-15 07:56:40)
Offline
In case if anyone interested, I've met the behavior described by quite. The reason was that I've masked tmpfs with systemctl but left the entry in /etc/fstab. After removing /tmp from fstab the issue disappeared.
Offline
Pages: 1