Differences
This shows you the differences between two versions of the page.
linux_wiki:nfs_shares [2018/03/23 16:21] billdozor [NFS Server Setup] |
linux_wiki:nfs_shares [2019/05/25 23:50] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== NFS Shares ====== | ||
- | |||
- | **General Information** | ||
- | |||
- | Creating NFS shares on a server and connecting to them via a client. | ||
- | |||
- | **Checklist** | ||
- | * Distro(s): Enterprise Linux 7 | ||
- | * Other: Two systems (server and client) | ||
- | |||
- | ---- | ||
- | |||
- | ====== NFS Server Setup ====== | ||
- | |||
- | * Install required package< | ||
- | * Start and enable the NFS Server< | ||
- | systemctl enable nfs-server</ | ||
- | * Create your share directory structure< | ||
- | * Create an export line to share the directory< | ||
- | |||
- | / | ||
- | * / | ||
- | * 192.168.1.0/ | ||
- | * Other ways to share are to specify single hostnames(short, | ||
- | * If a firewall is running, allow nfs, rpc-bind, and mountd< | ||
- | firewall-cmd --permanent --add-service=rpc-bind | ||
- | firewall-cmd --permanent --add-service=mountd | ||
- | firewall-cmd --reload</ | ||
- | * nfs (tcp/udp 2049) => needed for NFSv4 | ||
- | * rpc-bind (tcp/udp 111) => needed for NFSv3 compatibility and for showmount to work from client | ||
- | * mountd (tcp/udp 20048) => needed for the " | ||
- | |||
- | ---- | ||
- | |||
- | ===== NFS Server: Increasing NFS Threads ===== | ||
- | |||
- | To increase NFS server performance, | ||
- | |||
- | * CentOS 7 | ||
- | * Edit the following config file< | ||
- | |||
- | # Number of nfs server processes to be started. | ||
- | # The default is 8. | ||
- | RPCNFSDCOUNT=16 | ||
- | </ | ||
- | * Restart the nfs-config service< | ||
- | * Restart the nfs service< | ||
- | * Verify | ||
- | * NFS running sysconfig (takes effect after nfs-config restart)< | ||
- | RPCNFSDARGS=" | ||
- | * " | ||
- | th 16 0 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000</ | ||
- | * Running processes< | ||
- | 16</ | ||
- | |||
- | ---- | ||
- | |||
- | ====== NFS Client Setup ====== | ||
- | |||
- | * Install required package< | ||
- | * View available mounts on NFS Server< | ||
- | |||
- | Export list for fileserver01: | ||
- | / | ||
- | * Mount temporarily< | ||
- | * Mount persistently< | ||
- | |||
- | ## NFS Shares ## | ||
- | fileserver01:/ | ||
- | * _netdev => Mount option to skip mounting this location until the network is available. | ||
- | |||
- | ---- | ||