1 / 11

Network File System

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 to NFS – AFS CODA. Setting up NFS server. Configuration files /etc/exports (required) /etc/hosts.allow (optional)

shiri
Download Presentation

Network File System

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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/local 192.168.0.1(ro) 192.168.0.2(ro) /home 192.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:ALL lockd:ALL mountd: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 eg. master.foo.com:/home /pub nfs rw 0 0 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 /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

More Related