Compose: autofs Too many levels of symbolic links

Created on 17 May 2019  路  3Comments  路  Source: docker/compose

Hi team I use docker-compose to run my service .I have volume mount(/a/b/c) locally to remote
but the subdirectory /a/b/c/d is mount from remote nfs (I use autofs locally).
but sometimes I get errors when cd /a/b/c/d
cd too many levels of symbolic links
how can I resolve it?

Most helpful comment

Explanation: This Problem is related to autofs, not docker or compose!

I just had the same problem. Autofs does not work like we wanted it. It's made for Laptop users. It just mounts a share when required. But we actually want it to work like this: Make sure it's mounted at every time. If network failure, re-mount it when accessible again.

That causes the following problem: When a host is booted, autofs does NOT mount the shares.
At the time the container is created, autofs does not recognize that as a request to mount the share, so the container gets this weird empty symlink directory thingy.

Giving the mount option :shared did solve it for me!
Autofs now mounts the directory which was required from within a container.

All 3 comments

Explanation: This Problem is related to autofs, not docker or compose!

I just had the same problem. Autofs does not work like we wanted it. It's made for Laptop users. It just mounts a share when required. But we actually want it to work like this: Make sure it's mounted at every time. If network failure, re-mount it when accessible again.

That causes the following problem: When a host is booted, autofs does NOT mount the shares.
At the time the container is created, autofs does not recognize that as a request to mount the share, so the container gets this weird empty symlink directory thingy.

Giving the mount option :shared did solve it for me!
Autofs now mounts the directory which was required from within a container.

@port22 Where do you put :shared option in order to resolve this issue?

Was this page helpful?
0 / 5 - 0 ratings