Mounted NFS storage hangs on Starting Docker Service

Hi All,

Issue

Docker container using the mounted nfs storage breaks the storage mount making the mount point not accessible, doing a ls/df on the mounted storage hangs the Server and a Control C is the only way to exit. I will also have to shutdown Docker services then do a system reboot to be able to access the mount point again. The same container has been running for the last 18 months using the same mount point with no issues until 2 weeks ago. The same mount point is accessible from an identical server with no issues at all.

OS Version/build

Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic

App version

Docker version 19.03.15, build 99e3ed8919

Steps to reproduce

sudo systemctl start docker and the a df/ls on the mount point hangs the system.

Is the nfs share mounted on the os level? This pretty much sound like a stale mount and a process that tries to access it. This is not even a docker problem, b/c the problem happens regardless wether the process is wrapped by a container or not.

You will want to use a named docker volume backed by nfs v4 instead of mounting it on the host and binding it into a container folder. With named volumes Docker will allign the container and remote share behavior for you. If you use the forum search you will find plent of threads that discuss this mater and will provide examples on how to create such named volumes using the cli or docker compose.