In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Introduction
NFS (NetworkFileSystem), the network file system, completes the read and write function on the remote host based on RPC implementation. The NFS server function is provided by Kernel, so it can only be used in Linux and UNIX. In addition, user access can only be restricted according to the IP address.
RPC (Remote Procedure Call), which realizes the function call and parameter transfer between two remote hosts. In Linux, some general functions are made into libraries. When local applications need to use these functions, they can be called directly. This is called local call. The library (function) needed locally is on the remote host, at this time, the RPC protocol can be used to encapsulate the call request and parameters into a message for transmission on the network, and after the server can understand it, the call request will be executed locally to return the result, which is called remote procedure call. Many services perform certain functions based on RPC. For example, NFS services call open (), read (), write (), close () on remote hosts based on RPC. And other functions will return the execution results locally to complete the file sharing function.
working principle
1. When the server starts, it registers the NFS function (NFS daemons) like RPC for port. two。 The client uses RPC to connect to the server to obtain the port of NFS Daemon registration. 3. The client is connected with NFS daemon, mountd authenticates the user, and nfs provides file sharing service. NFS daemon
Rpc.nfsd provides NFS services
Rpc.mountd is used to verify whether the user has permission to use NFS.
Rpc.lockd and rpc.statd are used to lock files to prevent multiple users from modifying them at the same time, resulting in file confusion.
Rpc.quota is used to set disk quotas for NFS.
Rpc.bind is used to bind services to ports
Rpc.statd notifies the NFS client when an NFS server is abnormally restarted. This process is started automatically by the nfslock service and does not require user configuration.
Rpc.idmapd is used to map the ID of all users to nobody users
Example
Node1: NFS Server: 192.168.80.10
Node2: NFS Client: 192.168.80.20
Node1 configuration: yum install nfs-utls-y mkdir-pv / nfs/pub echo "/ nfs/pub 192.168.80.20 (rw Async) "> > / etc/exports # restrict that only Node2 can log in to the exportfs-ar chown nfsnobody:nfsnobody-R / nfs/ # nfs client to manipulate the file node2 configuration as nfsnobody on the system: showmount-e 192.168.80.10 Export list for 192.168.80.10: / nfs/pub 192.168. 80mount-t nfs-- source 192.168.80.10:/nfs/pub / mnt/
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.