NFS configuration in Linux and precautions-Linux Enterprise Application-Linux server application information. For more information, see the following section. 1. What is Network FileSystem)
NFS is the abbreviation of Network FileSystem, which was first developed by Sun. Its biggest function is to allow different machines and operating systems to share individual files with each other through the network. Therefore, you can also simply regard it as a file server! This NFS Server allows your PC to mount the directories shared by remote NFS Hosts to local machines, the Directory of the remote host is like its own partition!
Although NFS has its own protocol and port number, NFS uses a Remote Procedure Call, RPC) Protocol to help NFS itself operate!
2. RPC
When we use some services for remote connection, some information, such as the IP address of the host, the port number of the service, and the PID of the corresponding service, etc, all need to be managed and matched! This is the task of Remote Procedure Call and RPC.
The NFS service does not provide the data transfer protocol, but NFS allows us to share files. The reason is that NFS uses some other related transmission protocols! These transmission protocols use the so-called RPC function ?? The Zookeeper is a program that uses RPC! NFS can also be regarded as an RPC server! At the same time, it should be noted that in some situations, not only the NFS Server needs to activate the RPC service, but also, to mount the NFS partition Client machine, you also need to activate the RPC synchronously! In this way, the Server and Client can correspond to the program port through the RPC protocol! NFS is mainly used to manage shared directories. As for data transmission, it is enough to directly run the RPC protocol!
3. RPC daemons activated by NFS
O rpc. nfsd: the main function of daemon is to manage whether the Client can log on to the host. It also includes the identification of the login user ID.
O rpc. mountd: This daemon is mainly used to manage the NFS file system! When the Client successfully passes the rpc. after nfsd logs on to the host, the File Permission (that is, the permissions of rwxrwxrwx and owner, and the permissions of the group) will be applied before the file provided by NFS server can be used) certification Program! He will read the NFS configuration file/etc/exports to compare the Client's permissions. After this level is passed, the Client will be able to get the permission to use the NFS file! (Note: This is also the place where we use the permission and security settings to manage the NFS shared directory)
4. NFS requires two suites:
Nfs-utils
The NFS daemons, rpc. nfsd and rpc. mountd, are provided with other related documents and instructions, and execution files! This is the main NFS suite.
Portmap
As mentioned above, our NFS can be regarded as an RPC server program. before activating any RPC server program, we need to map the port (mapping) this is actually the responsibility of the Service "portmap! That is to say, we need to activate portmap before activating any RPC server! So what is this portmap doing? Just like the name of this service, haha! It is the mapping of port! For example, when the Client tries to use the services provided by the RPC server, the Client needs to obtain a port that can be connected to use the services provided by the RPC server, the Client will first talk to portmap about "Hello! Can you tell me a port number so that I can contact RPC !』 At this time, portmap automatically informs the Client of the port mapping managed by itself so that it can connect to the server! So ?? Activate portmap before you renew NFS!
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service