Download presentation
Presentation is loading. Please wait.
1
Created By : Asst. Prof. Ashish Shah, J. M
Created By : Asst. Prof. Ashish Shah, J.M. Patel College of Commerce, Goregoan W CHAP-IV NFS Unit - II
2
services on Linux and Unix networks.
Created By : Asst. Prof. Ashish Shah, J.M. Patel College of Commerce, Goregoan W NFS, the Network File System, is the most common method for providing file sharing services on Linux and Unix networks. It is a distributed file system that enables local access to remote disks and file systems.
3
NFS Architecture NFS uses a standard client/server architecture.
Created By : Asst. Prof. Ashish Shah, J.M. Patel College of Commerce, Goregoan W NFS Architecture NFS uses a standard client/server architecture. The server portion consists of the physical disks containing shared file systems and several daemons that make the shared file systems (or entire disks, for that matter) visible to and available for use by client systems on the network. This process is normally referred to as exporting a file system
4
Exporting home directories and project-specific file systems
Created By : Asst. Prof. Ashish Shah, J.M. Patel College of Commerce, Goregoan W Exporting home directories and project-specific file systems
5
Exporting home directories and project-specific file systems
Created By : Asst. Prof. Ashish Shah, J.M. Patel College of Commerce, Goregoan W Exporting home directories and project-specific file systems The network shown in Figure shows that all the client systems (pear, mango,and so forth) mount their home directories from an NFS server named diskbeast. On diskbeast, the exported file systems are stored in the /exports/homes directory (/exports/homes/u1, /exports/homes/u2, and so on).
6
Created By : Asst. Prof. Ashish Shah, J. M
Created By : Asst. Prof. Ashish Shah, J.M. Patel College of Commerce, Goregoan W NFS advantages The biggest advantage NFS provides is centralized administration. It is much easier, for example, to back up a file system stored on a server (such as the /home file system) than it is to back up /home directories scattered throughout the network, on systems that are geographically dispersed, and that might or might not be accessible when the backup is made.
7
Created By : Asst. Prof. Ashish Shah, J. M
Created By : Asst. Prof. Ashish Shah, J.M. Patel College of Commerce, Goregoan W NFS Advantages End users also benefit from NFS. When NFS is combined with NIS, users can log in from any system, even remotely, and still have access to their home directories and see a uniform view of shared data. Users can protect important or sensitive data or information that would be impossible or time consuming to recreate by storing it on an NFS mounted file system that is regularly backed up.
8
Created By : Asst. Prof. Ashish Shah, J. M
Created By : Asst. Prof. Ashish Shah, J.M. Patel College of Commerce, Goregoan W NFS disadvantages NFS has its shortcomings, of course, primarily in terms of performance and security. NFS is sensitive to network congestion. Heavy network traffic slows down NFS performance. Similarly, heavy disk activity on the NFS server adversely affects NFS’s performance. In both cases, NFS clients seem to be running slowly because disk reads and writes take longer. NFS has security problems because its design assumes a trusted network, not a hostile environment in which systems are constantly being probed and attacked.
9
Created By : Asst. Prof. Ashish Shah, J. M
Created By : Asst. Prof. Ashish Shah, J.M. Patel College of Commerce, Goregoan W NFS disadvantages The primary weakness is that the NFS protocol is based on RPC, remote procedure calls, which are one of the most common targets of exploit attempts.
10
NFS server configuration
Created By : Asst. Prof. Ashish Shah, J.M. Patel College of Commerce, Goregoan W NFS server configuration Although the breakdown is somewhat artificial because NFS server configuration is uncomplicated, you can divide server configuration into four steps: Design Implementation Testing Monitoring
11
Designing an NFS server
Created By : Asst. Prof. Ashish Shah, J.M. Patel College of Commerce, Goregoan W Designing an NFS server Designing a useful NFS server involves :- Selecting the file systems to export Choosing which users (or hosts) are permitted to mount the exported file systems Selecting a naming convention and mounting scheme that maintains Network transparency and ease of use Configuring the server and client systems to follow the convention
12
NFS : Exporting of files
Created By : Asst. Prof. Ashish Shah, J.M. Patel College of Commerce, Goregoan W NFS : Exporting of files When identifying the file systems to export, keep in mind the following three rules that restrict how file systems can be exported: 1. You can export only local file systems and their subdirectories. To express this restriction in another way, you cannot export a file system that is itself already an NFS mount. For example, if a system named diskbeast mounts /home from a server named homebeast, diskbeast cannot re-export /home.
13
NFS : Exporting of files
Created By : Asst. Prof. Ashish Shah, J.M. Patel College of Commerce, Goregoan W NFS : Exporting of files 2) A subdirectory of an exported file system cannot be exported unless the subdirectory resides on a different physical disk than its parent. For example, suppose diskbeast, an NFS server, has the following entry in its /etc/fstab:/dev/sda1 /usr/local ext3 defaults 1 2
14
NFS : Exporting of files
Created By : Asst. Prof. Ashish Shah, J.M. Patel College of Commerce, Goregoan W NFS : Exporting of files Conversely, the parent directory of an exported subdirectory cannot be exported unless the parent directory resides on a different physical disk. That is, if you export /usr/local/devtools, you cannot also export /usr/local unless /usr/local is on a different disk device than /usr/local/devtools. This rule just extends the logic of Rule 2 in the opposite direction.
15
Configuring an NFS Client
Created By : Asst. Prof. Ashish Shah, J.M. Patel College of Commerce, Goregoan W Configuring an NFS Client Configuring client systems to mount NFS exports is even simpler than configuringthe NFS server itself. Configuring a client system to use NFS involves making sure that the port mapper and the NFS file locking daemons statd and lockd are available, adding entries to the client’s /etc/fstab for the NFS exports, and mounting the exports using the mount command.
16
Configuring an NFS Client
Created By : Asst. Prof. Ashish Shah, J.M. Patel College of Commerce, Goregoan W Configuring an NFS Client As with an NFS server, an NFS client needs the portmap daemon to process and route RPC calls and returns from the server to the appropriate port and programs. Accordingly, make sure the portmapper is running on the client system using the port map initialization script, tc/rc.d/init.d/portmap.
17
Mounting the file system
Created By : Asst. Prof. Ashish Shah, J.M. Patel College of Commerce, Goregoan W Mounting the file system The mount command used to mount file systems, so this section shows only the mount invocations needed to mount NFS file systems. During the initial configuration and testing, it is easiest to mount and unmount NFS export at the command line. For example, to mount /home from the server configured at the end of the previous section, execute the following command as root: # mount -t nfs luther:/home /home
18
Created By : Asst. Prof. Ashish Shah, J. M
Created By : Asst. Prof. Ashish Shah, J.M. Patel College of Commerce, Goregoan W NFS client Demonstration of configuration an NFS client that mounts those directories. 1. Clients that want to use both exports need to have the following entries in /etc/fstab: luther:/usr/local /usr/local nfs rsize=8192,wsize=8192,hard,intr,nolock 0 0 luther:/home /home nfs 2. Start the portmapper using the following command: # /etc/rc.d/init.d/portmap start Starting portmapper: [ OK ] 3. Mount the exports using one of the following commands: # mount –a –t nfs or # mount /home /usr/local
19
Created By : Asst. Prof. Ashish Shah, J. M
Created By : Asst. Prof. Ashish Shah, J.M. Patel College of Commerce, Goregoan W NFS client The first command mounts all (-a) directories of type nfs (-t nfs). The second command mounts only the file systems /home and /usr/local. as designed, you are ready to go. The second command mounts only the file systems /home and /usr/local. Verify that the mounts completed successfully by attempting to access files on each file system. ( If everything works as designed, you are ready to go.)
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.