Re: [systemd-devel] Hotplug auto mounting and masked mount units

2020-01-12 Thread Michael Biebl
Am Fr., 10. Jan. 2020 um 17:13 Uhr schrieb Phillip Susi :
>
>
> Lennart Poettering writes:
>
> > Can you file a bug about this? Sounds like something to fix.
>
> Sure.


https://github.com/systemd/systemd/issues/14550
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Hotplug auto mounting and masked mount units

2020-01-10 Thread Phillip Susi


Lennart Poettering writes:

> Can you file a bug about this? Sounds like something to fix.

Sure.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Hotplug auto mounting and masked mount units

2020-01-10 Thread Lennart Poettering
On Do, 09.01.20 23:27, Mantas Mikulėnas (graw...@gmail.com) wrote:

> On Thu, Jan 9, 2020 at 11:03 PM Phillip Susi  wrote:
>
> > Someone in #debian mentioned to me that they were getting some odd
> > errors in their logs when running gparted.  It seems that several years
> > ago there was someone with a problem caused by systemd auto mounting
> > filesystems in response to udev events triggered by gparted, and so as a
> > workaround, gparted masks all mount units.  Curtis Gedeck and I can't
> > seem to figure out now, why this was needed because we can't seen to get
> > systemd to automatically mount a filesystem just because it's device is
> > hot plugged.  Are there any circumstances under which systemd will mount
> > a filesystem when it's device is hotplugged?
> >
>
> Yes, in nearly all older systemd versions, if a fstab entry had 'auto' then
> its generated .mount unit was automatically inserted into the corresponding
> .device's Wants= list. (Which IMHO was quite useful with 'auto,nofail'
> combined.) This was removed in systemd v242.

Not removed, just changed to be conditioned by the
x-systemd.device-bound fstab option (see other mail)

Lennart

--
Lennart Poettering, Berlin
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Hotplug auto mounting and masked mount units

2020-01-10 Thread Lennart Poettering
On Do, 09.01.20 15:56, Phillip Susi (ph...@thesusis.net) wrote:

> Someone in #debian mentioned to me that they were getting some odd
> errors in their logs when running gparted.  It seems that several
> years

gparted really shouldn't mask units, that's just wrong.

They should just take BSD file locks, as documented here:

https://systemd.io/BLOCK_DEVICE_LOCKING

> ago there was someone with a problem caused by systemd auto mounting
> filesystems in response to udev events triggered by gparted, and so as a
> workaround, gparted masks all mount units.  Curtis Gedeck and I can't
> seem to figure out now, why this was needed because we can't seen to get
> systemd to automatically mount a filesystem just because it's device is
> hot plugged.  Are there any circumstances under which systemd will mount
> a filesystem when it's device is hotplugged?

This is now controlled by the x-systemd.device-bound mount option, see
here:

https://www.freedesktop.org/software/systemd/man/systemd.mount.html#x-systemd.device-bound

> Also I'm pretty sure this part is a bug in systemd: any service that
> depends on -.mount ( so most of them ) it will refuse to start while
> -.mount is masked.  It shouldn't matter that it's masked if it is
> already mounted should it?  Only if it isn't mounted, then it can't be
> mounted to satisfy the dependency.

Can you file a bug about this? Sounds like something to fix.

(But really, don't mask -.mount, really don't, masing is a heavy heavy
hammer, and not appropriate for clean codepaths)

Lennart

--
Lennart Poettering, Berlin
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Hotplug auto mounting and masked mount units

2020-01-09 Thread Mantas Mikulėnas
On Thu, Jan 9, 2020 at 11:03 PM Phillip Susi  wrote:

> Someone in #debian mentioned to me that they were getting some odd
> errors in their logs when running gparted.  It seems that several years
> ago there was someone with a problem caused by systemd auto mounting
> filesystems in response to udev events triggered by gparted, and so as a
> workaround, gparted masks all mount units.  Curtis Gedeck and I can't
> seem to figure out now, why this was needed because we can't seen to get
> systemd to automatically mount a filesystem just because it's device is
> hot plugged.  Are there any circumstances under which systemd will mount
> a filesystem when it's device is hotplugged?
>

Yes, in nearly all older systemd versions, if a fstab entry had 'auto' then
its generated .mount unit was automatically inserted into the corresponding
.device's Wants= list. (Which IMHO was quite useful with 'auto,nofail'
combined.) This was removed in systemd v242.

-- 
Mantas Mikulėnas
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Hotplug auto mounting and masked mount units

2020-01-09 Thread Phillip Susi
Someone in #debian mentioned to me that they were getting some odd
errors in their logs when running gparted.  It seems that several years
ago there was someone with a problem caused by systemd auto mounting
filesystems in response to udev events triggered by gparted, and so as a
workaround, gparted masks all mount units.  Curtis Gedeck and I can't
seem to figure out now, why this was needed because we can't seen to get
systemd to automatically mount a filesystem just because it's device is
hot plugged.  Are there any circumstances under which systemd will mount
a filesystem when it's device is hotplugged?

Also I'm pretty sure this part is a bug in systemd: any service that
depends on -.mount ( so most of them ) it will refuse to start while
-.mount is masked.  It shouldn't matter that it's masked if it is
already mounted should it?  Only if it isn't mounted, then it can't be
mounted to satisfy the dependency.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel