nfs modified
nfs modified
NFS is developed only for sharing files and folders only between Linux systems. In NFS local
directories are shared over a network and remote clients interact with them as they are mounted locally.
rpcbind
rpcbind responds to requests for RPC services and sets up connections to the requested RPC
service.
nfs
service nfs start starts the NFS server and the appropriate RPC processes to service requests for
shared NFS file systems.
Fstab:
File System Table. It is basically a config file that will tell your computer which devices
(or virtual devices) to use on boot.
On Server (NFS Server)
1. Verify that nfs package is already installed [root@localhost ~]# rpm -qa | grep nfs
2. Verify the nfs service status [root@localhost ~]# systemctl status nfs-server
4. Verify the nfs service status [root@localhost ~]# systemctl status nfs-server
5. Configure the nfs service to start [root@localhost ~]# systemctl enable rpcbind
automatically at the boot time [root@localhost ~]# systemctl enable nfs-server
[root@localhost ~]# systemctl status nfs-server
10. Restart the nfs service [root@localhost ~]# systemctl restart rpcbind
[root@localhost ~]# systemctl restart nfs-server
On NFS Client
4. Access the shared folder and verify the content [root@localhost ~]# cd /mnt/beta
[root@localhost beta]# ls
5. Make a change for the file gamma and save [root@localhost beta]# vi gamma
the change
9. Save the change on the fstab file and reboot [root@localhost ~]# reboot
the server
If you make a new entry in fstab it will not [asharma@localhost ~]$ mount -a
auto-mount. Therefore you must reload / refresh
the entries.
10. Is the shared folder still mounted? [asharma@localhost ~]$ df
11. Access the shared folder and make a [root@localhost ~]# cd /mnt/beta/
change for the file zeta and save the [root@localhost beta]# ls
change gamma zeta
[root@localhost beta]# vi zeta
Extra notes:
If your turn on network card every time you restart the client then the mount calls executes before
networking is up. Solution is either you need to run mount -a every time or just make a minor change to
ethernet configuration
Edit the configuration file for the network interface ( normally /etc/sysconfig/network-scripts/ifcfg-eth0
) and changing: ONBOOT=no to ONBOOT=yes