Nfs – What does NFS do when /etc/exports contains an export that’s within the directory of another export

nfs

I have an /etc/exports file like this:

/home          remotehost.com(rw,root_squash,anonuid=500,anongid=500)
/home/fred     remotehost.com(rw,root_squash,anonuid=1000,anongid=1000)

Do the two exports work independently of one another or can conflicts occur? For instance, if I mount /home and /home/fred, what will happen? If I unmount /home, will /home/fred stay mounted?

Thanks

Best Answer

The first line doesn't grant the right to mount /home/fred, it only specifies the one mount point. The second line is independent of the first. Where you mount them to will determine inheritance issues.