Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
nfs [2017/03/27 16:11]
Stephane de Labrusse [Usage]
nfs [2020/01/19 04:04] (current)
Stephane de Labrusse [Custom rules]
Line 1: Line 1:
 +{{page>​stephdl_donate}}
 ==== NFS ==== ==== NFS ====
-<wrap hi>​Available for NS7</​wrap>​+<wrap hi>​Available for NS7 and NS6</​wrap>​
  
 [[https://​en.wikipedia.org/​wiki/​Network_File_System|Network File System]] (NFS) is a distributed file system protocol originally developed by Sun Microsystems in 1984,[1] allowing a user on a client computer to access files over a computer network much like local storage is accessed. NFS, like many other protocols, builds on the Open Network Computing Remote Procedure Call (ONC RPC) system. The NFS is an open standard defined in Request for Comments (RFC), allowing anyone to implement the protocol. [[https://​en.wikipedia.org/​wiki/​Network_File_System|Network File System]] (NFS) is a distributed file system protocol originally developed by Sun Microsystems in 1984,[1] allowing a user on a client computer to access files over a computer network much like local storage is accessed. NFS, like many other protocols, builds on the Open Network Computing Remote Procedure Call (ONC RPC) system. The NFS is an open standard defined in Request for Comments (RFC), allowing anyone to implement the protocol.
Line 7: Line 8:
 ====Maintainer==== ====Maintainer====
 Stephane de Labrusse at [[stephdl@de-labrusse.fr]] Stephane de Labrusse at [[stephdl@de-labrusse.fr]]
 +
 ====Installation==== ====Installation====
  
Line 88: Line 90:
 * by the fstab * by the fstab
  
-mount the network share in the fstab+mount the network share in the [[https://​access.redhat.com/​documentation/​en-US/​Red_Hat_Enterprise_Linux/​7/​html/​Storage_Administration_Guide/​nfs-clientconfig.html#​s2-nfs-fstab|fstab]]
  
 If you want to get mounted the NFS remote share at boot, you can add it in your fstab If you want to get mounted the NFS remote share at boot, you can add it in your fstab
Line 95: Line 97:
  
 <​file>​ <​file>​
-192.168.XX.205:/mirror/mirror/smeserver-repo ​ /​home/​build/​smeserver/ nfs rw  ​0 0+server:/usr/local/pub    ​/pub   nfs    ​defaults ​0 0
 </​file>​ </​file>​
  
 Using fstab is useful for a server which is always on, and the NFS shares are available whenever the client boots up. Edit /etc/fstab file, and add an appropriate line reflecting the setup. Again, the server'​s NFS export root is omitted. Using fstab is useful for a server which is always on, and the NFS shares are available whenever the client boots up. Edit /etc/fstab file, and add an appropriate line reflecting the setup. Again, the server'​s NFS export root is omitted.
- 
-/etc/fstab 
- 
-<​file>​ 
-servername:/​music ​  /​mountpoint/​on/​client ​  ​nfs4 ​  ​rsize=8192,​wsize=8192,​timeo=14,​_netdev 0 0 
-</​file>​ 
  
 Note: Consult the NFS and mount man pages for more mount options. Some additional mount options to consider are include: Note: Consult the NFS and mount man pages for more mount options. Some additional mount options to consider are include:
- 
-**rsize and wsize** ​ 
- 
-The rsize value is the number of bytes used when reading from the server. The wsize value is the number of bytes used when writing to the server. The default for both is 1024, but using higher values such as 8192 can improve throughput. This is not universal. It is recommended to test after making this change, see #​Performance tuning. 
- 
-**timeo** ​ 
- 
-The timeo value is the amount of time, in tenths of a second, to wait before resending a transmission after an RPC timeout. After the first timeout, the timeout value is doubled for each retry for a maximum of 60 seconds or until a major timeout occurs. If connecting to a slow server or over a busy network, better performance can be achieved by increasing this timeout value. 
- 
-**_netdev** ​ 
- 
-The _netdev option tells the system to wait until the network is up before trying to mount the share. systemd assumes this for NFS, but anyway it is good practice to use it for all types of networked file systems Note: Setting the sixth field (fs_passno) to a nonzero value may lead to unexpected behaviour, e.g. hangs when the systemd automount waits for a check which will never happen. ​ 
  
 * NFS Timeout * NFS Timeout
Line 124: Line 108:
 Nfs can have a really long timeout in case if the remote host is not reachable, if you want to avoid it you can do Nfs can have a really long timeout in case if the remote host is not reachable, if you want to avoid it you can do
  
 +<​file>​
 mount -t nfs -o nolock,​timeo=30,​retrans=1,​retry=0 192.168.xx.xxx:/​home/​e-smith/​files /​mnt/​partage mount -t nfs -o nolock,​timeo=30,​retrans=1,​retry=0 192.168.xx.xxx:/​home/​e-smith/​files /​mnt/​partage
 +</​file>​
  
 **timeo** **timeo**
Line 145: Line 131:
 <​file>​ <​file>​
 * use the wildcard '​*'​ * use the wildcard '​*'​
-* open your shares to ip(s) outside of your local network(s) 
 * use a domain to define your shares, the ip or the network are a mandatory * use a domain to define your shares, the ip or the network are a mandatory
 * use the root '/'​ * use the root '/'​
Line 177: Line 162:
  ​sync ​           Specifies that all changes must be written to disk before a command completes  ​sync ​           Specifies that all changes must be written to disk before a command completes
  ​no_wdelay ​      ​Forces the writing of changes immediately  ​no_wdelay ​      ​Forces the writing of changes immediately
-</​file>​ 
  ​root_squash ​    ​Prevents root users  ​root_squash ​    ​Prevents root users
  ​no_root_squash ​ Allow root users  ​no_root_squash ​ Allow root users
 +</​file>​
 ====Documentation==== ====Documentation====
  
Line 189: Line 174:
 ==== Issues ==== ==== Issues ====
  
-Please raise Issues on [[https://​github.com/​stephdl/​nethserver-nfs/​issues|github]]+Please raise Issues on [[https://​github.com/​stephdl/​dev/​issues|github]]
  
 ====Sources==== ====Sources====
 source are [[https://​github.com/​stephdl/​nethserver-nfs/​tree/​ns7|available]] ​ source are [[https://​github.com/​stephdl/​nethserver-nfs/​tree/​ns7|available]] ​
-{{tag>​module}}+{{tag>​module}}{{tag>​stephdl}}