**see imp update at bottom of orig. question.
not sure how to unexport only the 'world' mountable share? I have a NFS server which had a share with world-mountable permissions. To make it mountable only by the clients on a subnet i added the share to /etc/exports, which was empty before. I am not sure how the folder was shared before?? I put the entry in /etc/exports and shared again, but it is still showing world mountable share available.
before:
[root@nfsServer ~]# exportfs -v
/export/home <world>(rw,wdelay,no_root_squash,no_subtree_check)
# ls -l /var/lib/nfs/xtab
-rw-r--r-- 1 root root 0 Dec 15 2009 /var/lib/nfs/xtab
# ls -l /proc/fs/nfs
-r--r--r-- 1 root root 0 May 2 00:41 exports
change:
added following line to /etc/exports (which was empty before)
/export/home 192.168.253.0/24(rw,wdelay,no_root_squash,no_subtree_check)
then re-export folders:
# exportfs -ra
after:
[root@nfsServer ~]# exportfs -v
/export/home 192.168.253.0/24(rw,wdelay,no_root_squash,no_subtree_check)
/export/home <world>(rw,wdelay,no_root_squash,no_subtree_check)
# cat /etc/exports
/export/home 192.168.253.0/24(rw,wdelay,no_root_squash,no_subtree_check)
# ls -l /var/lib/nfs/xtab
-rw-r--r-- 1 root root 0 Dec 15 2009 /var/lib/nfs/xtab
# ls -l /proc/fs/nfs
-r--r--r-- 1 root root 0 May 2 00:41 exports
[root@nfsServer ~]# ls -ltr /proc/fs/nfsd
total 0
-rw------- 1 root root 0 Mar 1 2017 versions
-rw------- 1 root root 0 Mar 1 2017 threads
-rw------- 1 root root 0 Mar 1 2017 portlist
-rw------- 1 root root 0 Mar 1 2017 nfsv4recoverydir
-rw------- 1 root root 0 Mar 1 2017 nfsv4leasetime
-rw------- 1 root root 0 Mar 1 2017 filehandle
-r--r--r-- 1 root root 0 Mar 1 2017 exports
[root@nfsServer ~]# cd /proc/fs/nfsd
[root@nfsServer nfsd]# cat exports
# Version 1.1
# Path Client(Flags) # IPs
/export/home *,192.168.253.0/24(rw,no_root_squash,sync,wdelay,no_subtree_check)
# cat versions
+2 +3 -4
Note that it has * added in front of the /etc/exports entry. I want to know where is the "*" entry coming from and how to get rid of it. All help is appreciated.
system: Red Hat Enterprise Linux Server release 5.5 (Tikanga) 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:39 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
*IMP: sorry i missed to clarify that this is NFS running on VCS HA on redhat 5.5. so when i restart nfs, i get err:
# service nfs stop
Shutting down NFS mountd: [ OK ]
Shutting down NFS daemon: [ OK ]
Shutting down NFS quotas: [ OK ]
Shutting down NFS services: [ OK ]
# service nfs start
Starting NFS services: [ OK ]
Starting NFS quotas: [ OK ]
Starting NFS daemon: [FAILED]
# service nfs start
Starting NFS services: [ OK ]
Starting NFS quotas: [ OK ]
Starting NFS daemon: [FAILED]
but when you check...
# service nfs status
rpc.mountd (pid 24103) is running...
nfsd (pid 24052 24051 24050 24049 24048 24047 24046 24045) is running...
rpc.rquotad (pid 22872 20490 19133) is running...
I figured that in VCS main.cf this line sets up the 'nfs' share: but i am not sure how to add subnet restriction to it...
Share share_home (
Options = "rw, no_root_squash"
PathName = "/export/home"
)
Thanks. Raj