LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   NFS mp option ? (https://www.linuxquestions.org/questions/linux-networking-3/nfs-mp-option-4175607806/)

Vilius 06-12-2017 03:21 PM

NFS mp option ?
 
Hello,

SLES 11 Sp4.

I want nfs not to export empty mount points automatically, I want it to do exportfs after data filesystems are mounted (mounting data filesystems on my box is done manually).
So I found this option mp:
Code:

# man exports
      mountpoint=path

      mp    This option makes it possible to only export a directory if it has successfully been mounted.  If no path is given (e.g.  mountpoint  or  mp)  then
              the  export  point  must  also be a mount point.  If it isn't then the export point is not exported.  This allows you to be sure that the directory
              underneath a mountpoint will never be exported by accident if, for example, the filesystem failed to mount due to a disc error.

I tried to use it:
Quote:

# cat /etc/exports
/data1 host1(mp=/data1,rw,no_root_squash,sync,no_subtree_check)
After reboot /data1 is not mounted so I expect nfs not to export it, but nfs exports it anyway:
Code:

# exportfs
/data1
                host1.domain.com

"export -ua" works fine - unexports everything.
I tried using nfsv3 nfsv4 - same result.

Any ideas where is the problem ?

Thanks,
Vilius M.

nini09 06-15-2017 02:45 PM

If no 'no_subtree_check' option, does it work fine?

Vilius 06-16-2017 06:29 AM

No, same result.

nini09 06-19-2017 02:42 PM

What's output of 'showmount -e'?


All times are GMT -5. The time now is 09:13 AM.