Ask Your Question

AutoFS+LDAP doesn't work on boot (but does if I restart it)

asked 2012-06-20 15:34:42 +0000

sharth gravatar image

I currently use automount backed by LDAP. The LDAP server, and NFS mounts are hosted by a CentOS 5 machine, and when being used by other CentOS 5 (or Ubuntu 10.04) machines, everything works perfectly.

However, I'm having problems with Fedora 16. I've installed automount, and it comes up at boot. I can see that it is running in ps aux as well. When it's running from being launched by the startup scripts, I'm not able to access the NFS mounts in /home or /opt that normally would work.

If I run service autofs restart, then the mounts that I expect to exist, do exist.

I tend to think that this is occurring because automount is starting up before the network does, but I'm not sure how to verify this. Does anyone have any ideas on how to help with this?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2012-12-17 17:21:54 +0000

David Strauss gravatar image

updated 2012-12-17 17:41:37 +0000

It may, indeed, be the case that it's breaking by coming up too early. It's possible with systemd to create a wait_for_nfs.service as Type=oneshot that uses ExecStart= to wait until the NFS server is reachable.

Then, you can create a new /etc/systemd/system/autofs.service file with the following:

.include /lib/systemd/system/autofs.service

Then reboot.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers. If a question you asked has been answered, accept the best answer by clicking on the checkbox on the left side of the answer.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.

Question Tools

1 follower


Asked: 2012-06-20 15:34:42 +0000

Seen: 1,137 times

Last updated: Dec 17 '12