Book
- Basic setup of a SOHO server
- SoHo - Software repositories
- SoHo - Alias of loopback interface
- SoHo - IPtables configuration example
- SoHo - Webmin
- SoHo - DNS
- SoHo - VMWare
- SoHo - Windows
- SoHo - OpenVPN
- SoHo - Remote Desktop
- Nameserver on Windows XP forwarding to public DNS with private zones
- SoHO - NTP
- SoHo - SSH
- SoHo - Ubuntu prerequisites
- How to strengthen SSH
- Fixing Nessus complaints
- Java installation on RHEL 4
- Installing vsFTPd on CentOS
- How to setup CA (certificate authority)
- Installation of VIM X11 and archivers on RHEL 4 x86_64
- SoHo - MS & Open-Office
- User management
- CommuniGate Pro
- Backup
- Issue tracking for small groups
- Jabber setup and configuration
- Monitoring & Statistics
- Printing in SOHO
- Faxes in SOHO
- T38 Modem
- PostScript fonts for faxes
- Installing Brother MFU drivers on Ubuntu
- Installing Hylafax client on RHEL4 and Fedora
- Installing Hylafax server on RHEL4
- Installing Hylafax server on Ubuntu
- Integrating Hylafax with CUPS
- Integrating Hylafax with CommuniGate
- Managing Hylafax from Ubuntu client
- Sending and receiving faxes over internet (links)
- How to test faxing
- Drivers for Brother MFUs
- Brand new idea about faxing
- External faxing resources
- Antivirus & Antispam
- External SOHO References
- Supplementary SOHO procedures
Homes - NFS
1. NFS server on Redhat
Install NFS packages:
yum install -y nfs- utils portmap
Edit /etc/sysconfig/nfs:
RQUOTAD_PORT=951 LOCKD_TCPPORT=952 LOCKD_UDPPORT=953 MOUNTD_PORT=954 STATD_PORT=955 STATD_OUTGOING_PORT=956
Edit /etc/exports:
/group 10.20.0.0/16(async,wdelay,secure,no_root_squash,rw)
Make NFS start by default:
chkconfig portmap on chkconfig nfs on chkconfig nfslock on service portmap restart service nfs restart service nfslock restart
It is crucial that clients access NFS via internal network since port mapping requires many addresses.
2. NFS client on Ubuntu
Install nfs-common:
apt-get install -y nfs-common autofsautofs-ldap
Edit /etc/defaults/nfs:
NEED_STATD=yes STATDOPTS="--port 955 --outgoing-port 956"
Edit /etc/auto.master:
/group /etc/auto.group --timeout=600
tcp,nolock,noatime,rsize=1024,wsize=1024,bg,intr,soft,
nfsvers=3,port=2049,mountport=954,nosuid,rw
Note: The nolock option eases the gconfd NFS PITA (mentioned here) by disabling negotiation of file locking with the server. Probable side effect is that several users can run the same session from several hosts unattended and damage GNOME environment.
Edit /etc/auto.group:
.hidden 10.20.0.1:/group/hidden public 10.20.0.1:/group/public * 10.20.0.1:/group/&/Client
Restart automounter:
/etc/init.d/autofs reload
The trackerd crawler prevents auto mounts from unmounting. Remove it:
apt-get remove -y tracker
gconfd locks home directory some time after logout. The fix is described here.
3. NFS performance tuning
General guidelines:
- Set noatime (Ubuntu performs the noatime action extensively)
- In Gutsy, install nfs-common_1.1.2-4ubuntu1_i386.deb (fixes NFS bug)
- Use rsize/wsize of 1024 to fit in a single VPN packet
- Use tcp
Measurements
Time to start session:
| Time (s) | Client | Server |
| 50 |
tcp,lock,noatime,rsize=1024,wsize=1024, |
async,wdelay |
| 45 | tcp,lock,noatime,rsize=1024,wsize=1024 | async,wdelay |
| 45 | udp,lock,noatime,rsize=1024,wsize=1024 | async,wdelay |
| 49 | tcp,nolock,noatime,rsize=1024,wsize=1024 | async,wdelay |
| 53 |
tcp,nolock, |
async,wdelay |
| 49 | tcp,nolock,noatime,rsize=1024,wsize=1024 | sync,no_wdelay |
- Common client options: bg,intr,soft,soft,nfsvers=3,mountport=954,nosuid,rw
- Common server options: rw,secure,no_root_squash
Cite: UNIX NFS also uses large IO sizes by default, but each NFS client can choose its own read and write sizes. The size must be a power of 2, so I use 1024-byte IO sizes for NFS across my (UDP-based) OpenVPN tunnel between my home and office to make the NFS IO size fit into asingle VPN packet. I get performance on a par with what I'd expect given the underlying bandwidth.
4. UNFS on CentOS VPS
OpenVZ does not support NFS in the kernel, so the user-space daemon UNFS3 comes to rescue.
First, install the package:
yum install unfs3
Edit /etc/sysconfig/unfsd
# User-space NFSv3 daemon options. See man unfsd. # "-n NFS_SERVICE_PORT -m MOUNT_SERVICE_PORT", # (-t) TCP protocol, (-p) do not register with portmapper OPTIONS="-n 950 -m 954 -t -p"
Edit /etc/exports:
# unfs3 does not support these options: wdelay,secure
#/group 10.20.0.0/16(async,wdelay,secure,no_root_squash,rw)
/group 10.20.0.0/16(secure,no_root_squash,rw)
Activate the daemon:
chkconfig unfsd on service unfsd restar t
The client configuration is basically the same. However, we don't use automounter, and the following NFS option changes in the master automounter file: port=950.
TODO: investigate if we can use rpc.statd with UNFS.
Related Links
- Complete Linux NFS How-To
- Installing NFS in OpenVZ container
- NFS How-To: Performance tuning
- NFS over OpenVPN over PPPoE: MTU and performance problems (openvpn mail list)
- NFS performance article on techrepublic.com
- NFS Performance FAQ
- O'Reilly Managing NFS and NIS: Chapter 18. Client-side performance tuning
- UNFS3 homepage
- UNFS3 RPM on apt.sw.be
- UNFS3 RPM on vitki.net

- Visit Complete Linux NFS How-To
- Visit Installing NFS in OpenVZ container
- Visit NFS How-To: Performance tuning
- Visit NFS over OpenVPN over PPPoE: MTU and performance problems (openvpn mail list)
- Visit NFS performance article on techrepublic.com
- Visit NFS Performance FAQ
- Visit O'Reilly Managing NFS and NIS: Chapter 18. Client-side performance tuning
- Visit UNFS3 homepage
- Visit UNFS3 RPM on apt.sw.be
- Visit UNFS3 RPM on vitki.net

Comments
Post new comment