NFS : Network File System

fileshare

A network file system is a computer file system that supports sharing of files, printers, etc over a computer network.

Package : nfs-utils.rpm

Configuration file : /etc/exports

Daemon : nfs

Procedure to share a folder via NFS. Here we are going to share /abc

mkdir /abc
touch /abc/file_1
echo “/abc         *(ro)” >> /etc/exports
service nfs restart

Procedure to mount the ‘/abc’ folder from ‘genuinewebhosting.net’ to a local folder ‘/mnt/temp’
Clinet_host ] # mount genuinewebhosting.net:/abc /mnt/temp

If the above mount has to be permanent, we need to add the following entry in /etc/fstab in the client host.
genuinewebhosting.net:/abc /mnt/temp nfs defaults 0 0

client _host ] # mount -a : This command reads the fstab and mounts points not already mounted.

client _host ] # showmount -e genuinewebhosting.net
: This command lists all folders shared by genuinewebhosting.net
AutoFS

Autofs controls the operation of the automount daemons, which automatically mount file systems when you access it, and un-mount them after when not used for a small period of time.

Procedure to share a folder /abc from genuinewebhosting.net using autofs

mkdir /new
echo “/new /etc/auto.misc” >> /etc/auto.master
echo “xyz -fstype=nfs 10.146.179.113:/abc” >> /etc/ auto.misc
service autofs restart
ls -l /new/xyz