Skip to contentSkip to conversation

Cascading/recursive autofs mounts?

DISCUSSION Axel Thimm 3 participants 4 messages Aug 25, 2005 – Aug 27, 2005 Kernel automounter

lore
Share & tools
lore

Axel Thimm

author
#0 lore raw

Hi,

we have a setup, where we would like to have autofs mount over NFS a certain folder and then bind-mount from subfolders to other places.

Can this work with autofs? E.g. can autofs cascade mount requests? E.g. if the first autofs request would require a second one to be performed first, would the second one properly mount the NFS share and the outer one continue with bind mounting?. It looks like the first one would lock /var/lock/autofs and the inner autofs request would fail.

Thanks!

Signature · 1 line
Axel.Thimm at ATrpms.net

_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs

#1 lore raw

==> Regarding [autofs] Cascading/recursive autofs mounts?; Axel Thimm <[email protected]> adds:

Axel.Thimm> Hi, we have a setup, where we would like to have autofs mount Axel.Thimm> over NFS a certain folder and then bind-mount from subfolders Axel.Thimm> to other places.

Axel.Thimm> Can this work with autofs? E.g. can autofs cascade mount Axel.Thimm> requests? E.g. if the first autofs request would require a Axel.Thimm> second one to be performed first, would the second one properly Axel.Thimm> mount the NFS share and the outer one continue with bind Axel.Thimm> mounting?. It looks like the first one would lock Axel.Thimm> /var/lock/autofs and the inner autofs request would fail.

Correct. The way things are structured in autofs4.1.4, recursive mounts such as this are not supported.

-Jeff

maintainer
#2 lore raw
Quoted 13 lines · Jeff Moyer

==> Regarding [autofs] Cascading/recursive autofs mounts?; Axel Thimm <[email protected]> adds:

Axel.Thimm> Hi, we have a setup, where we would like to have autofs mount Axel.Thimm> over NFS a certain folder and then bind-mount from subfolders Axel.Thimm> to other places.

Axel.Thimm> Can this work with autofs? E.g. can autofs cascade mount Axel.Thimm> requests? E.g. if the first autofs request would require a Axel.Thimm> second one to be performed first, would the second one properly Axel.Thimm> mount the NFS share and the outer one continue with bind Axel.Thimm> mounting?. It looks like the first one would lock Axel.Thimm> /var/lock/autofs and the inner autofs request would fail.

Quoted 2 lines

Correct. The way things are structured in autofs4.1.4, recursive mounts such as this are not supported.

This should be able to be done with Sun style offset mounts (which we are calling multi-mounts). We can't do that atm but that's comming.

Ian

maintainer
#3 lore raw

Of course this should have been a reply to Axel. Sorry Jeff.

Quoted 15 lines · Ian Kent
Quoted 13 lines · Jeff Moyer

==> Regarding [autofs] Cascading/recursive autofs mounts?; Axel Thimm <[email protected]> adds:

Axel.Thimm> Hi, we have a setup, where we would like to have autofs mount Axel.Thimm> over NFS a certain folder and then bind-mount from subfolders Axel.Thimm> to other places.

Axel.Thimm> Can this work with autofs? E.g. can autofs cascade mount Axel.Thimm> requests? E.g. if the first autofs request would require a Axel.Thimm> second one to be performed first, would the second one properly Axel.Thimm> mount the NFS share and the outer one continue with bind Axel.Thimm> mounting?. It looks like the first one would lock Axel.Thimm> /var/lock/autofs and the inner autofs request would fail.

Quoted 5 lines
Quoted 2 lines

Correct. The way things are structured in autofs4.1.4, recursive mounts such as this are not supported.

This should be able to be done with Sun style offset mounts (which we are calling multi-mounts). We can't do that atm but that's comming.

Saying that this can't be done is not entirely correct.

What can be done now is to specify your mounts as a multi-mount map entry.

The limitation is that, currently, a multi-mount must be treated as a single unit. Meaning that all the offsets must be mounted on access and similarly on umount.

For example a map entry like:

example		/	host:/you/nfs/mount \
		/other/one	:/dev/sda1 \
		/this/two	host2:/another/mount

would mount all three of these and not umount them until all three have been idle for at least timout.

The auto.net example program map script does this for a list of exports when passed a key corresponding to a server server.

Ian