Skip to content

NFS

Show NFS shares on NFS Server

showmount --exports
exportfs -v
cat /var/lib/nfs/etab

List NFS mount points on NFS Clients

mount | grep nfs
nfsstat --mounts
cat /proc/mounts | grep nfs

NFS server

# minimal install
apt install nfs-kernel-server

#create folder for mounting
mkdir /nfs

# add record for access
echo "/nfs\t10.0.1.0/24(rw,sync,no_subtree_check,no_root_squash)" >> /etc/exports

# export config
exportfs -a

# start service
systemctl start nfs-kernel-server

# enable service after reboot
systemctl enable nfs-kernel-server

NFS client

# minimal install
apt install nfs-common

#create folder for mounting
mkdir /nfs

# create record for mount 
echo "10.0.1.105:/nfs    /nfs  nfs auto,noatime,nolock,bg,nfsvers=4,intr,tcp,actimeo=1800 0 0" >> /etc/fstab

# mount folder
mount /nfs