The primary issue in which NFSv4.1 needs to deal with
internationalization, or I18N, is with respect to file names and
other strings as used within the protocol. The choice of string
representation must allow reasonable name/string access to clients
that use various languages. The UTF-8 encoding of the UCS (Universal
Multiple-Octet Coded Character Set) as defined by ISO10646 
allows for this type of access and follows the policy described in
"IETF Policy on Character Sets and Languages", RFC 2277 .
RFC 3454 , otherwise know as "stringprep", documents a framework
for using Unicode/UTF-8 in networking protocols so as "to increase
the likelihood that string input and string comparison work in ways
that make sense for typical users throughout the world". A protocol
must define a profile of stringprep "in order to fully specify the
processing options". The remainder of this section defines the
NFSv4.1 stringprep profiles. Much of the terminology used for the
remainder of this section comes from stringprep.
There are three UTF-8 string types defined for NFSv4.1: utf8str_cs,
utf8str_cis, and utf8str_mixed. Separate profiles are defined for
each. Each profile defines the following, as required by stringprep:
o The intended applicability of the profile.
o The character repertoire that is the input and output to
stringprep (which is Unicode 3.2 for the referenced version of
stringprep). However, NFSv4.1 implementations are not limited to
o The mapping tables from stringprep used (as described in Section 3
o Any additional mapping tables specific to the profile.
o The Unicode normalization used, if any (as described in Section 4
o The tables from the stringprep listing of characters that are
prohibited as output (as described in Section 5 of stringprep).
o The bidirectional string testing used, if any (as described in
Section 6 of stringprep).
o Any additional characters that are prohibited as output specific
to the profile.
Stringprep discusses Unicode characters, whereas NFSv4.1 renders
UTF-8 characters. Since there is a one-to-one mapping from UTF-8 to
Unicode, when the remainder of this document refers to Unicode, the
reader should assume UTF-8.
Much of the text for the profiles comes from RFC 3491 .
14.1. Stringprep Profile for the utf8str_cs Type
Every use of the utf8str_cs type definition in the NFSv4 protocol
specification follows the profile named nfs4_cs_prep.
14.1.1. Intended Applicability of the nfs4_cs_prep Profile
The utf8str_cs type is a case-sensitive string of UTF-8 characters.
Its primary use in NFSv4.1 is for naming components and pathnames.
Components and pathnames are stored on the server's file system. Two
valid distinct UTF-8 strings might be the same after processing via
the utf8str_cs profile. If the strings are two names inside a
directory, the NFSv4.1 server will need to either:
o disallow the creation of a second name if its post-processed form
collides with that of an existing name, or
o allow the creation of the second name, but arrange so that after
post-processing, the second name is different than the post-
processed form of the first name.
14.1.2. Character Repertoire of nfs4_cs_prep
The nfs4_cs_prep profile uses Unicode 3.2, as defined in stringprep's
Appendix A.1. However, NFSv4.1 implementations are not limited to
14.1.3. Mapping Used by nfs4_cs_prep
The nfs4_cs_prep profile specifies mapping using the following tables
Table B.2 is normally not part of the nfs4_cs_prep profile as it is
primarily for dealing with case-insensitive comparisons. However, if
the NFSv4.1 file server supports the case_insensitive file system
attribute, and if case_insensitive is TRUE, the NFSv4.1 server MUST
use Table B.2 (in addition to Table B1) when processing utf8str_cs
strings, and the NFSv4.1 client MUST assume Table B.2 (in addition to
Table B.1) is being used.
If the case_preserving attribute is present and set to FALSE, then
the NFSv4.1 server MUST use Table B.2 to map case when processing
utf8str_cs strings. Whether the server maps from lower to upper case
or from upper to lower case is an implementation dependency.
14.3.6. Bidirectional Output for nfs4_mixed_prep
The nfs4_mixed_prep profile specifies checking bidirectional strings
as described in stringprep's Section 6.
14.4. UTF-8 Capabilities
const FSCHARSET_CAP4_CONTAINS_NON_UTF8 = 0x1;
const FSCHARSET_CAP4_ALLOWS_ONLY_UTF8 = 0x2;
typedef uint32_t fs_charset_cap4;
Because some operating environments and file systems do not enforce
character set encodings, NFSv4.1 supports the fs_charset_cap
attribute (Section 188.8.131.52) that indicates to the client a file
system's UTF-8 capabilities. The attribute is an integer containing
a pair of flags. The first flag is FSCHARSET_CAP4_CONTAINS_NON_UTF8,
which, if set to one, tells the client that the file system contains
non-UTF-8 characters, and the server will not convert non-UTF
characters to UTF-8 if the client reads a symlink or directory,
neither will operations with component names or pathnames in the
arguments convert the strings to UTF-8. The second flag is
FSCHARSET_CAP4_ALLOWS_ONLY_UTF8, which, if set to one, indicates that
the server will accept (and generate) only UTF-8 characters on the
file system. If FSCHARSET_CAP4_ALLOWS_ONLY_UTF8 is set to one,
FSCHARSET_CAP4_CONTAINS_NON_UTF8 MUST be set to zero.
FSCHARSET_CAP4_ALLOWS_ONLY_UTF8 SHOULD always be set to one.
14.5. UTF-8 Related Errors
Where the client sends an invalid UTF-8 string, the server should
return NFS4ERR_INVAL (see Table 5). This includes cases in which
inappropriate prefixes are detected and where the count includes
trailing bytes that do not constitute a full UCS character.
Where the client-supplied string is valid UTF-8 but contains
characters that are not supported by the server as a value for that
string (e.g., names containing characters outside of Unicode plane 0
on file systems that fail to support such characters despite their
presence in the Unicode standard), the server should return
Where a UTF-8 string is used as a file name, and the file system
(while supporting all of the characters within the name) does not
allow that particular name to be used, the server should return the
error NFS4ERR_BADNAME (Table 5). This includes situations in which
the server file system imposes a normalization constraint on name
strings, but will also include such situations as file system
prohibitions of "." and ".." as file names for certain operations,
and other such constraints.
15. Error Values
NFS error numbers are assigned to failed operations within a Compound
(COMPOUND or CB_COMPOUND) request. A Compound request contains a
number of NFS operations that have their results encoded in sequence
in a Compound reply. The results of successful operations will
consist of an NFS4_OK status followed by the encoded results of the
operation. If an NFS operation fails, an error status will be
entered in the reply and the Compound request will be terminated.
15.1. Error Definitions
Protocol Error Definitions
| Error | Number | Description |
| NFS4_OK | 0 | Section 184.108.40.206 |
| NFS4ERR_ACCESS | 13 | Section 220.127.116.11 |
| NFS4ERR_ATTRNOTSUPP | 10032 | Section 18.104.22.168 |
| NFS4ERR_ADMIN_REVOKED | 10047 | Section 22.214.171.124 |
| NFS4ERR_BACK_CHAN_BUSY | 10057 | Section 126.96.36.199 |
| NFS4ERR_BADCHAR | 10040 | Section 188.8.131.52 |
| NFS4ERR_BADHANDLE | 10001 | Section 184.108.40.206 |
| NFS4ERR_BADIOMODE | 10049 | Section 220.127.116.11 |
| NFS4ERR_BADLAYOUT | 10050 | Section 18.104.22.168 |
| NFS4ERR_BADNAME | 10041 | Section 22.214.171.124 |
| NFS4ERR_BADOWNER | 10039 | Section 126.96.36.199 |
| NFS4ERR_BADSESSION | 10052 | Section 188.8.131.52 |
| NFS4ERR_BADSLOT | 10053 | Section 184.108.40.206 |
| NFS4ERR_BADTYPE | 10007 | Section 220.127.116.11 |
| NFS4ERR_BADXDR | 10036 | Section 18.104.22.168 |
| NFS4ERR_BAD_COOKIE | 10003 | Section 22.214.171.124 |
| NFS4ERR_BAD_HIGH_SLOT | 10077 | Section 126.96.36.199 |
| NFS4ERR_BAD_RANGE | 10042 | Section 188.8.131.52 |
184.108.40.206. NFS4ERR_BADXDR (Error Code 10036)
The arguments for this operation do not match those specified in the
XDR definition. This includes situations in which the request ends
before all the arguments have been seen. Note that this error
applies when fixed enumerations (these include booleans) have a value
within the input stream that is not valid for the enum. A replier
may pre-parse all operations for a Compound procedure before doing
any operation execution and return RPC-level XDR errors in that case.
220.127.116.11. NFS4ERR_BAD_COOKIE (Error Code 10003)
Used for operations that provide a set of information indexed by some
quantity provided by the client or cookie sent by the server for an
earlier invocation. Where the value cannot be used for its intended
purpose, this error results.
18.104.22.168. NFS4ERR_DELAY (Error Code 10008)
For any of a number of reasons, the replier could not process this
operation in what was deemed a reasonable time. The client should
wait and then try the request with a new slot and sequence value.
Some examples of scenarios that might lead to this situation:
o A server that supports hierarchical storage receives a request to
process a file that had been migrated.
o An operation requires a delegation recall to proceed, and waiting
for this delegation recall makes processing this request in a
timely fashion impossible.
In such cases, the error NFS4ERR_DELAY allows these preparatory
operations to proceed without holding up client resources such as a
session slot. After delaying for period of time, the client can then
re-send the operation in question (but not with the same slot ID and
sequence ID; one or both MUST be different on the re-send).
Note that without the ability to return NFS4ERR_DELAY and the
client's willingness to re-send when receiving it, deadlock might
result. For example, if a recall is done, and if the delegation
return or operations preparatory to delegation return are held up by
other operations that need the delegation to be returned, session
slots might not be available. The result could be deadlock.
22.214.171.124. NFS4ERR_INVAL (Error Code 22)
The arguments for this operation are not valid for some reason, even
though they do match those specified in the XDR definition for the
126.96.36.199. NFS4ERR_NOTSUPP (Error Code 10004)
Operation not supported, either because the operation is an OPTIONAL
one and is not supported by this server or because the operation MUST
NOT be implemented in the current minor version.
188.8.131.52. NFS4ERR_SERVERFAULT (Error Code 10006)
An error occurred on the server that does not map to any of the
specific legal NFSv4.1 protocol error values. The client should
translate this into an appropriate error. UNIX clients may choose to
translate this to EIO.
184.108.40.206. NFS4ERR_TOOSMALL (Error Code 10005)
Used where an operation returns a variable amount of data, with a
limit specified by the client. Where the data returned cannot be fit
within the limit specified by the client, this error results.
15.1.2. Filehandle Errors
These errors deal with the situation in which the current or saved
filehandle, or the filehandle passed to PUTFH intended to become the
current filehandle, is invalid in some way. This includes situations
in which the filehandle is a valid filehandle in general but is not
of the appropriate object type for the current operation.
Where the error description indicates a problem with the current or
saved filehandle, it is to be understood that filehandles are only
checked for the condition if they are implicit arguments of the
operation in question.
220.127.116.11. NFS4ERR_BADHANDLE (Error Code 10001)
Illegal NFS filehandle for the current server. The current file
handle failed internal consistency checks. Once accepted as valid
(by PUTFH), no subsequent status change can cause the filehandle to
generate this error.
18.104.22.168. NFS4ERR_FHEXPIRED (Error Code 10014)
A current or saved filehandle that is an argument to the current
operation is volatile and has expired at the server.
22.214.171.124. NFS4ERR_ISDIR (Error Code 21)
The current or saved filehandle designates a directory when the
current operation does not allow a directory to be accepted as the
target of this operation.
126.96.36.199. NFS4ERR_MOVED (Error Code 10019)
The file system that contains the current filehandle object is not
present at the server. It may have been relocated or migrated to
another server, or it may have never been present. The client may
obtain the new file system location by obtaining the "fs_locations"
or "fs_locations_info" attribute for the current filehandle. For
further discussion, refer to Section 11.2.
188.8.131.52. NFS4ERR_NOFILEHANDLE (Error Code 10020)
The logical current or saved filehandle value is required by the
current operation and is not set. This may be a result of a
malformed COMPOUND operation (i.e., no PUTFH or PUTROOTFH before an
operation that requires the current filehandle be set).
184.108.40.206. NFS4ERR_NOTDIR (Error Code 20)
The current (or saved) filehandle designates an object that is not a
directory for an operation in which a directory is required.
220.127.116.11. NFS4ERR_STALE (Error Code 70)
The current or saved filehandle value designating an argument to the
current operation is invalid. The file referred to by that
filehandle no longer exists or access to it has been revoked.
18.104.22.168. NFS4ERR_SYMLINK (Error Code 10029)
The current filehandle designates a symbolic link when the current
operation does not allow a symbolic link as the target.
22.214.171.124. NFS4ERR_WRONG_TYPE (Error Code 10083)
The current (or saved) filehandle designates an object that is of an
invalid type for the current operation, and there is no more specific
error (such as NFS4ERR_ISDIR or NFS4ERR_SYMLINK) that applies. Note
that in NFSv4.0, such situations generally resulted in the less-
specific error NFS4ERR_INVAL.
15.1.3. Compound Structure Errors
This section deals with errors that relate to the overall structure
of a Compound request (by which we mean to include both COMPOUND and
CB_COMPOUND), rather than to particular operations.
There are a number of basic constraints on the operations that may
appear in a Compound request. Sessions add to these basic
constraints by requiring a Sequence operation (either SEQUENCE or
CB_SEQUENCE) at the start of the Compound.
126.96.36.199. NFS_OK (Error code 0)
Indicates the operation completed successfully, in that all of the
constituent operations completed without error.
188.8.131.52. NFS4ERR_MINOR_VERS_MISMATCH (Error code 10021)
The minor version specified is not one that the current listener
supports. This value is returned in the overall status for the
Compound but is not associated with a specific operation since the
results will specify a result count of zero.
184.108.40.206. NFS4ERR_NOT_ONLY_OP (Error Code 10081)
Certain operations, which are allowed to be executed outside of a
session, MUST be the only operation within a Compound whenever the
Compound does not start with a Sequence operation. This error
results when that constraint is not met.
220.127.116.11. NFS4ERR_OP_ILLEGAL (Error Code 10044)
The operation code is not a valid one for the current Compound
procedure. The opcode in the result stream matched with this error
is the ILLEGAL value, although the value that appears in the request
stream may be different. Where an illegal value appears and the
replier pre-parses all operations for a Compound procedure before
doing any operation execution, an RPC-level XDR error may be
18.104.22.168. NFS4ERR_NOENT (Error Code 2)
Indicates no such file or directory. The file or directory name
specified does not exist.
22.214.171.124. NFS4ERR_NOSPC (Error Code 28)
Indicates there is no space left on the device. The operation would
have caused the server's file system to exceed its limit.
126.96.36.199. NFS4ERR_NOTEMPTY (Error Code 66)
An attempt was made to remove a directory that was not empty.
188.8.131.52. NFS4ERR_ROFS (Error Code 30)
Indicates a read-only file system. A modifying operation was
attempted on a read-only file system.
184.108.40.206. NFS4ERR_XDEV (Error Code 18)
Indicates an attempt to do an operation, such as linking, that
inappropriately crosses a boundary. This may be due to such
o that between file systems (where the fsids are different).
o that between different named attribute directories or between a
named attribute directory and an ordinary directory.
o that between byte-ranges of a file system that the file system
implementation treats as separate (for example, for space
accounting purposes), and where cross-connection between the byte-
ranges are not allowed.
15.1.5. State Management Errors
These errors indicate problems with the stateid (or one of the
stateids) passed to a given operation. This includes situations in
which the stateid is invalid as well as situations in which the
stateid is valid but designates locking state that has been revoked.
Depending on the operation, the stateid when valid may designate
opens, byte-range locks, file or directory delegations, layouts, or
220.127.116.11. NFS4ERR_WRONGSEC (Error Code 10016)
Indicates that the security mechanism being used by the client for
the operation does not match the server's security policy. The
client should change the security mechanism being used and re-send
the operation (but not with the same slot ID and sequence ID; one or
both MUST be different on the re-send). SECINFO and SECINFO_NO_NAME
can be used to determine the appropriate mechanism.
18.104.22.168. NFS4ERR_WRONG_CRED (Error Code 10082)
An operation that manipulates state was attempted by a principal that
was not allowed to modify that piece of state.
15.1.7. Name Errors
Names in NFSv4 are UTF-8 strings. When the strings are not valid
UTF-8 or are of length zero, the error NFS4ERR_INVAL results.
Besides this, there are a number of other errors to indicate specific
problems with names.
22.214.171.124. NFS4ERR_BADCHAR (Error Code 10040)
A UTF-8 string contains a character that is not supported by the
server in the context in which it being used.
126.96.36.199. NFS4ERR_BADNAME (Error Code 10041)
A name string in a request consisted of valid UTF-8 characters
supported by the server, but the name is not supported by the server
as a valid name for the current operation. An example might be
creating a file or directory named ".." on a server whose file system
uses that name for links to parent directories.
188.8.131.52. NFS4ERR_NAMETOOLONG (Error Code 63)
Returned when the filename in an operation exceeds the server's
15.1.8. Locking Errors
This section deals with errors related to locking, both as to share
reservations and byte-range locking. It does not deal with errors
specific to the process of reclaiming locks. Those are dealt with in
184.108.40.206. NFS4ERR_BAD_RANGE (Error Code 10042)
The byte-range of a LOCK, LOCKT, or LOCKU operation is not allowed by
the server. For example, this error results when a server that only
supports 32-bit ranges receives a range that cannot be handled by
that server. (See Section 18.10.3.)
220.127.116.11. NFS4ERR_DEADLOCK (Error Code 10045)
The server has been able to determine a byte-range locking deadlock
condition for a READW_LT or WRITEW_LT LOCK operation.
18.104.22.168. NFS4ERR_DENIED (Error Code 10010)
An attempt to lock a file is denied. Since this may be a temporary
condition, the client is encouraged to re-send the lock request (but
not with the same slot ID and sequence ID; one or both MUST be
different on the re-send) until the lock is accepted. See
Section 9.6 for a discussion of the re-send.
22.214.171.124. NFS4ERR_LOCKED (Error Code 10012)
A READ or WRITE operation was attempted on a file where there was a
conflict between the I/O and an existing lock:
o There is a share reservation inconsistent with the I/O being done.
o The range to be read or written intersects an existing mandatory
126.96.36.199. NFS4ERR_LOCKS_HELD (Error Code 10037)
An operation was prevented by the unexpected presence of locks.
188.8.131.52. NFS4ERR_LOCK_NOTSUPP (Error Code 10043)
A LOCK operation was attempted that would require the upgrade or
downgrade of a byte-range lock range already held by the owner, and
the server does not support atomic upgrade or downgrade of locks.
184.108.40.206. NFS4ERR_LOCK_RANGE (Error Code 10028)
A LOCK operation is operating on a range that overlaps in part a
currently held byte-range lock for the current lock-owner and does
not precisely match a single such byte-range lock where the server
does not support this type of request, and thus does not implement
POSIX locking semantics . See Sections 18.10.4, 18.11.4, and
18.12.4 for a discussion of how this applies to LOCK, LOCKT, and
220.127.116.11. NFS4ERR_OPENMODE (Error Code 10038)
The client attempted a READ, WRITE, LOCK, or other operation not
sanctioned by the stateid passed (e.g., writing to a file opened for
18.104.22.168. NFS4ERR_SHARE_DENIED (Error Code 10015)
An attempt to OPEN a file with a share reservation has failed because
of a share conflict.
15.1.9. Reclaim Errors
These errors relate to the process of reclaiming locks after a server
22.214.171.124. NFS4ERR_COMPLETE_ALREADY (Error Code 10054)
The client previously sent a successful RECLAIM_COMPLETE operation.
An additional RECLAIM_COMPLETE operation is not necessary and results
in this error.
126.96.36.199. NFS4ERR_GRACE (Error Code 10013)
The server was in its recovery or grace period. The locking request
was not a reclaim request and so could not be granted during that
188.8.131.52. NFS4ERR_NO_GRACE (Error Code 10033)
A reclaim of client state was attempted in circumstances in which the
server cannot guarantee that conflicting state has not been provided
to another client. This can occur because the reclaim has been done
outside of the grace period of the server, after the client has done
a RECLAIM_COMPLETE operation, or because previous operations have
created a situation in which the server is not able to determine that
a reclaim-interfering edge condition does not exist.
184.108.40.206. NFS4ERR_RECLAIM_BAD (Error Code 10034)
The server has determined that a reclaim attempted by the client is
not valid, i.e. the lock specified as being reclaimed could not
possibly have existed before the server restart. A server is not
obliged to make this determination and will typically rely on the
client to only reclaim locks that the client was granted prior to
restart. However, when a server does have reliable information to
enable it make this determination, this error indicates that the
reclaim has been rejected as invalid. This is as opposed to the
error NFS4ERR_RECLAIM_CONFLICT (see Section 220.127.116.11) where the
server can only determine that there has been an invalid reclaim, but
cannot determine which request is invalid.
18.104.22.168. NFS4ERR_RECLAIM_CONFLICT (Error Code 10035)
The reclaim attempted by the client has encountered a conflict and
cannot be satisfied. Potentially indicates a misbehaving client,
although not necessarily the one receiving the error. The
misbehavior might be on the part of the client that established the
lock with which this client conflicted. See also Section 22.214.171.124
for the related error, NFS4ERR_RECLAIM_BAD.
15.1.10. pNFS Errors
This section deals with pNFS-related errors including those that are
associated with using NFSv4.1 to communicate with a data server.
126.96.36.199. NFS4ERR_BADIOMODE (Error Code 10049)
An invalid or inappropriate layout iomode was specified. For example
an inappropriate layout iomode, suppose a client's LAYOUTGET
operation specified an iomode of LAYOUTIOMODE4_RW, and the server is
neither able nor willing to let the client send write requests to
data servers; the server can reply with NFS4ERR_BADIOMODE. The
client would then send another LAYOUTGET with an iomode of
188.8.131.52. NFS4ERR_BADLAYOUT (Error Code 10050)
The layout specified is invalid in some way. For LAYOUTCOMMIT, this
indicates that the specified layout is not held by the client or is
not of mode LAYOUTIOMODE4_RW. For LAYOUTGET, it indicates that a
layout matching the client's specification as to minimum length
cannot be granted.
184.108.40.206. NFS4ERR_LAYOUTTRYLATER (Error Code 10058)
Layouts are temporarily unavailable for the file. The client should
re-send later (but not with the same slot ID and sequence ID; one or
both MUST be different on the re-send).
220.127.116.11. NFS4ERR_NOT_SAME (Error Code 10027)
This error is returned by the VERIFY operation to signify that the
attributes compared were not the same as those provided in the
18.104.22.168. NFS4ERR_SAME (Error Code 10009)
This error is returned by the NVERIFY operation to signify that the
attributes compared were the same as those provided in the client's
15.1.16. Obsoleted Errors
These errors MUST NOT be generated by any NFSv4.1 operation. This
can be for a number of reasons.
o The function provided by the error has been superseded by one of
the status bits returned by the SEQUENCE operation.
o The new session structure and associated change in locking have
made the error unnecessary.
o There has been a restructuring of some errors for NFSv4.1 that
resulted in the elimination of certain errors.
22.214.171.124. NFS4ERR_BAD_SEQID (Error Code 10026)
The sequence number (seqid) in a locking request is neither the next
expected number or the last number processed. These seqids are
ignored in NFSv4.1.
126.96.36.199. NFS4ERR_LEASE_MOVED (Error Code 10031)
A lease being renewed is associated with a file system that has been
migrated to a new server. The error has been superseded by the
SEQ4_STATUS_LEASE_MOVED status bit (see Section 18.46).
188.8.131.52. NFS4ERR_NXIO (Error Code 5)
I/O error. No such device or address. This error is for errors
involving block and character device access, but because NFSv4.1 is
not a device-access protocol, this error is not applicable.
184.108.40.206. NFS4ERR_RESTOREFH (Error Code 10030)
The RESTOREFH operation does not have a saved filehandle (identified
by SAVEFH) to operate upon. In NFSv4.1, this error has been
superseded by NFS4ERR_NOFILEHANDLE.
220.127.116.11. NFS4ERR_STALE_STATEID (Error Code 10023)
A stateid generated by an earlier server instance was used. This
error is moot in NFSv4.1 because all operations that take a stateid
MUST be preceded by the SEQUENCE operation, and the earlier server
instance is detected by the session infrastructure that supports