[SOLVED] Cant delete Share due to orphaned NFS mount configuration

I’m attempting to delete a Share via the UI but am receiving the following error:

Share (Share1) cannot be deleted as it is exported via NFS. Delete NFS exports and try again.

      Traceback (most recent call last):
      File "/opt/rockstor/eggs/gunicorn-19.7.1-py2.7.egg/gunicorn/workers/sync.py", line 68, in run_for_one
      File "/opt/rockstor/eggs/gunicorn-19.7.1-py2.7.egg/gunicorn/workers/sync.py", line 27, in accept
        client, addr = listener.accept()
      File "/usr/lib64/python2.7/socket.py", line 202, in accept
        sock, addr = self._sock.accept()
    error: [Errno 11] Resource temporarily unavailable

Reviewing NFS config via Storage > NFS > Advanced Edit I see that the snapshot folders are still mounted in the automatically added entries. Note there is no NFS export created by me for the share when viewing the current NFS exports in the UI. Previously it was mounted. Then I modified the mount to point to a different share. But then as part of trying to figure out this problem myself I deleted said NFS export however the original exports remain. It seems like perhaps when I modified the NFS export to point from Share1 to Share2 the removal of any entries for Share1 didn’t happen in the export config. Then even after deleting the NFS export in the UI it still didn’t delete the original Share1 config so now its basically orphaned.

How exactly can I clean it up now?

Hi @t3kka

Have you tried restarting the NFS service? You can do that by going to System > Services and the turning off NFS and then turning it on.

If that doesn’t work, can you provide the out put from the following:

sudo cat /var/lib/nfs/etab



Hi @vesper1978 -

Yes I tried that several times. Also checked the noted etab file and it appeared correct but for whatever reason the Rockstor app still seemed to think it was mounted.

In short the resolution was to actually go back to the share and open the snapshot tab and manually delete the snapshots from there. Then, without even having to restart the NFS service, the NFS exports were fixed (no orphaned entries anymore) and then I could successfully delete the share.

I really need to better understand how the snapshots work and potentially impact things like NFS because I had a similar weird experience with Plex and my media directory (that I was snapshotting).