Please Whitelist This Site?

I know everyone hates ads. But please understand that I am providing premium content for free that takes hundreds of hours of time to research and write. I don't want to go to a pay-only model like some sites, but when more and more people block ads, I end up working for free. And I have a family to support, just like you. :)

If you like The TCP/IP Guide, please consider the download version. It's priced very economically and you can read all of it in a convenient format without ads.

If you want to use this site for free, I'd be grateful if you could add the site to the whitelist for Adblock. To do so, just open the Adblock menu and select "Disable on tcpipguide.com". Or go to the Tools menu and select "Adblock Plus Preferences...". Then click "Add Filter..." at the bottom, and add this string: "@@||tcpipguide.com^$document". Then just click OK.

Thanks for your understanding!

Sincerely, Charles Kozierok
Author and Publisher, The TCP/IP Guide


NOTE: Using software to mass-download the site degrades the server and is prohibited.
If you want to read The TCP/IP Guide offline, please consider licensing it. Thank you.

The Book is Here... and Now On Sale!

Searchable, convenient, complete TCP/IP information.
The TCP/IP Guide

Custom Search







Table Of Contents  The TCP/IP Guide
 9  TCP/IP Application Layer Protocols, Services and Applications (OSI Layers 5, 6 and 7)
      9  Network File and Resource Sharing Protocols and the TCP/IP Network File System (NFS)
           9  TCP/IP Network File System (NFS)

Previous Topic/Section
NFS Client/Server Operation Using Remote Procedure Calls (RPCs)
Previous Page
Pages in Current Topic/Section
12
3
Next Page
NFS File System Model and the Mount Protocol
Next Topic/Section

NFS Server Procedures and Operations
(Page 3 of 3)

NFS Version 4 Server Procedures and Operations

It is common that a client may want to perform multiple actions on a file: several consecutive reads, for example. One of the problems with the server procedure system in NFSv2 and NFSv3 is that each client action required a separate procedure call. This was somewhat inefficient, especially when NFS was used over a high-latency link.

To improve the efficiency of server procedures, NFS version 4 makes a significant change to the way that server procedures are implemented. Instead of each client action being a separate procedure, a single procedure called compound is defined. Within this “compound” procedure, a large number of server operations are encapsulated. These are all sent as a single unit and the server interprets and follows the instructions in each operation in sequence.

This change means there are actually only two RPC procedures in NFSv4, as shown in Table 183.


Table 183: NFS Version 4 Server Procedures

Procedure #

Procedure Name

Procedure Summary

Description

0

null

Do Nothing

Dummy procedure provided for testing purposes.

1

compound

Compound Operations

Combines a number of NFS operations into a single request, as described above.


All the real client actions are defined as operations within the compound procedure, as shown in Table 184. You'll notice that the number of NFSv4 operations is much larger than the number of procedures in NFSv2 and NFSv3. This is due both to the added features in version 4 and the fact that NFSv4 incorporates functions formerly performed by the separate Mount protocol into NFS itself.


Table 184: NFS Version 4 Server Operations

Operation #

Operation Name

Operation Summary

Description

3

access

Check Access Rights

Determines the access rights a user has for an object.

4

close

Close File

Closes a file.

5

commit

Commit Cached Data

Flushes any data that the server is holding in a write cache to storage, to ensure that any pending data is permanently recorded.

6

create

Create A Non-Regular File Object

This is similar to the mknod procedure in NFSv3; it creates a “non-regular” (special) object file. (Regular files are created using the open operation.)

7

delepurge

Purge Delegations Awaiting Recovery

NFSv4 has a feature where a server may delegate to a client responsibility for certain files. This operation removes delegations awaiting recovery from a client.

8

delegreturn

Return Delegation

Returns a delegation from a client to the server that granted it.

9

getattr

Get Attributes

Obtains the attributes for a file.

10

getfh

Get Current Filehandle

Returns a file handle, which is a logical object used to allow access to a file.

11

link

Create Link To A File

Creates a “hard' (non-symbolic) link to a file.

12

lock

Create Lock

Creates a lock on a file. Locks are used to manage access to a file, for example, to prevent two clients from trying to write to a file simultaneously and thus corrupting it.

13

lockt

Test For Lock

Tests for the existence of a lock on an object and returns information about it.

14

locku

Unlock File

Removes a lock previously created on a file.

15

lookup

Lookup Filename

Looks up or finds a file.

16

lookupp

Lookup Parent Directory

Returns the filehandle of an object's parent directory.

17

nverify

Verify Difference In Attributes

Checks to see if attributes have changed on a file.

18

open

Open A Regular File

Opens a file.

19

openattr

Open Named Attribute Directory

Opens an attribute directory associated with a file.

20

open_confirm

Confirm Open

Confirms information related to an opened file.

21

open_ downgrade

Reduce Open File Access

Adjusts the access rights for a file that is already open.

22

putfh

Set Current Filehandle

Replaces one filehandle with another.

23

putpubfh

Set Public Filehandle

Sets the current filehandle to be the “public” filehandle of the server. This may or may not be the same as the root filehandle (see below).

24

putrootfh

Set Root Filehandle

Sets the current filehandle to be the root of the server's file system.

25

read

Read From File

Reads data from a file.

26

readdir

Read Directory

Reads the contents of a directory.

27

readlink

Read Symbolic Link

Reads the name of a file specified using a symbolic link.

28

remove

Remove Filesystem Object

Removes (deletes) an object.

29

rename

Rename Directory Entry

Changes the name of an object.

30

renew

Renew A Lease

Renews an NFS delegation made by a server. (Note that these leases have nothing to do with DHCP leases!)

31

restorefh

Restore Saved Filehandle

Allows a filehandle previously saved to be made the current filehandle.

32

savefh

Save Current Filehandle

Allows a filehandle to be saved so it can later be restored when needed.

33

secinfo

Obtain Available Security

Retrieves NFS security information.

34

setattr

Set Attributes

Changes one or more attributes of a file.

35

setclientid

Negotiate Clientid

Allows a client to communicate information to the server regarding how the client wants to use NFS.

36

setclientid_ confirm

Confirm Clientid

Used to confirm the results of a previous negotiation using setclientid.

37

verify

Verify Same Attributes

Allows a client to verify certain attributes before proceeding with a particular action.

38

write

Write To File

Writes data to a file.

39

release_ lockowner

Release Lockowner State

Used by a client to tell a server to release certain information related to file locks.

10044

illegal

Illegal Operation

A “placeholder” (dummy) operation used to support error reporting when an invalid operation is used in a request from a client.


Key Concept: File operations in NFS are carried out using NFS server procedures. In versions 2 and 3 of NFS, each procedure performs one action, such as reading data from a file. In version 4, a special compound action is defined that allows many individual operations to be sent in a single request to a server.



Previous Topic/Section
NFS Client/Server Operation Using Remote Procedure Calls (RPCs)
Previous Page
Pages in Current Topic/Section
12
3
Next Page
NFS File System Model and the Mount Protocol
Next Topic/Section

If you find The TCP/IP Guide useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider purchasing a download license of The TCP/IP Guide. Thanks for your support!
Donate $2
Donate $5
Donate $10
Donate $20
Donate $30
Donate: $



Home - Table Of Contents - Contact Us

The TCP/IP Guide (http://www.TCPIPGuide.com)
Version 3.0 - Version Date: September 20, 2005

Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.