[systemd-devel] [PATCH] systemd-udevd.service: restore mount propagation
Lennart Poettering
lennart at poettering.net
Wed Jan 28 08:24:19 PST 2015
On Wed, 28.01.15 16:29, Zbigniew Jędrzejewski-Szmek (zbyszek at in.waw.pl) wrote:
> On Wed, Jan 28, 2015 at 02:09:37PM +0100, Martin Pitt wrote:
> > Lennart Poettering [2015-01-28 13:33 +0100]:
> > > Hmm, yeah, we apparently only add that for file systems listed in
> > > /etc/fstab...
> > >
> > > If you change the "get_mount_parameters_fragment()" invocation at the
> > > beginning of mount_add_device_links() in src/core/mount.c to
> > > "get_mount_parameters()", does this make things work for you?
> > >
> > > This change might have more effects than just making this work, but I
> > > think it's the right thing to do. Could you test please?
> >
> > BAZINGA! Thanks for this, now it works perfectly! Now the mount unit
> > looks like this:
> >
> > | Where=/media/martin/Ubuntu 15.04 amd64
> > | What=/dev/sr0
> > | [...]
> > | Id=media-martin-Ubuntu\x5cx2015.04\x5cx20amd64.mount
> > | Names=media-martin-Ubuntu\x5cx2015.04\x5cx20amd64.mount
> > | Requires=-.mount
> > | Wants=system.slice
> > | BindsTo=dev-sr0.device
> > | WantedBy=dev-sr0.device
> > | Conflicts=umount.target
> > | Before=local-fs.target umount.target
> This looks wrong. It should have no relation to local-fs.target, which
> is only for things from /etc/fstab (and manually created .mount units).
I think ordering before local-fs.target is the right thing in this
case. Wants= or Reuqires= would be inappropriate, but After= is OK and
needed AFAICS. It is useful during shutdown, so that the mount units
stay around until all services with After=local-fs.target are
shut down, and not any earlier than that.
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list