Bug#783321: systemd opens file in /var/run and not in /run
Dmitry Katsubo
dma_k at mail.ru
Sun Apr 26 13:12:13 BST 2015
On 26/04/2015 01:05, Michael Biebl wrote:
> Am 26.04.2015 um 00:36 schrieb Michael Biebl:
>> Am 26.04.2015 um 00:05 schrieb Dmitry Katsubo:
>>>
>>> Afterwards the process systemd opens a file in /var/run, thus
>>> not allowing me to unmount /var:
>
>>> systemd opens a file in /run, thus allowing the administrator
>>> to umount and e.g. repair /var volume.
>
>> According to codesearch [1], we have quite a few locations where
>> "/var/run/dbus/system_bus_socket" is hard-coded.
>
>
> After thinking about this some more, I'm actually not convinced
> this is a bug at all. /var/run/dbus/system_bus_socket is by far not
> the only resource, which could be openend from /var.
>
> In the end, I think it's rather questionable if it's a good idea to
> run fsck on a system partition in single user mode. And if you want
> to do so, you'll just need to shut down all services, sockets and
> processes manually, e.g. by running "systemctl stop foo.socket".
>
> If you want to run a forced fsck, there are much better facilities,
> like passing fsck.mode=force on the kernel-command-line [1].
>
> Given this, I'm not sure if it's worth the effort to move the dbus
> socket around and I'm inclined to just close this bug report.
>
> I'll leave the decision to Simon though.
>
> Michael
>
> [1] man 8 systemd-fsck
Michael, I agree that is not a bug but rather an improvement. "/run"
was introduced long time ago, and it is known to be tmpfs-mounted
system. Thus I think that using this path should be preferred over
"/var/run".
Indeed other files could be opened from /var, but in single mode that
is very limited. The only service that lock it is NFS mount (rpcbind).
And I can always stop these services, thus allowing me to unmount
/var. But that is not the case with process with PID=1. Should I just
kill it? :)
I haven't tried "fsck.mode=force". I have entered single mode after
hard drive crash when fsck was forced at boot but complained that
filesystem cannot be repaired automatically, thus interactive mode is
necessary. So I don't think that passing "fsck.mode=force" will help:
I will be kicked to single mode again.
Repairing in single mode is easier then starting in another level (3)
and then stopping all services. Using mouse in single mode is not a
must, but that speeds up my work (e.g. copy-paste text). So ability to
use it is a plus. I can think about another services that don't use
/var and could be helpful, but once started they lock /var because of
systemd... For example: networking + ssh server.
--
With best regards,
Dmitry
More information about the Pkg-systemd-maintainers
mailing list