nfs store real-time synchronization service

1.NFS Profile

 NFS (Network File System) that is a network file system, which allows between computers on the network to share resources over the network. The host NFS shared directory, mount them to the local client, a local NFS client application can transparently read and write files located on a remote NFS server, the client side looks just like access local files.

 

RPC, C / S model. This program can use the network service protocol request a program on another computer without knowing the details of the network, and even ask them to system calls.

For Linux, the file system is implemented in the kernel space, namely file systems such as ext3, ext4, etc. is in the Kernel started as a kernel module loading operation.

 

2.NFS principle

NFS service itself does not provide data transfer protocol, but is achieved by using RPC (Remote Procedure Call Remote Procedure Call). When NFS is started, will use some random port, NFS RPC will go to register these ports. RPC will record these ports, RPC will open 111 ports. For transmission of data by connecting the client and sever the end of the port. Before you start nfs, we must first ensure that the rpc service starts.

Principle is as follows:

  1. To access the local user files nfs server, it initiates a request Xianxiang kernel, kernel modules and processing calls nfs rpc client
  2. rpc client initiates a connection to the rpc server
  3. Before connecting, NFS service in addition to start listening on port itself nfsd 2049 / tcp and 2049 / udp, also starts other processes (such as mountd, statd, rquotad, etc.) to complete the file sharing, port these processes are not fixed; is each time you start NFS service registered with the RPC service, RPC service will be randomly assigned to unused ports
  4. Complete the connection, accepting the access request
  5. nfs application requests to the kernel launch
  6. File system kernel calls

       Then client-side port is established via NFS NFS Server and acquire the terminal connection and data transmission.

 

 

The following is the start role of services

rpc: Remote Procedure Call protocol is to achieve a local call remote host system to achieve agreement calls.

portmapper: responsible for dispensing port rpc server and client when the client requests object rpc server responds back to the client terminal port, the working port 111 in the udp and tcp.

mountd: a daemon authentication service nfs services, client upon receipt of a real return to port, the connection will go mountd, Certification token.

nfsd: nfs daemon is responsible for calling after receiving a request from a user makes a request to the kernel and get the result of the call in response to the user, work in 2049 tcp and udp port of.

idmapd: is a program of NFS, for permission to create responsible for remote client-side problem after the files.

quotad: a disk quotas for implementing, when the client-side mount nfs can limit the size of disk space.

 

Guess you like

Origin www.cnblogs.com/Mercury-linux/p/11781411.html