[systemd-devel] Stacked automount dependencies

Andrei Borzenkov arvidjaar at gmail.com
Fri Mar 30 08:21:27 UTC 2018


On Fri, Mar 30, 2018 at 9:06 AM, Kenneth Porter <shiva at sewingwitch.com> wrote:
> --On Friday, March 30, 2018 2:25 PM +1100 Michael Chapman
> <mike at very.puzzling.org> wrote:
>
>> This probably isn't going to work the way you want. Starting the share1
>> automount will itself cause share0 to be mounted, since systemd needs to
>> ensure that the share1 directory exists, and to mount an autofs
>> filesystem at this directory.
>>
>> If you stack automounts in this way, the "inner" automount essentially
>> keeps the "outer" mount permanently in use.
>
>
> That makes sense. So what I really need is a way to start the nested
> automount unit when the outer mount unit starts.

Much easier is to use symlinks on outer filesystem that points into
auto-mounted inner filesystem.

> The app will touch the
> outer mountpoint causing it to mount and starting the inner automount unit.
> The app may then navigate to the inner mountpoint and cause it to mount. But
> I don't need the inner automount unit to start at boot. It just needs to
> start when the outer mount completes.
>

What's wrong with *automount* started on boot? How are you going to
trigger mounting if automount is not available?

> So what can I put in either the outer mount unit or inner automount unit to
> make the inner automount start when the outer mount completes?

automount /outer
automount /inner
ln -s /outer/inner -> /inner

Again - what's wrong with it?


More information about the systemd-devel mailing list