1

I have Ubuntu 14.04 and use ifplugd as network manager. I also have 2 NFS shares set up.

If I unmount those shares beforehand, OS shuts down just fine, but if I don't, it never shuts down (I left it running for 3 hours and it didn't shut down).

What can be done to fix this?

  • 1
    Probably write or modify /etc/ifplugd/ifplugd.action to unmount when the interface goes down? – muru May 14 '16 at 0:16
  • What command should be used to unmount NFS shares? – Adam Olech May 14 '16 at 0:17
  • You say in your question: "If I unmount those shares beforehand..." How do you do it then? – muru May 14 '16 at 0:19
  • I do it manually, like "umount /media/bla", so it's pretty dirty solution. But, I've just realized that I can use "umount -a -t nfs" – Adam Olech May 14 '16 at 0:21
  • I appended "umount -a -t nfs" and it only made it worse - ifplugd can't be killed (timeout). – Adam Olech May 14 '16 at 0:44
0

I figured that I can use autofs instead of fstab to mount my NFS shares.

In order to make it work, follow the steps :

  1. Open /etc/auto.master in your editor of choice and add /$catalog $configpath at the end of this file, where $catalog is the folder where you want your shares to be mounted (note that you have to create that directory manually), and $configpath is the path for shares config file.
  2. Edit your config file at $configpath in the following manner : $sharename $server:/$sharepath

With following config your share will be mounted at $catalog/$sharename.

There's also another workaround to this problem, which is adding soft option to your shares in fstab.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.