Can't configure NFS so that I can access a bind-mounted subdirectory using GUI.

  • I wanted to mount an NFS share which I had done before. So I did the usual and added an NFS share via gui:

    This didn't work at first, a subdirectory in the shared directory was empty when accessed remotely. Since this directory was bind-mounted to this folder I found that I needed to add 'crossmnt' as an extra option. So, I did that and then when mounting the NFS share I got the directory but this time when trying to access it I got -bash: cd: downloads: Stale file handle.

    After some better reading I realized I also needed to provide an NFS share of the subdirectory itself.


    This is where the real trouble began for me since the GUI only allows you to share Shared Folders.

    So my next attempt was to create a Shared Folder called 'downloads' mapped to the (bind mounted) subdirectory and also add it to the NFS shares.


    This, however, still didn't work. I still got the stale file handle error.

    Then after some trial, error and research I found that in order for crossmnt to work the bind-mounted inner NFS share has to be shared as a subdirectory of the main share.

    To test this hypothesis I went to /etc/exports which was:

    (I'll change those 20 to 32 later, idk how that happened)


    And changed /export/downloads to /export/SeedTransfer/downloads:

    And then reload the exports using sudo exportfs -ra.

    Et voilà, now when mounting the NFS share from the other machine we can access the subdirectory and see its contents.


    But now the real question, is there a way to accomplish this from the GUI. Because, as the /etc/exports files says, the changes I made to this file will be lost if I change stuff from the GUI.


    Thanks in advance,

    Karel.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!