Synology NFSv4

From GHER

Jump to: navigation, search

Issue: UID and GID do not match between NFS server and NFS client. The NFSv4 solves this issue. In the following the server has the host name "nas2" and the client "client-hostname".


On client

  • The default "domain name" is the fully qualified domain name minus the hostname. This can be changed by editing the file /etc/idmapd.conf.

On server

  • Enable NFS and NFSv4 in control panel and set domain name (the same as on the client(s))
  • Login as root to Synology server:
mkdir /volume1/NFSv4
mkdir /volume1/NFSv4/abarth
chown abarth.users /volume1/NFSv4/abarth


Manual test

Test export on the server

exportfs -o rw,fsid=0,insecure,no_subtree_check,async client-hostname:/volume1/NFSv4

Test on client

showmount -e nas2

should show this

Export list for nas2:
/volume1/NFSv4 client-hostname

Manual mount

sudo mkdir /mnt/nas2
sudo mount -t nfs4  nas2:/ /mnt/nas2

Permanent exporting and mounting

On server, add in /etc/exports

/volume1/NFSv4 client-hostname(rw,fsid=0,insecure,no_subtree_check,async)

Then run exportfs -a.

On client, add in /etc/fstab

nas2:/                       /mnt/nas2    nfs4    rw,soft,rsize=8192,wsize=8192,nosuid,intr,tcp    0    0

Then run sudo mount -a. Note that /volume1/NFSv4 does not appear in fstab on the client (unlike NFSv3).

Personal tools