Network Services -NFS

What is NFS?

     NFS is an acronym for Network File System, that is network file system. Agreement for use in distributed file system developed by Sun Microsystems in 1984 made public. Function through the network to allow different machines, different operating systems to share data with each individual, so that the client application data server located on a network disk access, is a method for disk file sharing between Unix-like systems

  Its main function is to allow the network can share files and directories between different machines each other systems. NFS NFS server can allow the client to the NFS server shared directory distal end mounted to a local NFS client. In local NFS client machine seems, NFS server shared directory if your disk partitions and directories. General client mount to a local directory name can be casually, but for the convenience of management, and server-side as we want to be better.

NFS is generally used to store shared video, pictures and other static data.

NFS mount principle

     NFS is the data transmission between the server and clients through a network. To transfer data between the two will want to have a corresponding network port for transmission. NFS server in the end what the network port to transmit data, NFS server is actually a randomly selected port for data transmission. That NFS client and NFS server know how in the end is which port to use it? In fact, by remote procedure calls when the NFS server (remote procedure call referred RPC) protocol / service to achieve. That NFS RPC services will be unified management of the port, the client and server communicate via NFS RPC-come, first used the port which, after the re-use of these ports (less than 1024) for transmission of data.

Port is the port assignment NFS RPC management server, the client data to be passed, and that the client's RPC will talk to the server to be an RPC server, and then to establish a connection to the port, and then transfer the data.

That between RPC and NFS and how to communicate with each other?

When the first NFS started, it will use some random port, then NFS RPC will go to register these ports. RPC will record these ports. And RPC will open 111 ports, RPC request to wait for the client, if the client has requested that the service side of the recorded NFS RPC will tell the client port information.

RPC and NFS boot sequence is like?

  Before starting the NFS SERVER, you must first start the RPC service (ie portmap service, the same below) or NFS SERVER will not be able to register with the RPC service area, in addition, if the RPC service is restarted, the already registered good NFS port data will be lost . Therefore, at this time of NFS RPC service management program should be restarted to re-register with the RPC. Special Note: After the general modify NFS configuration file is no need to restart NFS, do /etc/init.d/nfs reload directly in command

 

Summary: NFS Client and NFS server communication process

1) First, start the RPC server-side service, and open port 111

2) enable NFS and RPC port registration information

3) client initiates RPC (portmap service), a service request to the NFS server port server-side RPC (portmap)

4) the server's RPC (portmap) service feedback NFS port information to the client.

5) NFS client and server to establish a connection and transmitting data acquired by the NFS port.

 

 

 

NFS related protocols and software installation and management

protocol:

     RPC (Remote Procedure Call Protocol) - remote procedure call protocol

software:

     nfs-utils- *: includes basic NFS command and monitoring program 

     rpcbind- *: security support NFS RPC service connection  

     Note: In general, as the default bag system installed

     Cent OS6 rpcbind portmap called before. *.

NFS system daemons

nfs: It is the basic NFS daemons, the main function is manages the client can log on the server

rpcbind: The main function is to port mapping work. When a client attempts to connect and use the RPC services provided by the server (such as NFS service), will be managed by the rpcbind service port corresponding to the client, so that the customer can request services from the server through the port.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Guess you like

Origin www.cnblogs.com/liujunjun/p/11843262.html