110 likes | 294 Views
Module 16: Network File System (NFS). We will discuss the process of setting up an NFS server and clients. NFS. The concept is somewhat similar to the Windows’ sharing disk. NFS servers allow the directories to be shared with clients. The clients have permission to mount NFS servers.
E N D
Module 16: Network File System (NFS) • We will discuss the process of setting up an NFS server and clients. Module 16 NFS
NFS • The concept is somewhat similar to the Windows’ sharing disk. • NFS servers allow the directories to be shared with clients. • The clients have permission to mount NFS servers. Module 16 NFS
Setting up NFS • [ ]# mountservername:/export/home /newhome command shared dir host dir • [root@it3423 ~]# mount mysvr1:/export/h2 /home Module 16 NFS
Setting up NFS Server • /etc/exports permission is in this file. • The only one configuration file for NFS server. • Viewing the RPC(Remote Procedure Call) services: • [ ]# rpcinfo [options] • Start/Stop NFS • Desktop -> System Setting ->… -> nfs or • [ ]# /etc/init.d/nfs start • [ ]# /etc/init.d/nfs stop Module 16 NFS
The Components of NFS (5 parts) • rpc.start – handles the file-locking issues between the client and the server • rpc.quotad – supplies the interface between NFS and the quota manager • rpc.mountd – takes care of verifying that the client has enough permission to make the request. • rpc.nfsd – takes care of handling NFS requests. • rpc.locked – handling lock recovery on crashed systems. Module 16 NFS
Configuring NFS Server • GUI: • Desktop -> System Settings -> Server Settings -> NFS • Command line: (2 steps) • Creating /etc/exports file • Starting the NFS server process that read the /etc/exports file and follow the specification Module 16 NFS
What is in /etc/exports file? • [ ]# cat /etc/exports • sharedDirectory hostNameOfClient(permission) /export/home fred(rw) (the hostname can be placed by an IP address) This file lists the shared directories, the clients, and the clients’ permission Module 16 NFS
Starting NFS server process • Using commandexportfs [ ]# exportfs [option] This command needs to be run after /etc/exports file has been changed. Module 16 NFS
Configuring NFS clients • mount [options] serverName:/directory • Soft mount: • allows the client to time out the connection after a number of retries. • Hard mount: (default) • The client must commit all changes to the server before allowing other operations. Module 16 NFS
Questions • What is NFS? • Which command can be used to tell the NFS server processes to reread the configuration information? Module 16 NFS