NFS allows to share files and folders over network and is much much faster than
samba while using way less resources.
To setup a NFS server on Fedora 26 install:
$ dnf install nfs-utils
Shared directories are listed in the following configuration file:
vi /etc/exports"> --- # Syntax # <path> <ipaddr>(<option>) /home/user/Public 192.168.0.0/255.255.255.0(ro,sync)
More information can be found here: Fedora NFS administration guide.
In the above example, the the directory ‘/home/user/Public’ can be accessed by every client in the same LAN with read-only permissions.
In case SELinux is active and enforcing rules some further configuration might be required:
### Allow nfs to share every file directory with read-only attribute $ setsebool -P nfs_export_all_ro 1 ### More NFS related SELinux flags can be found using the following command $ semanage boolean -l | grep nfs
Enable NFS daemon service and start it:
$ systemctl enable nfs-server $ systemctl start nfs-server
To mount a NFS share on a client type:
### mount -t nfs <server_IP>:/<path_to_dir> <mountpoint> $ sudo mount -t nfs <SERVER_IP/HOSTNAME>:/home/user/Public /mnt/nfsshare/
To have the volume mounted at boot edit
<SERVER_IP/HOSTNAME>:/home/user/Public /mnt/nfsshare/ nfs rw,timeo=3000 0 0
timeo parameter is used to specify a timeout in milliseconds, adjust accordingly.