とらりもんHOME  Index  Search  Changes  Login

NFS

NFS (network file system) on Ubuntu 16.04

2020/03/26 Kenlo Nasahara

  • Suppose xxx.xxx.xxx.xxx is the IP address of the NFS server.
  • Suppose yyy.yyy.yyy.yyy is the IP address of the NFS client.
  • Suppose you want to mount /work on the server to /work on the client.
  • Note: In some cases, SSH-FS may be more useful and suitable than NFS. Especially if you are not admin of the server, and the admin does not help you, NFS is a bad choice.

install requirements

(server)
$ sudo apt-get install -y nfs-kernel-server
(client)
$ sudo apt-get install -y nfs-common

setting

(server)
sudo vi /etc/exports
/work  yyy.yyy.yyy.yyy(rw,sync,no_subtree_check)
sudo exportfs -ra
sudo vi /etc/
(no need to take care of /etc/hosts.allow)
(client)
sudo mkdir /work

mount test

(client)
$ sudo mount -t nfs xxx.xxx.xxx.xxx:/work /work

automount on the client

(client)
$ sudo vi /etc/fstab
xxx.xxx.xxx.xxx:/work    /work   nfs    defaults 0 0
Last modified:2020/03/26 08:41:39
Keyword(s):
References: