How NFS and NAS work

Source: Internet
Author: User

11.7.4NFSWorkPrinciple

This section describes the accurate steps taken by the customer workstation to access remote files. Assume that all of the above discussionsNFSAll components have been loaded to the customer's workstation and server, and the Export/mounting operation has been completed. Then, the following actions are taken.

Applications running on customers' machines send system calls to certain data.

The VFS on the client machine obtains the system call and determines whether the call is for local data or remote data, that is, whether it is for LFS (local file system) orNFS(Network File System.

If local data is called, VFS sends it to the local file system shown in 11-7. Data access and retrieval can now be performed based on the LFS algorithm running on the customer's machine. These functions are discussed in the previous chapter on information management.

If the VFS on the client finds that it is a call to remote data, it converts the call into one or moreNFSCall. Table 11-2 provides someNFSCall functions to complete the conversion. Then, the VFS on the client is sent one by one in sequence.NFSCall. The server processes eachNFSCall and transfer control to the client. Then the client sends the nextNFSCall. In this way, you can use the recovery mechanism when the server fails. The client knows the exact location for re-running. Therefore, in this case, the recovery is the responsibility of the client.

Table 11-2 for RPCNFSCall

NFSCall

Meaning

Getattr ()

Get file attributes

Lookup ()

Return file handle

Read ()

Read data from remote files

Write ()

Write data to a remote file

Create ()

Create a file on the remote host

Remove ()

Delete files on the remote host

Rename ()

Rename a file on the remote host

Mkdir ()

Create a directory on the remote host

Rmdir ()

Delete the directory on the remote host

Readdir ()

Reads the contents of directories on the remote host.

EachNFSRPC calls contain parameters that are sent to the RPC/XDR module running on the client. As you know, data and data types must be sent together, and XDR converts the format as needed.

RPC/XDR on the client machine sends messages to the server using the transport layer protocol software TCP/IP running on the client machine. TCP/IP collects messages and sends them to the RPC/XDR module running on the server. The message isNFSUnderstandable format.

The XDR format on the server is converted again. If necessary, the control is handed over to the RPC on the server (this book has already introduced rpc port-based workPrincipleIndicates which port number is executed on the serverNFSCall ).

The RPC/XDR on the server starts the appropriate port management program on the server, depending on the expectedNFSCall.

The port manager communicates with the VFS on the server and sends appropriate requests. Next, it becomes a request or call to the LFS of the local operating system running on the server.

The LFS on the server accesses and retrieves data, and then transmits it to the VFS on the server.

VFS transfers data to the appropriate port manager on the server.

The port manager uses the RPC/XDR module of a communication protocol module such as TCP/IP on the server to send data to the customer. The data is finally sent to the RPC/XDR module on the client.

Now the data is transferred toNFSFile System.

NFSThe file system transfers data to the Virtual File System on the customer node, and the latter transfers the data to the application running on the client.

The author of this book hopes that this order can be clearly explained to readers.NFSWorkPrinciple.

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.