2

I have an issue with unmount of NFS volumes when rebooting or shutting down client machine - I have to wait for up to 30 minutes while NFS volume being unmounted.

Сlients's conf (CentOS 7.3):

/etc/fstab

#NFS area
server:/var/backup                              /mnt/backup                   nfs     rsize=65536,wsize=65536,intr,nolock,bg,hard,x-systemd.automount
server:/mnt/storage                             /mnt/storage                  nfs     rsize=65536,wsize=65536,intr,nolock,bg,hard,x-systemd.automount

x-systemd.automount, nolock options which I found on other resources are not help me.

Server's (CentOS 6.5):

/etc/exports

/var/backup  10.8.0.1(rw,sync,no_wdelay,nohide,no_root_squash,no_subtree_check)
/mnt/storage 10.8.0.1(rw,sync,no_wdelay,nohide,no_root_squash,no_subtree_check)

Interesting thing - all mount/unmount operations come immediately when I do them manually. But I have to wait when reboot/shutdown my client machine. What is wrong in my configuration?

  • 1
    When you're rebooting the client, or ste server? – Kusalananda May 21 '17 at 9:51
  • Client, of course. Server is 24/7 up. – maksim2020 May 21 '17 at 10:30
  • Does this still happen if you add the server details to the client machines /etc/hosts? – Tigger May 21 '17 at 10:35
  • Yes, it does... – maksim2020 May 21 '17 at 10:37
  • It might be that the network is shutdown before the shares are unmounted. And another post saying the same. And even another post. – Tigger May 21 '17 at 10:46
1

The problem has been resolved by replacing OpenVPN's address of server in the client's /etc/hosts by real IP of remote server (and corresponding change in the server's configuration of NFS shares). Thanks Tigger for advice.

The OpenVPN service shuts down is earlier than NFS service, so, client tries to unmount non-existing resources, I guess.

  • If you don't already know, you should find out why the NFS share was done using the VPN IP address in the first place. There might be an important reason for that, such as not sending unencrypted NFS traffic over a publicly-accessible network... – Andrew Henle May 21 '17 at 13:41
  • Thanks for the remark. I am now Kerberizing NFS, so, I hope the security of NFS share will be fine. – maksim2020 May 22 '17 at 20:21

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.