NFS server is exporting the wrong directories

I see you are using NFSv4 (the fsid=0 in the /proc/fs/nfsd/exports output gives it away). NFS roots are rquired for NFSv4. You may have better luck with this /etc/exports.

/home                    *(ro,fsid=0)
/home/user1/documents/   *(ro,sync)

You might also need to edit the domain in /etc/idmapd.conf for the server and clients.

On a side note, I highly recommend replacing that asterisk with a subnet if you don't want your data accessable to untrusted systems.


I had a problem with:

/my/dir1 *(rw,sync,fsid=0,crossmnt,no_subtree_check)
/my/dir2 *(rw,sync,fsid=0,crossmnt,no_subtree_check)

and both mount appeared for /my/dir1.

I was trying to use the same default options as given in the Ubuntu 16.04 nfs-kernel-server package /etc/exports example file: https://unix.stackexchange.com/questions/198009/what-provides-etc-exports-and-how-do-i-find-that-out

The solution was to remove fsid=0,crossmnt and use just:

/my/dir1 *(rw,sync,no_subtree_check)
/my/dir2 *(rw,sync,no_subtree_check)

This is also mentioned at: https://forums.opensuse.org/showthread.php/481263-NFS-directs-to-the-wrong-shared-folder/page2?s=ae345ec054b854b5cf036cd1816626f4

I don't really know what all of those do, one day I'll learn NFS. Maybe.