CIT 470 Advanced Network and System Administration: Lab #16: NFS | |||||||
|
|||||||
In this lab, we'll use your physical machine as the NFS server, and your virtual machine as the NFS client.
su vim /etc/exports
exportfs -a
exportfs -v cat /proc/fs/nfs/exports
rpcinfo -p
useradd student
client> grep student /etc/passwd server> grep student /etc/passwd
df -h su umount /home
mount -t nfs SERVER_IP_ADDRESS:/home /home rpcinfo -p SERVER_IP_ADDRESS
vim /etc/sysconfig/network # Set MOUNTD_PORT=4002 service nfs restart rpcinfo -p wireshark & vim /etc/sysconfig/iptables service iptables restart
df -h ls -l /home ls -l /home/student
umount /home vim /etc/fstab mount /home
ssh student@localhost # Or login via the VMWare console
client> echo "spam eggs" >spamneggs server> cat spamneggs
Now we'll check the performance of your NFS server from the client. We'll just look at the basics. For more in-depth performance tuning of NFS, we would need to use a tool like iozone and the NFS Optimization Chapter of the NFS HOWTO.
nfsstat
time dd if=/dev/zero of=/tmp/bigfile bs=1M count=256
time dd if=/dev/zero of=/home/bigfile bs=1M count=256
nfsstat
time bzip2 /tmp/bigfile
time bzip2 /tmp/bigfile
nfsstat