[systemd-devel] cannot create hard dependencies on mounts

Andrei Borzenkov arvidjaar at gmail.com
Wed Sep 11 11:51:27 UTC 2024


On Wed, Sep 11, 2024 at 2:35 PM Henti Smith <henti at gaydonsmith.co.uk> wrote:
>
> On Tue, 10 Sept 2024 at 18:11, Andrei Borzenkov <arvidjaar at gmail.com> wrote:
>>
>> On 10.09.2024 17:37, Henti Smith wrote:
>> >
>> > While starting data.mount, this works correctly, as it waits for the NFS
>> > share to become available before it mounts.. However, starting
>> > mission.service without starting data.mount, it correctly requires
>> > data.mount, but mission.service executes anyway.
>> >
>> > I'm not entirely sure why this happens.
>> >
>>
>> Because Requires without After is useless. I am yet to see the use case
>> for it.
>
>
> I don't follow. After adding Requires the config looks like:
>
> [Unit]
> Description=Mission Control
> After=network.target data.mount
> Wants=network.target
> Requires=data.mount
>
> So it has both After and Requires ?
>

Are you using a background NFS mount by default?


More information about the systemd-devel mailing list