Table of Contents

Prev  
 Next
, , , ,

NFS

There are a lot of resources online for NFS (Network File System). Nevertheless I decided to place my notes here to help me with my configuration, as there are a number of nuances that such notes will potentially assist with in the future. Sadly a number of resources I use seem out of date, not updated and/or possible subject to disappearance.

The following are some helpful links:

Some other interesting nfs related commands:

—-

NFS Server

sudo vim /etc/exports - edit the exports file as required

# /etc/exports: the access control list for filesystems which may be exported
/export         192.168.1.0/24(insecure,no_subtree_check,rw,nohide,fsid=0)
#/export/Disk1  192.168.1.0/24(insecure,no_subtree_check,rw,nohide)
#/export/Disk2  192.168.1.0/24(insecure,no_subtree_check,rw,nohide)
/export/Disk4  192.168.1.0/24(insecure,no_subtree_check,rw,nohide)
/export/shared  192.168.1.0/24(insecure,no_root_squash,no_subtree_check,rw,nohide)
/export/storage 192.168.1.0/24(insecure,no_subtree_check,rw,nohide,fsid=1)

Adjust the sudo vim /etc/fstab file to allow for boot setup of nfs export mount points.

#<file system>                              <mount point> <type>  <options>        <dump>  <pass>

UUID=d426f5e0-7fbd-4e7f-915e-b7c78eb70877   /              ext4   errors=remount-ro 0       1
UUID=e3442da3-4eaf-477d-94af-6ace66097a54   none           swap   sw                0       0
UUID=2fedae7e-8214-4fec-a6dd-85d7026d474f   /media/Disk1   ext4   defaults          0       0
UUID=38f52a66-fe96-4eb4-a794-6fe1d02bab4a   /media/Disk2   ext4   defaults          0       0
UUID=1cb1509c-ec09-46cd-ab30-23f3be5b554e   /media/Disk3   ext4   defaults          0       0
UUID=2ba18a1e-d48d-4122-bff8-30c2bc359749   /media/Disk4   ext4   defaults          0       0
/media/Disk1:/media/Disk2                   /srv/storage   fuse.mergerfs use_ino,defaults,allow_other,minfreespace=50G,fsname=mergerfs                       0       0
#/media/Disk1                               /export/Disk1   bind    bind            0       0
#/media/Disk2                               /export/Disk2   bind    bind            0       0
/srv/storage                                /export/storage bind    bind            0       0
/media/Disk4                                /export/Disk4   bind    bind            0       0
/home/shared                                /export/shared  bind    bind            0       0

The base server configurations options are given in: sudo vim /etc/default/nfs-kernel-server. However the current base options meet our needs and do not need to be modified.

To apply configuration changes sudo systemctl restart nfs-server.service

NFS Client

To apply configuration changes sudo systemctl restart nfs-client.target

The base client configurations options are given in: sudo vim /etc/default/nfs-common. However the current base options meet our needs and do not need to be modified.

Mounting the nfs client manually:

Check status of clients:

To allow automatic boot of nfs clients: sudo vim /etc/fstab

192.168.1.5:/export  /mnt  nfs4 bg 0 0 

Prev  
 Next