1 / 12

NFS – Network File System

NFS – Network File System. WeeSan Lee <weesan@cs.ucr.edu> http://www.cs.ucr.edu/~weesan/. Roadmap. Introduction How to setup a NFS server? How to setup a NFS client? nfsstat Automatic Mounting Q&A. Introduction. Created by Sun in 1985 Was original designed for diskless clients

Download Presentation

NFS – 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. NFS – Network File System WeeSan Lee <weesan@cs.ucr.edu> http://www.cs.ucr.edu/~weesan/

  2. Roadmap • Introduction • How to setup a NFS server? • How to setup a NFS client? • nfsstat • Automatic Mounting • Q&A

  3. Introduction • Created by Sun in 1985 • Was original designed for diskless clients • Version 2 is slow • Write operation is not complete until receiving ACK from the server • Version 3 permits async writes • Faster • Version 4 • Supports strong security, ACLs, unicode filenames, replication and migration, etc

  4. Introduction (cont) • Uses RPC • Remote Procedure Call – a system-independent way for process communication over a network • Could be UDP and TCP • Now, TCP is preferable

  5. How to setup a NFS server? Map root UID & GID to nobody • /etc/exports • $ cat /etc/exports • /home 10.0.0.0/24(rw,async,root_squash) • /home/ftp (noaccess) • /import 10.0.0.0/24(ro) • $ exportfs -a • /etc/hosts.allow • $ cat /etc/hosts.allow • portmap: 10.0.0.0/255.255.255.0 • mountd: 10.0.0.0/255.255.255.0

  6. How to setup a NFS server? (cont) • /etc/init.d/nfs {start|stop|restart|reload|status} • portmap • rpc.statd • nfsd • rpc.mountd • rpc.rquotad • Turns NFS on over reboot • $ chkconfig nfs on

  7. How to setup a NFS client? • /etc/init.d/portmap start • portmap • rpc.statd • Manual mount the NFS partitions • $ mount 10.0.0.1:/home /home • $ mount 10.0.0.1:/import /import • Mount the NFS partitions at boot time • $ cat /etc/fstab • 10.0.0.1:/home /home nfs defaults 0 0 • 10.0.0.1:/import /import nfs defaults 0 0 • $ mount -a

  8. How to setup a NFS client? (cont) • Experiment defaults with • soft,timeo=5 • hard,intr • To umount a NFS partition • $ umount /home • To show the NFS server's export list • $ showmount -e 10.0.0.1

  9. nfsstat • Displays stats. about NFS server and client • For server • $ nfsstat -s • For client • $ nfsstat -c

  10. Automatic Mouting • Mount filesystems on-demand • Originally comes from Sun • To start • $ /etc/init.d/autofs start • Master map file (/etc/auto.master) • Associates each mount point with a indirect map • $ cat /etc/auto.master • /misc /etc/auto.misc • /net -host

  11. Automatic Mouting (cont) • To automount /home & /import • Add the following lines into /etc/auto.master • /home /etc/auto.home • /import /etc/auto.import • $ cat /etc/auto.home • * -soft,timeo=5 10.0.0.1:/home/& • $cat /etc/auto.import • * -soft,timeo=5 10.0.0.1:/import/&

  12. Reference • LAH • Ch 16: The Network File System

More Related