Presentation is loading. Please wait.

Presentation is loading. Please wait.

Network File System Peter DSouza. NFS  Allows machines to mount a disk partition on a remote machine as if it were a local drive  Other systems similar.

Similar presentations


Presentation on theme: "Network File System Peter DSouza. NFS  Allows machines to mount a disk partition on a remote machine as if it were a local drive  Other systems similar."— Presentation transcript:

1 Network File System Peter DSouza

2 NFS  Allows machines to mount a disk partition on a remote machine as if it were a local drive  Other systems similar to NFS –  AFS  CODA

3 Setting up NFS server  Configuration files  /etc/exports (required)  /etc/hosts.allow (optional)  /etc/hosts.deny (optional)

4 Setting up NFS server(Contd.)  /etc/exports directory machine1(option11,option12) machine2(option21,option22) eg./usr/local192.168.0.1(ro) 192.168.0.2(ro) /home192.168.0.1(rw) 192.168.0.2(rw)  /etc/hosts.allow service: host [or network/netmask], host [or network/netmask] eg. portmap: 192.168.0.1, 192.168.0.2  /etc/hosts.deny portmap:ALLlockd:ALLmountd:ALL….

5 Setting up NFS server(Contd.)  Starting and stopping NFS /sbin/service nfs start /sbin/service nfs stop /sbin/service nfs reload  Reloading /etc/exports exportfs -ra

6 Setting up NFS client  Using mount command mount server:directory/directory mount_point eg. mount master.foo.com:/home /mnt/home  Using /etc/fstab device mntpt fs-type options dump fsckorder device mntpt fs-type options dump fsckorder eg. master.foo.com:/home/pubnfsrw00 mount /pub mount /pub

7 Setting up NFS client(Contd.)  Using autofs auto.master /misc /etc/auto.misc --timeout 60 auto.misc myproject -rw,soft,intr,rsize=8192,wsize=8192 penguin.host.net:/project52 myproject -rw,soft,intr,rsize=8192,wsize=8192 penguin.host.net:/project52 /sbin/service autofs restart

8 Optimizing NFS performance  Setting Block Size to Optimize Transfer Speeds  Modify rsize and wsize values to control size of chunks of data between server and client  Default – 4096  Packet size and network drivers  Important when NFS is used over UDP  Number of instances of NFSD  typically 8 instances  Increase number of instances to match traffic

9 Optimizing NFS performance (Contd).  Memory limits on Input Queue  Increase to at least 256k, restart nfsd, then restore memory limits echo 262144 > /proc/sys/net/core/rmem_default  Overflow of fragmented packages  Turning Off Autonegotiation of NICs and Hubs

10 Security and NFS  Mount access  Achieved by client machine  Provided in /etc/exports file  File access  Function of normal file system access controls  After mounting, user and group permissions of files take control  Entries in /etc/hosts.allow and /etc/hosts.deny

11 Security and NFS (Contd)  Server security : nfsd and mountd  Use root_squash in /etc/exports /home slave1(rw,root_squash)  Client security  nosuid  broken_suid mount option  Securing portmapper, rpc.statd and rpc.lockd on client


Download ppt "Network File System Peter DSouza. NFS  Allows machines to mount a disk partition on a remote machine as if it were a local drive  Other systems similar."

Similar presentations


Ads by Google