# rpcinfo -p | grep nfs 100003 2 udp 2049 nfs 100003 3 udp 2049 nfs 100003 4 udp 2049 nfs 100003 2 tcp 2049 nfs 100003 3 tcp 2049 nfs 100003 4 tcp 2049 nfs #
# nfsstat -m /reports from 192.168.0.10:/nfs/share/reports Flags: rw,vers=3,rsize=524288,wsize=524288,soft,intr,proto=tcp,timeo=600,retrans=2,sec=sys,addr=192.168.0.10 #mount nfs-server:/vol/test on /home/test type nfs (rw,hard,intr,vers=4,addr=192.168.0.10,clientaddr=192.168.0.11
# /etc/init.d/portmap start # /etc/init.d/nfs start
/home/public client1(rw,no_root_squash) # Permit root access /home/pub 192.168.1.0/255.255.255.0(ro) /mnt/cdrom *(ro) /home/public client1(rw,no_root_squash) client2(rw,no_root_squash)
Option | Notes |
---|---|
ro | Permit read only |
rw | Permit read and write |
root_squash | Default Option |
no_root_squash | Permit root access |
timeo=n | Default is 7 (0.7sec) |
retrans=n | Default is 3 |
checkinng NFS configuration.
# exportfs -v
Reflect configuration.
# exportfs -a # exportfs -r
# /etc/init.d/portmap start
mount -t nfs 192.168.0.100:/home/public /mnt/public
192.168.0.100:/home/public /mnt/public nfs rw,hard,intr 0 0
Option | Notes |
---|---|
hard | |
soft | |
intr | |
If you start OS, nfs automatically start. If you stop os, and nfs automatically umount.
chkconfig netfs on