Cascading/recursive autofs mounts?
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
==> 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
Ian Kent
maintainerQuoted 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/autofsand 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
Ian Kent
maintainerOf 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/autofsand 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