[systemd-devel] [PATCH] systemd-udevd.service: restore mount propagation
Lennart Poettering
lennart at poettering.net
Tue Jan 27 04:52:02 PST 2015
On Tue, 27.01.15 09:40, Martin Pitt (martin.pitt at ubuntu.com) wrote:
> Hey Lennart,
>
> Lennart Poettering [2015-01-27 0:55 +0100]:
> > Hmm? I don't see how mount propagation would break 60-cdrom_id... The
> > eject ioctl operates on the device node, and does not care for
> > mounts. This problem sounds made-up to me.
>
> Right now cdrom_id indeed wouldn't be affected as it doesn't unmount a
> CD which is about to ejected. That's the very problem that was
> recently discussed here:
>
> http://lists.freedesktop.org/archives/systemd-devel/2015-January/026948.html
>
> The two proposed solutions were to either teach cdrom_id --eject to
> umount the device or just call the actual "eject" program which gets
> this pretty much right. But neither would work because of the unshared
> mount ns in udev.
So, why is this a new problem, and why do you say that
MountFlags=slave broke anything? I mean, cdrom_id cannot do unmounts
(and it really shouldn't), And an "eject" invocation was never part of
the udev rules, so there was really nothing that broke. So, these
things never worked, and MountFlags=slave didn't change anything about
it.
There's some part of the story that I am missing, or something makes
no sense at all...
> > Moreover, if you want to do mounts or umounts on plug or play, then
> > use a proper daemon, like udisks.
>
> udisks actually used to have both the CD-ROM polling (which since then
> moved into the kernel) and the post-eject cleanup.
Why was the removed, and with what was it replaced when it was?
> If we want to keep the udev mount unsharing, we could put it back
> into udisks; but that wouldn't be that robust as udisks isn't
> guaranteed to actually run, both because it's a D-BUS activated
> service and a lot of server-ish machines or lightweight desktops
> don't even have it.
Well, again, the right answer then is to handle it with .mount units,
which can correctly deal with partitioned block devices and other file
systems mounted on top of these pluggable block devices.
In general though I don't think people should expect that pluggable
devices are handled nicely if you uninstall the daemon that deals with
pluggable devices...
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list