Is it ok to have nested directories managed by autofs?


  • /nfs/zfs
  • /nfs

On my Debian 8 machine, I have /etc/auto.zfs like this:

repo -fstype=nfs,rw

and /etc/auto.nfs like this:

foo -fstype=nfs,rw

My /etc/auto.master.d/nfs.autofs then references these files like this:

/nfs/zfs /etc/auto.zfs
/nfs     /etc/auto.nfs

Is this supposed to work? Any caveat?

My main fear is that autofs somehow completely remove /nfs/zfs automatically at some point.

1 Answer 1


Answering my own question.

So apparently the correct way of doing this is through something called "multi-map" or "multiple-mount map", according to man 5 autofs.

<sarcasm>Oh such clear and predictable name.</sarcasm>

It's amazing that the words "nested" or "sub(-)director(y/ies)" do not appear at all in man 5 autofs.

  • Hi can you list the config you ended up using to actually do this? I'm trying to do the exact same thing and following the manpage's syntax for a multimap, but the "offset" (subdir? nested dir?) mount fails.
    – ffledgling
    Mar 13, 2020 at 2:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .