On Mon, Aug 05, 2013 at 10:09:47PM +0400, Andrey Borzenkov wrote:
В Mon, 5 Aug 2013 15:15:38 +0200 Josef Wolf
пишет: On Fr, Aug 02, 2013 at 10:27:25 +0400, Andrey Borzenkov wrote:
The only case when rename returns EBUSY is when directory is mount point. systemd creates private tmp directories if service has PrivateTmp=yes:
Ugh, this seems to be hardwired to /var/tmp. No way to move it to /tmp or something?
Actually it creates private mounts for both.
The directory for those private mounts seems to be hardwired to /var/tmp. It don't seem to be possible to move it to /tmp? Do those directories really need to survive reboots? Those cryptic names don't seem to suggest this. Oh, and then there's the bug on cleaning /var/tmp/systemd-private-XXX. Isn't this an indicator that all this should be moved to /tmp?
bor@opensuse:~> sudo grep /var/tmp /proc/672/mountinfo 73 44 253:1 /var/tmp/systemd-private-xztGlQ /var/tmp rw,relatime shared:56 master:1 - ext4 /dev/mapper/system-root rw,commit=600,data=ordered bor@opensuse:~>
How comes that I don't see this in /proc/mounts? And lsof don't show it, too.
bind mounts are not shown in /proc/mounts.
This is not true: raven:/ # mkdir /tmp/t raven:/ # mount -obind / /tmp/t raven:/ # grep /tmp/t /proc/mounts /dev/mapper/cr_sda8 /tmp/t ext3 rw,relatime,data=ordered 0 0 raven:/ #
Partially because they are not really mounts as such. And nothing has any file open under /var/tmp (or rather /var/tmp/systemd-private-xxxxxxx) so it is of course not shown by lsof.
I still fail to understand why /var/tmp is locked down. Isn't /var/tmp/systemd-private-XXX the mount point? Thus this private directory should be locked down, not the containing directory. Maybe it would be possible, to move those private directories one level deeper: /tmp/systemd.d/private-XXX or something. That would have two benefits: - it would keep the /tmp directory clean. - the /tmp directory would not be locked down .
So /var/tmp cannot be renamed because it mounted - in one of namespaces.
But when I stop haveged, I _still_ can't rename, although
grep /var/tmp /proc/*/mountinfo
don't show anything. So there must be something else.
I tend to think it is kernel bug. It works if you do it without GUI (i.e. booting in run level 3) and testing it I managed to hard lock my system so I stopped it at this point :)
It is because the other three services are still running. When I stop all of them, I can rename even though the GUI is up. The wired thing here is that /proc/*/mountinfo and /proc/mounts won't show anything. -- Josef Wolf jw@raven.inka.de -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org