0% found this document useful (0 votes)
19 views

5.2.1 NFS

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

5.2.1 NFS

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

NFS

Network File System


Introduction


NFS allows to share directories and files between Linux Systems


nfs-utils* is a software package name


Additional package required is rpcbind*


To check the package in the system

#rpm –qa | grep nfs-utils


# rpm -qa | grep rpcbind


Service name is nfs-server
NFS Server Configuration

Mount the disk /dev/nvme0n1p6 to /sharedir directory
#mkdir /sharedir
#mount /dev/nvme0n1p6 /sharedir

Exported File System(s) are defined in configuration file /etc/exports.

# vi /etc/exports

/sharedir 192.168.1.0/24(rw,sync)

Start the service

# systemctl restart nfs-server


Stop firewall

# systemctl stop firewalld


To refresh the service
# exportfs –r


To check the shared directory
# exportfs –v
NFS client configuration


Mount the directory to be shared permanently in /etc/fstab

#mkdir /data
#vi /etc/fstab

192.168.1.1:/sharedir /data nfs defaults 0 0


(OR) Mount the directory to be accessed temporarily

#mount -t nfs 192.168.1.1:/sharedir /data

#mount -a
#df -h


Note:

— The mount point must exist before /etc/fstab is read or the file
system is manually mounted.
NFS client configuration- Troubleshooting


Use showmount command to find and verify which areas are
mounted on the client side

# showmount –e 192.168.1.1

# mount -a

# mount
Troubleshooting

When your NFS server is configured as NFSv4-only, clients attempting
to mount shares using NFSv2 or NFSv3 fail with an error like the
following:

“Requested NFS version or transport protocol is not supported.”


To configure your NFS server to support only NFS version 4.0 and
later. Disable NFSv2, NFSv3, and UDP by adding the following line to
the /etc/sysconfig/nfs configuration file:

RPCNFSDARGS="-N 2 -N 3 -U"

Optionally, disable listening for the RPCBIND, MOUNT, and NSM
protocol calls, which are not necessary in the NFSv4-only case.


The effects of disabling these options are:


Clients that attempt to mount shares from your server using
NFSv2 or NFSv3 become unresponsive.

The NFS server itself is unable to mount NFSv2 and NFSv3 file
systems.

You might also like