NFS works and communication processes

NFS (network file system): Network File System: Its biggest feature is that it allows different host, different operating systems to share resources over TCP / IP networks. In NFS applications, NFS client can transparently read and write resources on a remote NFS server, and files can be mounted on a local directory, then mount the directory looks as if they were disk partitions in general.
NFS works:
Here Insert Picture Description
As shown, NFS server set up a shared directory is / data, when the NFS client has permission to access the server, this can mount the shared directory on the server (two directory names in the local directory It may not be the same). When the server-side configuration sharing permissions of the shared directory is read-only (ro), the client can only mount the directory, you can not upload files to the directory; when the server is configured to share the shared directory permissions to read and write (rw time), and the directory itself has write permissions to perform for other users, clients will be able to mount and upload files to the directory.

因为NFS是基于网络传输数据的,所以必有传输端口,NFS常用的端口为2049;
但是文件系统十分复杂,NFS有很多功能,每个不同的功能都需要不同的程序来完成,
而每个程序都需要启动端口传输数据,这些端口都是随机产生并且小于1024的;
那么问题来了,既然是随机产生的端口,客户端该如何得知呢?
	便引入了RPC服务

RPC (remote procedure call): remote procedure calls. RPC main function is specified port corresponding to each NFS function, and returns to the client, so the client can connect to the correct port.
Sort it works as follows:
1.RPC first to start NFS, it will produce some random port after the start NFS, and RPC to register these ports, and RPC ports put these functions corresponding record; RPC ports are external is 111.
2. When the NFS client needs to connect to the server, start the client's RPC service, the client port number RPC corresponding to RPC111 port request function server-side; ask to port numbers after they port the NFS server corresponding, and then transmit the data.
3. After the data transfer will no longer go through RPC, only transmission between the client and the server.

NFS communication process is as follows:
Here Insert Picture Description
the advantages and disadvantages of the NFS Service
advantages:
A save local storage space, the commonly used data is stored on one server can access the data through the network.
B simple and easy to use.
C easy to deploy very quickly, and maintenance is very simple.
Disadvantages :
. a limitation of single point of failure easily occurs, the server machine is down, then all the clients can access
. b NFS the efficiency / performance under high concurrency limited
. c useless client user authentication mechanism, and the plaintext data is obtained by transmission, security, general (generally recommended for use in LAN)
d.NFS data is the plaintext, not for data integrity verification
e. when multiple machines mount an NFS server, connection management and maintenance trouble

Published 17 original articles · won praise 2 · Views 362

Guess you like

Origin blog.csdn.net/qq_44487069/article/details/105225493