1 / 20

NFS: Sharing File System

NFS: Sharing File System. Chapter 22. Topics. Intro to NFS Setting Up the NFS Client Mounting a Remote Directory Hierarchy Setting up the Server Side System-config-nfs Automount. NFS. NFS is the de facto standard for connecting to resources in a linux/unix environment

jacoba
Download Presentation

NFS: Sharing 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: Sharing File System Chapter 22

  2. Topics • Intro to NFS • Setting Up the NFS Client • Mounting a Remote Directory Hierarchy • Setting up the Server Side • System-config-nfs • Automount

  3. NFS • NFS is the de facto standard for connecting to resources in a linux/unix environment • There are versions of NFS that run on Linux, DOS, VMS, and Windows • NFS will allow files on a remote server to appear as if they are on the local machine, the physical location becomes irreleveant

  4. NFS Introduction • NFS is a client / server solution • From the client machine it like a regular local directory hierarchy • This ability to run system file rom another host enables developers to create Linux system that are entirely diskless. • The Linux Terminal Server Project (LTSP) is dedicated to this “Thin Client” technology

  5. NFS Cont’d • Dataless systems are a norm in enterprise environments – no data is held on local machines – NFS accomplishes this with Linux • Excellent resource for more information:http://nfs.sourceforge.net/

  6. Displaying Remote Resources • The df utility lists the directory hierarchies available on a system. If the resource name is preceded by a host name it is remote /instructor:/exam 30M 22M 8M 68% /instructor/exam /examview-baist:/downloads 10G 1G 9G 13% /examview-baist/downloads

  7. Displaying Remote Resources • In this examplethere are two hierarchies on the Instructormachine thatare available to this host – exams and downloads • Use the df –h nfs to isolate the nfs hierarchies /instructor:/exam 30M 22M 8M 68% /instructor/exam /examview-baist:/downloads 10G 1G 9G 13% /examview-baist/downloads

  8. The NFS Server • Prerequisites for NFS Server – Install the following package: • NFS utils • Run the following commands: • # /sbin/chkconfignfs on --this will set the service to start automatically when the system enters multiuser mode • # /etc/rc.d/init.d/nfs start -- this starts nfs

  9. In this training environment it will be more efficient to turn off the firewall and disable SELinux as these two elements will need to be configured in a production environment to maintain security

  10. Configuring the NFS Server • NFS config window • System-config-nfs or from the menus on either Gmone or KDE • This utility will generate an “export” file called /etc/exports • “Exports” specifies which hierarchies get shared and how they are shared (Read / Write) • Each exported hierarchy is called a “share”

  11. system-config-nfs

  12. Exporting a Directory Hierarchy • Exporting makes the hierarchy available for mounting – it does not make the resources mounted • It places the directory structure on a list of hierarchies that may be mounted

  13. Showmount Utility • Use the showmount utility to display a list of systems that are allowed to mount the local directories • If showmount gives this error – “ RPC: Program not registered” – nfs is not running on that server – start nfs

  14. Testing the server setup • From the server run the nfs init script with the status argument • /sbin/service nfs status • If all is well it will identify the related PIDs for the nfs daemon and RPC connectors • To check port mappings run: • /usr/sbin/rpcinfo –p localhost | grep nfs • This will return the port numbers nfs is bound to

  15. Installing NFS Client • Prerequisites: Install the following packages: • NFS-utils • System-config-nfs • Portmap package

  16. Mounting the remote directory • You mount a remote directory the same way you mount a local one (p.466) • mount instructor:/downloads /instructor.downloads • mount server:/export /local_mountpoint • RPC: Program not registered error means that the NFS daemon is not running on the server

  17. unmount • The unmount utility will disconnect from the server export and is done the same way you unmount a local resource (p.469) • Unmount /instructor/downloads

  18. Automount • By default mount has to be run at each session to connect to network resources. • Automount allows you to configure a recurring connection to the resource

  19. Summary • Intro to NFS • Setting Up the NFS Client • Mounting a Remote Directory Hierarchy • Setting up the Server Side • System-config-nfs • Automount

  20. Exercise • Set up nfs • 2 systems – client / server • Static IP • HOSTS entries for each / on each

More Related