English
Ask Your Question
0

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 delete

1 Answer

Sort by ยป oldest newest most voted
0

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
[Unit]
Requires=wait_for_nfs.service
After=wait_for_nfs.service

Then reboot.

edit flag offensive delete publish link more

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

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 to your questions.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.

Question tools

Follow
1 follower

Stats

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

Seen: 373 times

Last updated: Dec 17 '12