192.168.1.12 as host
192.168.1.11 as the client
192.168.1.10 as the client
1. Configure on the host
[[Email protected] ~] # Vi/etc/exports
/Home/youchou/root/upload 192.168.1.10 (RW, sync, root_squash)
/Home/youchou/index 192.168.1.10 (RW, sync, root_squash)
/Home/youchou/root/upload/192.168.1.11 (RW, sync, root_squash)
/Home/youchou/index 192.168.1.11 (RW, sync, root_squash)
2. Configure on the host
[[Email protected] ~] # Exportfs-RV
Exporting 192.168.1.10:/home/youchou/Index
Exporting 192.168.1.11:/home/youchou/Index
Exporting 192.168.1.10:/home/youchou/root/upload
Exporting 192.168.1.11:/home/youchou/root/upload
[[Email protected] ~] #
3. mount on the client
Mount-t nfs 192.168.1.12:/home/youchou/root/upload // home/youchou/root/upload/
Mount-t nfs 192.168.1.12:/home/youchou/index // home/youchou/index/
4. Problems
1) Mount: 192.168.1.111:/utulinux failed, reason given by server: Permission denied
Check whether the configuration file exports is allowed for mounting.
2) Mount: RPC: unable to receive; errno = No route to host
First, check whether it is in the same CIDR Block
Further input:
[[Email protected] etc] # service iptables status
Check whether the firewall is enabled. If yes, disable it.
[[Email protected] etc] # service iptables stop
3) Mount: RPC: unable to receive; errno = connection refused
First, check whether the NFS service is enabled. Second, check whether the rpcbind is enabled. If the rpcbind is not running, restart the NFS service after restarting the rpcbind, the restart of rpcbind has affected some NFS configurations and requires restart.
Mount NFS in centos