Automount + local files under the same mountpoint ?

We have a pobolem with our automounter setup, we would like to mount all of our remote apps with automounter to /opt. However some local applications need to install under /opt as well and also Opensuse keeps the kde3 installation under /opt, but when the automounter mounts /opt these files of course becomes invisible.
So the question is, is there any way of having a local /opt and also use the automounter to mount remote directories like an overlay over /opt ??
Right now we solve this by mounting the remote filsystem under a different mountpoint and then symlink all those folders to /opt, but that is kind of a sucky solution.

Any help with this would be appreciated.


Nope. A mount (auto or not) hides any contents that were in the directory that is the mountpoint. That’s how it works in Unix/Linux. Your symlink solution is as good as any.

However there is something called unionfs which implements overlay filesystems. It’s not something you can arrange by enabling a few options though, it requires a bit of nous to set it up and still may not be suitable for what you want. If you want to investigate further, do a search on unionfs.