[systemd-devel] [PATCH] fstab-generator: add x-systemd.{after, requires-mounts-for}=

Dimitri John Ledkov dimitri.j.ledkov at intel.com
Wed May 13 02:58:34 PDT 2015


On 13 May 2015 at 10:15, Karel Zak <kzak at redhat.com> wrote:
> On Wed, May 13, 2015 at 06:35:58AM +0300, Andrei Borzenkov wrote:
>> В Tue, 12 May 2015 20:37:15 +0200
>> Karel Zak <kzak at redhat.com> пишет:
>>
>> > On Tue, May 12, 2015 at 07:29:33PM +0300, Andrei Borzenkov wrote:
>> > > В Tue, 12 May 2015 18:04:50 +0200
>> > > Karel Zak <kzak at redhat.com> пишет:
>> > >
>> > > > Currently we have no way how to specify dependencies between fstab
>> > > > entries (or another units) in the /etc/fstab. It means that users are
>> > > > forced to bypass fstab and write .mount units manually.
>> > > >
>> > >
>> > > Actually we have.
>> > >
>> > > mkdir -p /etc/systemd/system/path-to-mount-point.mount.d
>> > > cat > /etc/systemd/system/path-to-mount-point.mount.d/deps.conf << EOF
>> > > [Unit]
>> > > After=xxx
>> > > Before=xxx
>> > > Wants=xxx
>> > > Requires=xxx
>> > > EOF
>> >
>> > You miss the point -- keep all in fstab.
>> >
>>
>> I admit I do. Why? We want to keep in fstab bits and pieces that are
>> common with other utilities. Which other tool needs to know systemd
>> dependencies?
>
>  Did you read the reference in the patch? It's not about systemd
>  dependences, but about dependences between mount points. The fstab
>  has been originally (by mount -a) serialized during boot. Now it's
>  parallelized and in some cases it's bad thing and without extra
>  configuration systemd is not able to understand the dependencies in
>  fstab. It's admins' nightmare to require additional file somewhere in
>  /etc/systemd to fix systemd fstab interpretation.
>
>  BTW, we already have x-systemd stuff in fstab...

+1 from me, this is needed. Back in the upstart / mountall case,
dependencies were established between mount points, and failing that
explicit ordering was established - as in each subsequent fstab stanza
depended on the previous one. That was enough in general case, but it
was at times un-expected that reordering entries resulted in wrong
boot order.

If ftab generator creates linear dependency chain, would that be
enough without adding extra mount options or do you want
generic/explicit dependencies as per your patch?

-- 
Regards,

Dimitri.
Pura Vida!

https://clearlinux.org
Open Source Technology Center
Intel Corporation (UK) Ltd. - Co. Reg. #1134945 - Pipers Way, Swindon SN3 1RJ.


More information about the systemd-devel mailing list