Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
nfs [2017/03/27 21:07] Stephane de Labrusse |
nfs [2020/12/21 18:42] Stephane de Labrusse [Usage] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ==== Glpi ==== | + | {{page> |
- | <wrap hi> | + | ==== NFS ==== |
+ | <wrap hi> | ||
[[https:// | [[https:// | ||
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 16: | Line 18: | ||
| | ||
==== Usage ==== | ==== Usage ==== | ||
- | The rpm installs nethserver-samba and nethserver-ibay, | + | |
+ | The rpm installs nethserver-samba and nethserver-ibay, | ||
You have two modes | You have two modes | ||
* Use the server UID/GID server **(access control by GID and IP)** | * Use the server UID/GID server **(access control by GID and IP)** | ||
- | |||
In this mode the users of the remote client must be in the same GID that the owning group of the samba share. | In this mode the users of the remote client must be in the same GID that the owning group of the samba share. | ||
You must add manually to all users the GID as a secondary group | You must add manually to all users the GID as a secondary group | ||
- | |||
Any root users of any remote clients can overwrite this GID limitation, hence the option root squash to restrict the root power. | Any root users of any remote clients can overwrite this GID limitation, hence the option root squash to restrict the root power. | ||
- | |||
In clear you have two access control (GID and IP) | In clear you have two access control (GID and IP) | ||
* Lazzy mode **(access control by IP)** | * Lazzy mode **(access control by IP)** | ||
- | |||
Uncheck the option above, then you don't need to set a second gid on users, the only access control is at the IP level | Uncheck the option above, then you don't need to set a second gid on users, the only access control is at the IP level | ||
- | |||
If you want you can allow quickly a read access to all your local network (you must respect the gid if checked) | If you want you can allow quickly a read access to all your local network (you must respect the gid if checked) | ||
Line 88: | Line 86: | ||
* by the fstab | * by the fstab | ||
- | mount the network share in the fstab | + | mount the network share in the [[https:// |
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 93: | ||
< | < | ||
- | 192.168.XX.205:/mirror/mirror/smeserver-repo | + | server:/usr/local/pub |
</ | </ | ||
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' | 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' | ||
- | |||
- | /etc/fstab | ||
- | servername:/ | ||
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 # | ||
- | |||
- | **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 121: | Line 104: | ||
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 | ||
+ | < | ||
mount -t nfs -o nolock, | mount -t nfs -o nolock, | ||
+ | </ | ||
**timeo** | **timeo** | ||
Line 142: | Line 127: | ||
< | < | ||
* 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 174: | Line 158: | ||
| | ||
| | ||
- | </ | ||
| | ||
| | ||
+ | </ | ||
====Documentation==== | ====Documentation==== | ||
+ | [[https:// | ||
+ | [[https:// | ||
====Admin' | ====Admin' | ||
FIXME | FIXME | ||
==== Issues ==== | ==== Issues ==== | ||
- | Please raise Issues on [[https:// | + | Please raise Issues on [[https:// |
====Sources==== | ====Sources==== | ||
source are [[https:// | source are [[https:// | ||
- | {{tag> | + | {{tag> |