draft-ietf-nfsv4-pnfs-obj-04.txt   draft-ietf-nfsv4-pnfs-obj-05.txt 
NFSv4 B. Halevy NFSv4 B. Halevy
Internet-Draft B. Welch Internet-Draft B. Welch
Intended status: Standards Track J. Zelenka Intended status: Standards Track J. Zelenka
Expires: March 8, 2008 Panasas Expires: August 28, 2008 Panasas
September 5, 2007 February 25, 2008
Object-based pNFS Operations Object-based pNFS Operations
draft-ietf-nfsv4-pnfs-obj-04 draft-ietf-nfsv4-pnfs-obj-05
Status of this Memo Status of this Memo
By submitting this Internet-Draft, each author represents that any By submitting this Internet-Draft, each author represents that any
applicable patent or other IPR claims of which he or she is aware applicable patent or other IPR claims of which he or she is aware
have been or will be disclosed, and any of which he or she becomes have been or will be disclosed, and any of which he or she becomes
aware will be disclosed, in accordance with Section 6 of BCP 79. aware will be disclosed, in accordance with Section 6 of BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that Task Force (IETF), its areas, and its working groups. Note that
skipping to change at page 1, line 35 skipping to change at page 1, line 35
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at The list of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt. http://www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html. http://www.ietf.org/shadow.html.
This Internet-Draft will expire on March 8, 2008. This Internet-Draft will expire on August 28, 2008.
Copyright Notice Copyright Notice
Copyright (C) The IETF Trust (2007). Copyright (C) The IETF Trust (2008).
Abstract Abstract
This Internet-Draft provides a description of the object-based pNFS This Internet-Draft provides a description of the object-based pNFS
extension for NFSv4. This is a companion to the main pnfs extension for NFSv4. This is a companion to the main pnfs
specification in the NFSv4 Minor Version 1 Internet Draft, which is specification in the NFSv4 Minor Version 1 Internet Draft, which is
currently draft-ietf-nfsv4-minorversion1-13.txt. currently draft-ietf-nfsv4-minorversion1-20.txt.
Requirements Language Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [1]. document are to be interpreted as described in RFC 2119 [1].
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4
2. Object Storage Device Addressing and Discovery . . . . . . . . 4 2. Object Storage Device Addressing and Discovery . . . . . . . . 4
2.1. pnfs_osd_addr_type4 . . . . . . . . . . . . . . . . . . . 5 2.1. pnfs_osd_addr_type4 . . . . . . . . . . . . . . . . . . . 5
2.2. pnfs_osd_deviceaddr4 . . . . . . . . . . . . . . . . . . . 6 2.2. pnfs_osd_deviceaddr4 . . . . . . . . . . . . . . . . . . . 6
3. Object-Based Layout . . . . . . . . . . . . . . . . . . . . . 6 3. Object-Based Layout . . . . . . . . . . . . . . . . . . . . . 6
3.1. pnfs_osd_layout4 . . . . . . . . . . . . . . . . . . . . . 7 3.1. pnfs_osd_layout4 . . . . . . . . . . . . . . . . . . . . . 7
3.1.1. pnfs_osd_objid4 . . . . . . . . . . . . . . . . . . . 7 3.1.1. pnfs_osd_objid4 . . . . . . . . . . . . . . . . . . . 7
3.1.2. pnfs_osd_version4 . . . . . . . . . . . . . . . . . . 8 3.1.2. pnfs_osd_version4 . . . . . . . . . . . . . . . . . . 8
3.1.3. pnfs_osd_object_cred4 . . . . . . . . . . . . . . . . 8 3.1.3. pnfs_osd_object_cred4 . . . . . . . . . . . . . . . . 9
3.1.4. pnfs_osd_raid_algorithm4 . . . . . . . . . . . . . . . 10 3.1.4. pnfs_osd_raid_algorithm4 . . . . . . . . . . . . . . . 10
3.1.5. pnfs_osd_data_map4 . . . . . . . . . . . . . . . . . . 10 3.1.5. pnfs_osd_data_map4 . . . . . . . . . . . . . . . . . . 10
3.2. Data Mapping Schemes . . . . . . . . . . . . . . . . . . . 11 3.2. Data Mapping Schemes . . . . . . . . . . . . . . . . . . . 11
3.2.1. Simple Striping . . . . . . . . . . . . . . . . . . . 11 3.2.1. Simple Striping . . . . . . . . . . . . . . . . . . . 11
3.2.2. Nested Striping . . . . . . . . . . . . . . . . . . . 12 3.2.2. Nested Striping . . . . . . . . . . . . . . . . . . . 12
3.2.3. Mirroring . . . . . . . . . . . . . . . . . . . . . . 13 3.2.3. Mirroring . . . . . . . . . . . . . . . . . . . . . . 13
3.3. RAID Algorithms . . . . . . . . . . . . . . . . . . . . . 14 3.3. RAID Algorithms . . . . . . . . . . . . . . . . . . . . . 14
3.3.1. PNFS_OSD_RAID_0 . . . . . . . . . . . . . . . . . . . 14 3.3.1. PNFS_OSD_RAID_0 . . . . . . . . . . . . . . . . . . . 14
3.3.2. PNFS_OSD_RAID_4 . . . . . . . . . . . . . . . . . . . 14 3.3.2. PNFS_OSD_RAID_4 . . . . . . . . . . . . . . . . . . . 14
3.3.3. PNFS_OSD_RAID_5 . . . . . . . . . . . . . . . . . . . 15 3.3.3. PNFS_OSD_RAID_5 . . . . . . . . . . . . . . . . . . . 15
3.3.4. PNFS_OSD_RAID_PQ . . . . . . . . . . . . . . . . . . . 15 3.3.4. PNFS_OSD_RAID_PQ . . . . . . . . . . . . . . . . . . . 15
3.3.5. RAID Usage and implementation notes . . . . . . . . . 16 3.3.5. RAID Usage and implementation notes . . . . . . . . . 16
4. Object-Based Layout Update . . . . . . . . . . . . . . . . . . 16 4. Object-Based Layout Update . . . . . . . . . . . . . . . . . . 16
4.1. pnfs_osd_layoutupdate4 . . . . . . . . . . . . . . . . . . 16 4.1. pnfs_osd_layoutupdate4 . . . . . . . . . . . . . . . . . . 16
4.1.1. pnfs_osd_deltaspaceused4 . . . . . . . . . . . . . . . 17 4.1.1. pnfs_osd_deltaspaceused4 . . . . . . . . . . . . . . . 17
4.1.2. pnfs_osd_errno4 . . . . . . . . . . . . . . . . . . . 17 5. Object-Based Layout Return . . . . . . . . . . . . . . . . . . 17
4.1.3. pnfs_osd_ioerr4 . . . . . . . . . . . . . . . . . . . 18 5.1. pnfs_osd_layoutreturn4 . . . . . . . . . . . . . . . . . . 18
5. Object-Based Creation Layout Hint . . . . . . . . . . . . . . 19 5.1.1. pnfs_osd_errno4 . . . . . . . . . . . . . . . . . . . 19
5.1. pnfs_osd_layouthint4 . . . . . . . . . . . . . . . . . . . 19 5.1.2. pnfs_osd_ioerr4 . . . . . . . . . . . . . . . . . . . 20
6. Layout Segments . . . . . . . . . . . . . . . . . . . . . . . 20 6. Object-Based Creation Layout Hint . . . . . . . . . . . . . . 20
6.1. CB_LAYOUTRECALL and LAYOUTRETURN . . . . . . . . . . . . . 20 6.1. pnfs_osd_layouthint4 . . . . . . . . . . . . . . . . . . . 20
6.2. LAYOUTCOMMIT . . . . . . . . . . . . . . . . . . . . . . . 21 7. Layout Segments . . . . . . . . . . . . . . . . . . . . . . . 22
7. Recalling Layouts . . . . . . . . . . . . . . . . . . . . . . 21 7.1. CB_LAYOUTRECALL and LAYOUTRETURN . . . . . . . . . . . . . 22
7.1. CB_RECALL_ANY . . . . . . . . . . . . . . . . . . . . . . 22 7.2. LAYOUTCOMMIT . . . . . . . . . . . . . . . . . . . . . . . 23
8. Client Fencing . . . . . . . . . . . . . . . . . . . . . . . . 22 8. Recalling Layouts . . . . . . . . . . . . . . . . . . . . . . 23
9. Security Considerations . . . . . . . . . . . . . . . . . . . 23 8.1. CB_RECALL_ANY . . . . . . . . . . . . . . . . . . . . . . 23
9.1. OSD Security Data Types . . . . . . . . . . . . . . . . . 24 9. Client Fencing . . . . . . . . . . . . . . . . . . . . . . . . 24
9.2. The OSD Security Protocol . . . . . . . . . . . . . . . . 24 10. Security Considerations . . . . . . . . . . . . . . . . . . . 24
9.3. Protocol Privacy Requirements . . . . . . . . . . . . . . 25 10.1. OSD Security Data Types . . . . . . . . . . . . . . . . . 25
9.4. Revoking Capabilities . . . . . . . . . . . . . . . . . . 26 10.2. The OSD Security Protocol . . . . . . . . . . . . . . . . 26
10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 27 10.3. Protocol Privacy Requirements . . . . . . . . . . . . . . 27
11. References . . . . . . . . . . . . . . . . . . . . . . . . . . 27 10.4. Revoking Capabilities . . . . . . . . . . . . . . . . . . 27
11.1. Normative References . . . . . . . . . . . . . . . . . . . 27 11. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 28
11.2. Informative References . . . . . . . . . . . . . . . . . . 27 12. XDR Description of the Objects layout type . . . . . . . . . . 28
Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . . 27 13. References . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 28 13.1. Normative References . . . . . . . . . . . . . . . . . . . 32
Intellectual Property and Copyright Statements . . . . . . . . . . 29 13.2. Informative References . . . . . . . . . . . . . . . . . . 33
Appendix A. Acknowledgments . . . . . . . . . . . . . . . . . . . 33
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 33
Intellectual Property and Copyright Statements . . . . . . . . . . 35
1. Introduction 1. Introduction
In pNFS, the file server returns typed layout structures that In pNFS, the file server returns typed layout structures that
describe where file data is located. There are different layouts for describe where file data is located. There are different layouts for
different storage systems and methods of arranging data on storage different storage systems and methods of arranging data on storage
devices. This document describes the layouts used with object-based devices. This document describes the layouts used with object-based
storage devices (OSD) that are accessed according to the iSCSI/OSD storage devices (OSD) that are accessed according to the iSCSI/OSD
storage protocol standard (SNIA T10/1355-D [2]). storage protocol standard (SNIA T10/1355-D [2]).
skipping to change at page 4, line 27 skipping to change at page 4, line 27
SET ATTRIBUTES, CREATE and DELETE. However, using the object-based SET ATTRIBUTES, CREATE and DELETE. However, using the object-based
layout the client only uses the READ, WRITE, GET ATTRIBUTES and FLUSH layout the client only uses the READ, WRITE, GET ATTRIBUTES and FLUSH
commands. The other commands are only used by the pNFS server. commands. The other commands are only used by the pNFS server.
An object-based layout for pNFS includes object identifiers, An object-based layout for pNFS includes object identifiers,
capabilities that allow clients to READ or WRITE those objects, and capabilities that allow clients to READ or WRITE those objects, and
various parameters that control how file data is striped across their various parameters that control how file data is striped across their
component objects. The OSD protocol has a capability-based security component objects. The OSD protocol has a capability-based security
scheme that allows the pNFS server to control what operations and scheme that allows the pNFS server to control what operations and
what objects can be used by clients. This scheme is described in what objects can be used by clients. This scheme is described in
more detail in the Security Considerations section (Section 9). more detail in the Security Considerations section (Section 10).
2. Object Storage Device Addressing and Discovery 2. Object Storage Device Addressing and Discovery
Data operations to an OSD require the client to know the "address" of Data operations to an OSD require the client to know the "address" of
each OSD's root object. The root object is synonymous with SCSI each OSD's root object. The root object is synonymous with SCSI
logical unit. The client specifies SCSI logical units to its SCSI logical unit. The client specifies SCSI logical units to its SCSI
stack using a representation local to the client. Because these stack using a representation local to the client. Because these
representations are local, GETDEVICEINFO must return information that representations are local, GETDEVICEINFO must return information that
can be used by the client to select the correct local representation. can be used by the client to select the correct local representation.
In the block world, a set offset (logical block number or track/ In the block world, a set offset (logical block number or track/
sector) contains a disk label. This label identifies the disk sector) contains a disk label. This label identifies the disk
uniquely. In contrast, an OSD has a standard set of attributes on uniquely. In contrast, an OSD has a standard set of attributes on
its root object. For device identification purposes the OSD System its root object. For device identification purposes the OSD System
ID (root information attribute number 3) and/or OSD Name (root ID (root information attribute number 3) and the OSD Name (root
information attribute number 9) are used as the label. These appear information attribute number 9) are used as the label. These appear
in the pnfs_osd_deviceaddr4 type below under the "systemid" and in the pnfs_osd_deviceaddr4 type below under the "systemid" and
"osdname" fields. "osdname" fields.
In some situations, SCSI target discovery may need to be driven based In some situations, SCSI target discovery may need to be driven based
on information contained in the GETDEVICEINFO response. One example on information contained in the GETDEVICEINFO response. One example
of this is iSCSI targets that are not known to the client until a of this is iSCSI targets that are not known to the client until a
layout has been requested. Eventually iSCSI will adopt ANSI T10 layout has been requested. Eventually iSCSI will adopt ANSI T10
SAM-3, at which time the World Wide Name (WWN aka, EUI-64/EUI-128) SAM-3, at which time the World Wide Name (WWN aka, EUI-64/EUI-128)
naming conventions can be specified. In addition, Fibre Channel (FC) naming conventions can be specified. In addition, Fibre Channel (FC)
skipping to change at page 5, line 29 skipping to change at page 5, line 29
the I/O request to the OSD will fail to pass the integrity check the I/O request to the OSD will fail to pass the integrity check
verification. verification.
To recover from this condition the client should report the error via To recover from this condition the client should report the error via
LAYOUTCOMMIT, return the layout using LAYOUTRETURN, and invalidate LAYOUTCOMMIT, return the layout using LAYOUTRETURN, and invalidate
all the device address mappings associated with this layout. The all the device address mappings associated with this layout. The
client can then ask for a new layout if it wishes using LAYOUTGET and client can then ask for a new layout if it wishes using LAYOUTGET and
resolve the referenced deviceids using GETDEVICEINFO or resolve the referenced deviceids using GETDEVICEINFO or
GETDEVICELIST. GETDEVICELIST.
The server MUST provide either the systemid, the OSD name, or both. The server MUST provide the systemid and SHOULD also provide the
When the OSD name is present the client SHOULD get the root osdname. When the OSD name is present the client SHOULD get the root
information attributes whenever it establishes communication with the information attributes whenever it establishes communication with the
OSD and verify that the OSD name it got from the OSD matches the one OSD and verify that the OSD name it got from the OSD matches the one
sent by the metadata server. If the systemid was not given by the sent by the metadata server. To do so, the client uses the
server it MUST be taken from the OSD-provided attribute; note that in root_obj_cred credentials.
this case the OSD GET ATTRIBUTES operation must be performed with the
NOSEC security method.
2.1. pnfs_osd_addr_type4 2.1. pnfs_osd_addr_type4
The following enum specifies the manner in which a scsi target can be The following enum specifies the manner in which a scsi target can be
specified. The target can be specified as a network address, as an specified. The target can be specified as a network address, as an
Internet Qualified Name (IQN), or by the World-Wide Name (WWN) of the Internet Qualified Name (IQN), or by the World-Wide Name (WWN) of the
target. target.
enum pnfs_obj_addr_type4 { enum pnfs_obj_addr_type4 {
OBJ_TARGET_NETADDR = 1, OBJ_TARGET_NETADDR = 1,
skipping to change at page 6, line 25 skipping to change at page 6, line 25
string iqn<>; string iqn<>;
case OBJ_TARGET_WWN: case OBJ_TARGET_WWN:
string wwn<>; string wwn<>;
default: default:
void; void;
}; };
uint64_t lun; uint64_t lun;
opaque systemid<>; opaque systemid<>;
pnfs_osd_object_cred4 root_obj_cred;
opaque osdname<>; opaque osdname<>;
}; };
3. Object-Based Layout 3. Object-Based Layout
The layout4 type is defined in the NFSv4.1 draft [6] as follows: The layout4 type is defined in the NFSv4.1 draft [6] as follows:
enum layouttype4 { enum layouttype4 {
LAYOUT4_NFSV4_1_FILES = 1, LAYOUT4_NFSV4_1_FILES = 1,
LAYOUT4_OSD2_OBJECTS = 2, LAYOUT4_OSD2_OBJECTS = 2,
skipping to change at page 7, line 14 skipping to change at page 7, line 15
value, LAYOUT4_OSD2_OBJECTS. The NFSv4.1 draft [6] specifies the value, LAYOUT4_OSD2_OBJECTS. The NFSv4.1 draft [6] specifies the
loc_body structure as an XDR type "opaque". The opaque layout is loc_body structure as an XDR type "opaque". The opaque layout is
uninterpreted by the generic pNFS client layers, but obviously must uninterpreted by the generic pNFS client layers, but obviously must
be interpreted by the object-storage layout driver. This document be interpreted by the object-storage layout driver. This document
defines the structure of this opaque value, pnfs_osd_layout4. defines the structure of this opaque value, pnfs_osd_layout4.
3.1. pnfs_osd_layout4 3.1. pnfs_osd_layout4
struct pnfs_osd_layout4 { struct pnfs_osd_layout4 {
pnfs_osd_data_map4 map; pnfs_osd_data_map4 map;
uint32_t comps_index;
pnfs_osd_object_cred4 components<>; pnfs_osd_object_cred4 components<>;
}; };
The pnfs_osd_layout4 structure specifies a layout over a set of The pnfs_osd_layout4 structure specifies a layout over a set of
component objects. The components field is an array of object component objects. The components field is an array of object
identifiers and security credentials that grant access to each identifiers and security credentials that grant access to each
object. The organization of the data is defined by the object. The organization of the data is defined by the
pnfs_osd_data_map4 type that specifies how the file's data is mapped pnfs_osd_data_map4 type that specifies how the file's data is mapped
onto the component objects (i.e., the striping pattern). The data onto the component objects (i.e., the striping pattern). The data
placement algorithm that maps file data onto component objects assume placement algorithm that maps file data onto component objects assume
that each component object occurs exactly once in the array of that each component object occurs exactly once in the array of
components. Therefore, component objects MUST appear in the components. Therefore, component objects MUST appear in the
component array only once. component array only once. The components array may represent all
objects comprising the file, in which case comps_index is set to zero
and the number of entries in the "components" array is equal to
map.num_comps. The server MAY return fewer components than
num_comps, provided that the returned components are sufficient to
access any byte in the layout's data range (e.g., a sub-stripe of
"group_width" components). In this case, comps_index represents the
position of the returned components array within the full array of
components that comprise the file.
Note that the layout depends on the file size, which the client Note that the layout depends on the file size, which the client
learns from the generic return parameters of LAYOUTGET, by doing learns from the generic return parameters of LAYOUTGET, by doing
GETATTR commands to the metadata server. The client uses the file GETATTR commands to the metadata server. The client uses the file
size to decide if it should fill holes with zeros, or return a short size to decide if it should fill holes with zeros, or return a short
read. Striping patterns can cause cases where component objects are read. Striping patterns can cause cases where component objects are
shorter than other components because a hole happens to correspond to shorter than other components because a hole happens to correspond to
the last part of the component object. the last part of the component object.
3.1.1. pnfs_osd_objid4 3.1.1. pnfs_osd_objid4
skipping to change at page 9, line 4 skipping to change at page 9, line 19
PNFS_OSD_CAP_KEY_SEC_SSV = 1, PNFS_OSD_CAP_KEY_SEC_SSV = 1,
}; };
struct pnfs_osd_object_cred4 { struct pnfs_osd_object_cred4 {
pnfs_osd_objid4 object_id; pnfs_osd_objid4 object_id;
pnfs_osd_version4 osd_version; pnfs_osd_version4 osd_version;
pnfs_osd_cap_key_sec4 cap_key_sec; pnfs_osd_cap_key_sec4 cap_key_sec;
opaque capability_key<>; opaque capability_key<>;
opaque capability<>; opaque capability<>;
}; };
The pnfs_osd_object_cred4 structure is used to identify each The pnfs_osd_object_cred4 structure is used to identify each
component comprising the file. The object_id identifies the component comprising the file. The object_id identifies the
component object, the osd_version represents the osd protocol component object, the osd_version represents the osd protocol
version, or whether that component is unavailable, and the capability version, or whether that component is unavailable, and the capability
and capability key, along with the systemid from the and capability key, along with the systemid from the
pnfs_osd_deviceaddr, provide the OSD security credentials needed to pnfs_osd_deviceaddr, provide the OSD security credentials needed to
access that object. The cap_key_sec value denotes the method used to access that object. The cap_key_sec value denotes the method used to
secure the capability_key (see Section 9.1 for more details). secure the capability_key (see Section 10.1 for more details).
To comply with the OSD security requirements the capability key To comply with the OSD security requirements the capability key
SHOULD be transferred securely to prevent eavesdropping (see SHOULD be transferred securely to prevent eavesdropping (see
Section 9). Therefore, a client SHOULD either issue the LAYOUTGET Section 10). Therefore, a client SHOULD either issue the LAYOUTGET
operation via RPCSEC_GSS with the privacy service or to previously operation via RPCSEC_GSS with the privacy service or to previously
establish an SSV for the sessions via the NFSv4.1 SET_SSV operation. establish an SSV for the sessions via the NFSv4.1 SET_SSV operation.
The pnfs_osd_cap_key_sec4 type is used to identify the method used by The pnfs_osd_cap_key_sec4 type is used to identify the method used by
the server to secure the capability key. the server to secure the capability key.
o PNFS_OSD_CAP_KEY_SEC_NONE denotes that the capability_key is not o PNFS_OSD_CAP_KEY_SEC_NONE denotes that the capability_key is not
encrypted in which case the client SHOULD issue the LAYOUTGET encrypted in which case the client SHOULD issue the LAYOUTGET
operation with RPCSEC_GSS with the privacy service or the NFSv4.1 operation with RPCSEC_GSS with the privacy service or the NFSv4.1
transport should be secured by using methods that are external to transport should be secured by using methods that are external to
NFSv4.1 like the use of IPSEC [8] for transporting the NFSV4.1 NFSv4.1 like the use of IPSEC [8] for transporting the NFSV4.1
skipping to change at page 10, line 21 skipping to change at page 10, line 32
PNFS_OSD_RAID_PQ = 4 /* Reed-Solomon P+Q */ PNFS_OSD_RAID_PQ = 4 /* Reed-Solomon P+Q */
}; };
pnfs_osd_raid_algorithm4 represents the data redundancy algorithm pnfs_osd_raid_algorithm4 represents the data redundancy algorithm
used to protect the file's contents. See Section 3.3 for more used to protect the file's contents. See Section 3.3 for more
details. details.
3.1.5. pnfs_osd_data_map4 3.1.5. pnfs_osd_data_map4
struct pnfs_osd_data_map4 { struct pnfs_osd_data_map4 {
uint32_t num_comps;
length4 stripe_unit; length4 stripe_unit;
uint32_t group_width; uint32_t group_width;
uint32_t group_depth; uint32_t group_depth;
uint32_t mirror_cnt; uint32_t mirror_cnt;
pnfs_osd_raid_algorithm4 raid_algorithm; pnfs_osd_raid_algorithm4 raid_algorithm;
}; };
The pnfs_osd_data_map4 structure parameterizes the algorithm that The pnfs_osd_data_map4 structure parameterizes the algorithm that
maps a file's contents over the component objects. Instead of maps a file's contents over the component objects. Instead of
limiting the system to simple striping scheme where loss of a single limiting the system to simple striping scheme where loss of a single
component object results in data loss, the map parameters support component object results in data loss, the map parameters support
mirroring and more complicated schemes that protect against loss of a mirroring and more complicated schemes that protect against loss of a
component object. component object.
num_comps is the number of component objects the file is striped
over. The server MAY grow the file by adding more components to the
stripe while clients hold valid layouts until the file has reached
its final stripe width. The file length in this case MUST be limited
to the number of bytes in a full stripe.
The stripe_unit is the number of bytes placed on one component before The stripe_unit is the number of bytes placed on one component before
advancing to the next one in the list of components. The number of advancing to the next one in the list of components. The number of
bytes in a full stripe is stripe_unit times the number of components. bytes in a full stripe is stripe_unit times the number of components.
In some raid schemes, a stripe includes redundant information (i.e., In some raid schemes, a stripe includes redundant information (i.e.,
parity) that lets the system recover from loss or damage to a parity) that lets the system recover from loss or damage to a
component object. component object.
The group_width and group_depth parameters allow a nested striping The group_width and group_depth parameters allow a nested striping
pattern. If there is no nesting, then group_width and group_depth pattern (See Section 3.2.2 for details). If there is no nesting,
MUST be zero. Otherwise, the group_width defines the width of a data then group_width and group_depth MUST be zero. The size of the
stripe, and the group_depth defines how many stripes are accessed components array MUST be a multiple of group_width.
before advancing to the next group of components in the list of
component objects for the file. The size of the components array
MUST be a multiple of group_width.
The mirror_cnt is used to replicate a file by replicating its The mirror_cnt is used to replicate a file by replicating its
component objects. If there is no mirroring, then mirror_cnt MUST be component objects. If there is no mirroring, then mirror_cnt MUST be
0. If mirror_cnt is greater than zero, then the size of the 0. If mirror_cnt is greater than zero, then the size of the
component array MUST be a multiple of (mirror_cnt+1). component array MUST be a multiple of (mirror_cnt+1).
See Section 3.2 for more details. See Section 3.2 for more details.
3.2. Data Mapping Schemes 3.2. Data Mapping Schemes
This section describes the different data mapping schemes in detail. This section describes the different data mapping schemes in detail.
3.2.1. Simple Striping
The object layout always uses a "dense" layout as described in the The object layout always uses a "dense" layout as described in the
pNFS document. This means that the second stripe unit of the file pNFS document. This means that the second stripe unit of the file
starts at offset 0 of the second component, rather than at offset starts at offset 0 of the second component, rather than at offset
stripe_unit bytes. After a full stripe has been written, the next stripe_unit bytes. After a full stripe has been written, the next
stripe unit is appended to the first component object in the list stripe unit is appended to the first component object in the list
without any holes in the component objects. The mapping from the without any holes in the component objects.
logical offset within a file (L) to do the component object C and
object-specific offset O is defined by the following equations: 3.2.1. Simple Striping
The mapping from the logical offset within a file (L) to the
component object C and object-specific offset O is defined by the
following equations:
L = logical offset into the file L = logical offset into the file
W = total number of components W = total number of components
S = W * stripe_unit S = W * stripe_unit
N = L / S N = L / S
C = (L-(N*S)) / stripe_unit C = (L-(N*S)) / stripe_unit
O = (N*stripe_unit)+(L%stripe_unit) O = (N*stripe_unit)+(L%stripe_unit)
In these equations, S is the number of bytes in a full stripe, and N In these equations, S is the number of bytes in a full stripe, and N
is the stripe number. C is an index into the array of components, so is the stripe number. C is an index into the array of components, so
skipping to change at page 12, line 28 skipping to change at page 12, line 32
O = (0*4096)+(9000%4096) = 808 O = (0*4096)+(9000%4096) = 808
Offset 132000: Offset 132000:
N = 132000 / 16384 = 8 N = 132000 / 16384 = 8
C = (132000-(8*16384)) / 4096 = 0 C = (132000-(8*16384)) / 4096 = 0
O = (8*4096) + (132000%4096) = 33696 O = (8*4096) + (132000%4096) = 33696
3.2.2. Nested Striping 3.2.2. Nested Striping
The group_width and group_depth parameters allow a nested striping The group_width and group_depth parameters allow a nested striping
pattern. If there is no nesting, then group_width and group_depth pattern. The group_width defines the width of a data stripe and the
MUST be zero. Otherwise, the group_width defines the width of a data group_depth defines how many stripes are written before advancing to
stripe, and the group_depth defines how many stripes are written the next group of components in the list of component objects for the
before advancing to the next group of components in the list of file. The math used to map from a file offset to a component object
component objects for the file. The size of the components array and offset within that object is shown below. The computations map
MUST be a multiple of group_width. The math used to map from a file from the logical offset L to the component index C and offset
offset to a component object and offset within that object is shown relative O within that component object.
below. The computations map from the logical offset L to the
component index C and offset relative O within that component object.
L = logical offset into the file L = logical offset into the file
W = total number of components W = total number of components
S = stripe_unit * group_depth * W S = stripe_unit * group_depth * W
T = stripe_unit * group_depth * group_width T = stripe_unit * group_depth * group_width
U = stripe_unit * group_width U = stripe_unit * group_width
M = L / S M = L / S
G = (L - (M * S)) / T G = (L - (M * S)) / T
H = (L - (M * S)) % T H = (L - (M * S)) % T
N = H / U N = H / U
skipping to change at page 13, line 50 skipping to change at page 14, line 4
N = 232 MB / 10 MB = 23 N = 232 MB / 10 MB = 23
C = (232 MB - (23 * 10 MB)) / 1 MB + 4 * 10 = 42 C = (232 MB - (23 * 10 MB)) / 1 MB + 4 * 10 = 42
O = 7232 MB % 1 MB + 23 * 1 MB + 1 * 50 * 1 MB = 73 MB O = 7232 MB % 1 MB + 23 * 1 MB + 1 * 50 * 1 MB = 73 MB
3.2.3. Mirroring 3.2.3. Mirroring
The mirror_cnt is used to replicate a file by replicating its The mirror_cnt is used to replicate a file by replicating its
component objects. If there is no mirroring, then mirror_cnt MUST be component objects. If there is no mirroring, then mirror_cnt MUST be
0. If mirror_cnt is greater than zero, then the size of the 0. If mirror_cnt is greater than zero, then the size of the
component array MUST be a multiple of (mirror_cnt+1). Thus, for a component array MUST be a multiple of (mirror_cnt+1). Thus, for a
classic mirror on two objects, mirror_cnt is one. If group_width is classic mirror on two objects, mirror_cnt is one. Note that
also non-zero, then the size MUST be a multiple of group_width * mirroring can be defined over any raid algorithm and striping pattern
(mirror_cnt+1). Replicas are adjacent in the components array, and (either simple or nested). If group_width is also non-zero, then the
the value C produced by the above equations is not a direct index size MUST be a multiple of group_width * (mirror_cnt+1). Replicas
into the components array. Instead, the following equations are adjacent in the components array, and the value C produced by the
determine the replica component index RCi, where i ranges from 0 to above equations is not a direct index into the components array.
mirror_cnt. Instead, the following equations determine the replica component
index RCi, where i ranges from 0 to mirror_cnt.
C = component index for striping or two-level striping C = component index for striping or two-level striping
i ranges from 0 to mirror_cnt, inclusive i ranges from 0 to mirror_cnt, inclusive
RCi = C * (mirror_cnt+1) + i RCi = C * (mirror_cnt+1) + i
3.3. RAID Algorithms 3.3. RAID Algorithms
pnfs_osd_raid_algorithm4 determines the algorithm and placement of pnfs_osd_raid_algorithm4 determines the algorithm and placement of
redundant data. This section defines the different RAID algorithms. redundant data. This section defines the different RAID algorithms.
3.3.1. PNFS_OSD_RAID_0 3.3.1. PNFS_OSD_RAID_0
PNFS_OSD_RAID_0 means there is no parity data, so all bytes in the PNFS_OSD_RAID_0 means there is no parity data, so all bytes in the
component objects are data bytes located by the above equations for C component objects are data bytes located by the above equations for C
and O. If a component object is unavailable, the pNFS client can and O. If a component object is marked as PNFS_OSD_MISSING, the pNFS
choose to return NULLs for the missing data, or it can retry the READ client MUST either return an I/O error if this component is attempted
against the pNFS server, or it can return an EIO error. to be read or alternatively, it can retry the READ against the pNFS
server.
3.3.2. PNFS_OSD_RAID_4 3.3.2. PNFS_OSD_RAID_4
PNFS_OSD_RAID_4 means that the last component object, or the last in PNFS_OSD_RAID_4 means that the last component object, or the last in
each group if group_width is > zero, contains parity information each group if group_width is > zero, contains parity information
computed over the rest of the stripe with an XOR operation. If a computed over the rest of the stripe with an XOR operation. If a
component object is unavailable, the client can read the rest of the component object is unavailable, the client can read the rest of the
stripe units in the damaged stripe and recompute the missing stripe stripe units in the damaged stripe and recompute the missing stripe
unit by XORing the other stripe units in the stripe. Or the client unit by XORing the other stripe units in the stripe. Or the client
can replay the READ against the pNFS server which will presumably can replay the READ against the pNFS server which will presumably
skipping to change at page 15, line 41 skipping to change at page 15, line 42
(Compute C based on L' as described above) (Compute C based on L' as described above)
C' = (C - (N%W)) % W C' = (C - (N%W)) % W
I = W - (N%W) - 1 I = W - (N%W) - 1
if (C' <= I) { if (C' <= I) {
C'++ C'++
} }
3.3.4. PNFS_OSD_RAID_PQ 3.3.4. PNFS_OSD_RAID_PQ
PNFS_OSD_RAID_PQ is a double-parity scheme that uses the Reed-Solomon PNFS_OSD_RAID_PQ is a double-parity scheme that uses the Reed-Solomon
P+Q encoding scheme. In this layout, the last two component objects P+Q encoding scheme [9]. In this layout, the last two component
hold the P and Q data, respectively. P is parity computed with XOR, objects hold the P and Q data, respectively. P is parity computed
and Q is a more complex equation that is not described here. The with XOR, and Q is a more complex equation that is not described
equations given above for embedded parity can be used to map a file here. The equations given above for embedded parity can be used to
offset to the correct component object by setting the number of map a file offset to the correct component object by setting the
parity components to 2 instead of 1 for RAID4 or RAID5. Clients may number of parity components to 2 instead of 1 for RAID4 or RAID5.
simply choose to read data through the metadata server if two Clients may simply choose to read data through the metadata server if
components are missing or damaged. two components are missing or damaged.
Issue: This scheme also has a RAID_4 like layout where the ECC blocks Issue: This scheme also has a RAID_4 like layout where the ECC blocks
are stored on the same components on every stripe and a rotated, are stored on the same components on every stripe and a rotated,
RAID-5 like layout where the stripe units are rotated. Should we RAID-5 like layout where the stripe units are rotated. Should we
make the following properties orthogonal: RAID_4 or RAID_5 (i.e., make the following properties orthogonal: RAID_4 or RAID_5 (i.e.,
non-rotated or rotated), and then have the number of parity non-rotated or rotated), and then have the number of parity
components and the associated algorithm be the orthogonal parameter? components and the associated algorithm be the orthogonal parameter?
3.3.5. RAID Usage and implementation notes 3.3.5. RAID Usage and implementation notes
skipping to change at page 16, line 38 skipping to change at page 16, line 40
}; };
The layoutupdate4 type is an opaque value at the generic pNFS client The layoutupdate4 type is an opaque value at the generic pNFS client
level. If the lou_type layout type is LAYOUT4_OSD2_OBJECTS, then the level. If the lou_type layout type is LAYOUT4_OSD2_OBJECTS, then the
lou_body opaque value is defined by the pnfs_osd_layoutupdate4 type. lou_body opaque value is defined by the pnfs_osd_layoutupdate4 type.
4.1. pnfs_osd_layoutupdate4 4.1. pnfs_osd_layoutupdate4
struct pnfs_osd_layoutupdate4 { struct pnfs_osd_layoutupdate4 {
pnfs_osd_deltaspaceused4 delta_space_used; pnfs_osd_deltaspaceused4 delta_space_used;
pnfs_osd_ioerr4 ioerr<>;
}; };
Object-Based pNFS clients are not allowed to modify the layout. Object-Based pNFS clients are not allowed to modify the layout.
"delta_space_used" is used to convey capacity usage information back "delta_space_used" is used to convey capacity usage information back
to the metadata server and, in case OSD I/O operations failed, to the metadata server.
"ioerr" is used to report these errors to the metadata server.
4.1.1. pnfs_osd_deltaspaceused4 4.1.1. pnfs_osd_deltaspaceused4
union pnfs_osd_deltaspaceused4 switch (bool valid) { union pnfs_osd_deltaspaceused4 switch (bool valid) {
case TRUE: case TRUE:
int64_t delta; /* Bytes consumed by write activity */ int64_t delta; /* Bytes consumed by write activity */
case FALSE: case FALSE:
void; void;
}; };
skipping to change at page 17, line 28 skipping to change at page 17, line 28
client. In this protocol, the OSD returns the capacity consumed by a client. In this protocol, the OSD returns the capacity consumed by a
write, which can be different than the number of bytes written write, which can be different than the number of bytes written
because of internal overhead like block-based allocation and indirect because of internal overhead like block-based allocation and indirect
blocks, and the client reflects this back to the pNFS server so it blocks, and the client reflects this back to the pNFS server so it
can accurately track quota. The pNFS server can choose to trust this can accurately track quota. The pNFS server can choose to trust this
information coming from the clients and therefore avoid querying the information coming from the clients and therefore avoid querying the
OSDs at the time of LAYOUTCOMMIT. If the client is unable to obtain OSDs at the time of LAYOUTCOMMIT. If the client is unable to obtain
this information from the OSD, it simply returns invalid this information from the OSD, it simply returns invalid
delta_space_used. delta_space_used.
4.1.2. pnfs_osd_errno4 5. Object-Based Layout Return
layoutreturn_file4 is used in the LAYOUTRETURN operation to convey
layout-type specific information to the server. It is defined in the
NFSv4.1 draft [6] as follows:
struct layoutreturn_file4 {
offset4 lrf_offset;
length4 lrf_length;
stateid4 lrf_stateid;
/* layouttype4 specific data */
opaque lrf_body<>;
};
union layoutreturn4 switch(layoutreturn_type4 lr_returntype) {
case LAYOUTRETURN4_FILE:
layoutreturn_file4 lr_layout;
default:
void;
};
struct LAYOUTRETURN4args {
/* CURRENT_FH: file */
bool lora_reclaim;
layoutreturn_stateid lora_recallstateid;
layouttype4 lora_layout_type;
layoutiomode4 lora_iomode;
layoutreturn4 lora_layoutreturn;
};
If the lora_layout_type layout type is LAYOUT4_OSD2_OBJECTS, then the
lrf_body opaque value is defined by the pnfs_osd_layoutreturn4 type.
5.1. pnfs_osd_layoutreturn4
struct pnfs_osd_layoutreturn4 {
pnfs_osd_ioerr4 ioerr<>;
};
When OSD I/O operations failed, "ioerr" is used to report these
errors to the metadata server. The pnfs_osd_ioerr4 data structure is
defined as follows:
5.1.1. pnfs_osd_errno4
enum pnfs_osd_errno4 { enum pnfs_osd_errno4 {
PNFS_OSD_ERR_EIO = 1, PNFS_OSD_ERR_EIO = 1,
PNFS_OSD_ERR_NOT_FOUND = 2, PNFS_OSD_ERR_NOT_FOUND = 2,
PNFS_OSD_ERR_NO_SPACE = 3, PNFS_OSD_ERR_NO_SPACE = 3,
PNFS_OSD_ERR_BAD_CRED = 4, PNFS_OSD_ERR_BAD_CRED = 4,
PNFS_OSD_ERR_NO_ACCESS = 5, PNFS_OSD_ERR_NO_ACCESS = 5,
PNFS_OSD_ERR_UNREACHABLE = 6, PNFS_OSD_ERR_UNREACHABLE = 6,
PNFS_OSD_ERR_RESOURCE = 7 PNFS_OSD_ERR_RESOURCE = 7
}; };
skipping to change at page 18, line 34 skipping to change at page 20, line 10
o PNFS_OSD_ERR_UNREACHABLE indicates the client did not complete the o PNFS_OSD_ERR_UNREACHABLE indicates the client did not complete the
I/O operation at the Object Storage Device due to a communication I/O operation at the Object Storage Device due to a communication
failure. Whether the I/O operation was executed by the OSD or not failure. Whether the I/O operation was executed by the OSD or not
is undetermined. is undetermined.
o PNFS_OSD_ERR_RESOURCE indicates the client did not issue the I/O o PNFS_OSD_ERR_RESOURCE indicates the client did not issue the I/O
operation due to a local problem on the initiator (i.e. client) operation due to a local problem on the initiator (i.e. client)
side, e.g., when running out of memory. The client MUST guarantee side, e.g., when running out of memory. The client MUST guarantee
that the OSD command was never dispatched to the OSD. that the OSD command was never dispatched to the OSD.
4.1.3. pnfs_osd_ioerr4 5.1.2. pnfs_osd_ioerr4
struct pnfs_osd_ioerr4 { struct pnfs_osd_ioerr4 {
pnfs_osd_objid4 component; pnfs_osd_objid4 component;
length4 comp_offset; length4 comp_offset;
length4 comp_length; length4 comp_length;
bool iswrite; bool iswrite;
pnfs_osd_errno4 errno; pnfs_osd_errno4 errno;
}; };
The pnfs_osd_ioerr4 structure is used to return error indications for The pnfs_osd_ioerr4 structure is used to return error indications for
objects that generated errors during data transfers. These are hints objects that generated errors during data transfers. These are hints
to the metadata server that there are problems with that object. For to the metadata server that there are problems with that object. For
each error, "component", "comp_offset", and "comp_length" represent each error, "component", "comp_offset", and "comp_length" represent
the object and byte range within the component object in which the the object and byte range within the component object in which the
error occurred. "iswrite" is set to "true" if the failed OSD error occurred, "iswrite" is set to "true" if the failed OSD
operation was data modifying, and "errno" represents the type of operation was data modifying, and "errno" represents the type of
error. error.
5. Object-Based Creation Layout Hint 6. Object-Based Creation Layout Hint
The layouthint4 type is defined in the NFSv4.1 draft [6] as follows: The layouthint4 type is defined in the NFSv4.1 draft [6] as follows:
struct layouthint4 { struct layouthint4 {
layouttype4 loh_type; layouttype4 loh_type;
opaque loh_body<>; opaque loh_body<>;
}; };
The layouthint4 structure is used by the client to pass in a hint The layouthint4 structure is used by the client to pass in a hint
about the type of layout it would like created for a particular file. about the type of layout it would like created for a particular file.
If the loh_type layout type is LAYOUT4_OSD2_OBJECTS, then the If the loh_type layout type is LAYOUT4_OSD2_OBJECTS, then the
loh_body opaque value is defined by the pnfs_osd_layouthint4 type. loh_body opaque value is defined by the pnfs_osd_layouthint4 type.
5.1. pnfs_osd_layouthint4 6.1. pnfs_osd_layouthint4
union num_comps_hint4 switch (bool valid) { union num_comps_hint4 switch (bool valid) {
case TRUE: case TRUE:
uint32_t num_comps; uint32_t num_comps;
case FALSE: case FALSE:
void; void;
}; };
union stripe_unit_hint4 switch (bool valid) { union stripe_unit_hint4 switch (bool valid) {
case TRUE: case TRUE:
length4 stripe_unit; length4 stripe_unit;
case FALSE: case FALSE:
void; void;
}; };
union group_width_hint4 switch (bool valid) { union group_width_hint4 switch (bool valid) {
case TRUE: case TRUE:
uint32_t group_width; uint32_t group_width;
skipping to change at page 20, line 36 skipping to change at page 22, line 12
cares about, e.g. it can provide a hint for the desired number of cares about, e.g. it can provide a hint for the desired number of
mirrored components, regardless of the the raid algorithm selected mirrored components, regardless of the the raid algorithm selected
for the file. The server should make an attempt to honor the hints for the file. The server should make an attempt to honor the hints
but it can ignore any or all of them at its own discretion and but it can ignore any or all of them at its own discretion and
without failing the respective create operation. without failing the respective create operation.
The num_comps hint can be used to limit the total number of component The num_comps hint can be used to limit the total number of component
objects comprising the file. All other hints correspond directly to objects comprising the file. All other hints correspond directly to
the different fields of pnfs_osd_data_map4. the different fields of pnfs_osd_data_map4.
6. Layout Segments 7. Layout Segments
The pnfs layout operations operate on logical byte ranges. There is The pnfs layout operations operate on logical byte ranges. There is
no requirement in the protocol for any relationship between byte no requirement in the protocol for any relationship between byte
ranges used in LAYOUTGET to acquire layouts and byte ranges used in ranges used in LAYOUTGET to acquire layouts and byte ranges used in
CB_LAYOUTRECALL, LAYOUTCOMMIT, or LAYOUTRETURN. However, using OSD CB_LAYOUTRECALL, LAYOUTCOMMIT, or LAYOUTRETURN. However, using OSD
capabilities poses limitations on these operations since the capabilities poses limitations on these operations since the
capabilities associated with layout segments cannot be merged or capabilities associated with layout segments cannot be merged or
split. The following guidelines should be followed for proper split. The following guidelines should be followed for proper
operation of object-based layouts. operation of object-based layouts.
6.1. CB_LAYOUTRECALL and LAYOUTRETURN 7.1. CB_LAYOUTRECALL and LAYOUTRETURN
In general, the object-based layout driver should keep track of each In general, the object-based layout driver should keep track of each
layout segment it got, keeping record of the segment's iomode, layout segment it got, keeping record of the segment's iomode,
offset, and length. The server should allow the client to get offset, and length. The server should allow the client to get
multiple overlapping layout segments but is free to recall the layout multiple overlapping layout segments but is free to recall the layout
to prevent overlap. to prevent overlap.
In response to CB_LAYOUTRECALL, the client should return all layout In response to CB_LAYOUTRECALL, the client should return all layout
segments matching the given iomode and overlapping with the recalled segments matching the given iomode and overlapping with the recalled
range. When returning the layouts for this byte range with range. When returning the layouts for this byte range with
skipping to change at page 21, line 25 skipping to change at page 23, line 5
the clientid, iomode, and byte range given in LAYOUTRETURN. If no the clientid, iomode, and byte range given in LAYOUTRETURN. If no
exact match is found then the server should release all layout exact match is found then the server should release all layout
segments matching the clientid and iomode and that are fully segments matching the clientid and iomode and that are fully
contained in the returned byte range. If none are found and the byte contained in the returned byte range. If none are found and the byte
range is a subset of an outstanding layout segment with for the same range is a subset of an outstanding layout segment with for the same
clientid and iomode, then the client can be considered malfunctioning clientid and iomode, then the client can be considered malfunctioning
and the server SHOULD recall all layouts from this client to reset and the server SHOULD recall all layouts from this client to reset
its state. If this behavior repeats the server SHOULD deny all its state. If this behavior repeats the server SHOULD deny all
LAYOUTGETs from this client. LAYOUTGETs from this client.
6.2. LAYOUTCOMMIT 7.2. LAYOUTCOMMIT
LAYOUTCOMMIT is only used by object-based pNFS to convey modified LAYOUTCOMMIT is only used by object-based pNFS to convey modified
attributes hints and/or to report I/O errors to the MDS. Therefore, attributes hints and/or to report I/O errors to the MDS. Therefore,
the offset and length in LAYOUTCOMMIT4args are reserved for future the offset and length in LAYOUTCOMMIT4args are reserved for future
use and should be set to 0. However, component byte ranges in the use and should be set to 0. However, component byte ranges in the
optional pnfs_osd_ioerr4 structure are used for recovering the object optional pnfs_osd_ioerr4 structure are used for recovering the object
and MUST be set by the client to cover all failed I/O operations to and MUST be set by the client to cover all failed I/O operations to
the component. the component.
7. Recalling Layouts 8. Recalling Layouts
The object-based metadata server should recall outstanding layouts in The object-based metadata server should recall outstanding layouts in
the following cases: the following cases:
o When the file's security policy changes, i.e. ACLs or permission o When the file's security policy changes, i.e. ACLs or permission
mode bits are set. mode bits are set.
o When the file's aggregation map changes, rendering outstanding o When the file's aggregation map changes, rendering outstanding
layouts invalid. layouts invalid.
o When there are sharing conflicts. For example, the server will o When there are sharing conflicts. For example, the server will
issue stripe aligned layout segments for RAID-5 objects. To issue stripe aligned layout segments for RAID-5 objects. To
prevent corruption of the file's parity, Multiple clients must not prevent corruption of the file's parity, Multiple clients must not
hold valid write layouts for the same stripes. An outstanding RW hold valid write layouts for the same stripes. An outstanding RW
layout should be recalled when a conflicting LAYOUTGET is received layout should be recalled when a conflicting LAYOUTGET is received
from a different client for LAYOUTIOMODE4_RW and for a byte-range from a different client for LAYOUTIOMODE4_RW and for a byte-range
overlapping with the outstanding layout segment. overlapping with the outstanding layout segment.
7.1. CB_RECALL_ANY 8.1. CB_RECALL_ANY
The metadata server can use the CB_RECALL_ANY callback operation to The metadata server can use the CB_RECALL_ANY callback operation to
notify the client to return some or all of its layouts. The NFSv4.1 notify the client to return some or all of its layouts. The NFSv4.1
draft [6] defines the following types: draft [6] defines the following types:
const RCA4_TYPE_MASK_OBJ_LAYOUT_MIN = 8; const RCA4_TYPE_MASK_OBJ_LAYOUT_MIN = 8;
const RCA4_TYPE_MASK_OBJ_LAYOUT_MAX = 11; const RCA4_TYPE_MASK_OBJ_LAYOUT_MAX = 11;
struct CB_RECALL_ANY4args { struct CB_RECALL_ANY4args {
uint32_t craa_objects_to_keep; uint32_t craa_objects_to_keep;
skipping to change at page 22, line 33 skipping to change at page 24, line 12
specifies the type of resources that are recalled and the specifies the type of resources that are recalled and the
craa_objects_to_keep value specifies how many of the recalled objects craa_objects_to_keep value specifies how many of the recalled objects
the client is allowed to keep. The object-based layout type mask the client is allowed to keep. The object-based layout type mask
flags are defined as follows. They represent the iomode of the flags are defined as follows. They represent the iomode of the
recalled layouts. In response, the client SHOULD return layouts of recalled layouts. In response, the client SHOULD return layouts of
the recalled iomode that it needs the least, keeping at most the recalled iomode that it needs the least, keeping at most
craa_objects_to_keep object-based layouts. craa_objects_to_keep object-based layouts.
const PNFS_OSD_RCA4_TYPE_MASK_READ = RCA4_TYPE_MASK_OBJ_LAYOUT_MIN; const PNFS_OSD_RCA4_TYPE_MASK_READ = RCA4_TYPE_MASK_OBJ_LAYOUT_MIN;
const PNFS_OSD_RCA4_TYPE_MASK_RW = RCA4_TYPE_MASK_OBJ_LAYOUT_MIN+1; const PNFS_OSD_RCA4_TYPE_MASK_RW = RCA4_TYPE_MASK_OBJ_LAYOUT_MIN+1;
const PNFS_OSD_RCA4_TYPE_MASK_ANY = RCA4_TYPE_MASK_OBJ_LAYOUT_MIN+2;
The PNFS_OSD_RCA4_TYPE_MASK_READ flag notifies the client to return The PNFS_OSD_RCA4_TYPE_MASK_READ flag notifies the client to return
layouts of iomode LAYOUTIOMODE4_READ. Similarly, the layouts of iomode LAYOUTIOMODE4_READ. Similarly, the
PNFS_OSD_RCA4_TYPE_MASK_RW flag notifies the client to return layouts PNFS_OSD_RCA4_TYPE_MASK_RW flag notifies the client to return layouts
of iomode LAYOUTIOMODE4_RW. The PNFS_OSD_RCA4_TYPE_MASK_ANY flag of iomode LAYOUTIOMODE4_RW. When both mask flags are set, the client
notifies the client to return layouts of either iomode. is notified to return layouts of either iomode.
8. Client Fencing 9. Client Fencing
In cases where clients are uncommunicative and their lease has In cases where clients are uncommunicative and their lease has
expired or when clients fail to return recalled layouts in a timely expired or when clients fail to return recalled layouts in a timely
manner the server MAY revoke client layouts and/or device address manner the server MAY revoke client layouts and/or device address
mappings and reassign these resources to other clients. To avoid mappings and reassign these resources to other clients. To avoid
data corruption, the metadata server MUST fence off the revoked data corruption, the metadata server MUST fence off the revoked
clients from the respective objects as described in Section 9.4. clients from the respective objects as described in Section 10.4.
9. Security Considerations 10. Security Considerations
The pNFS extension partitions the NFSv4 file system protocol into two The pNFS extension partitions the NFSv4 file system protocol into two
parts, the control path and the data path (storage protocol). The parts, the control path and the data path (storage protocol). The
control path contains all the new operations described by this control path contains all the new operations described by this
extension; all existing NFSv4 security mechanisms and features apply extension; all existing NFSv4 security mechanisms and features apply
to the control path. The combination of components in a pNFS system to the control path. The combination of components in a pNFS system
is required to preserve the security properties of NFSv4 with respect is required to preserve the security properties of NFSv4 with respect
to an entity accessing data via a client, including security to an entity accessing data via a client, including security
countermeasures to defend against threats that NFSv4 provides countermeasures to defend against threats that NFSv4 provides
defenses for in environments where these threats are considered defenses for in environments where these threats are considered
skipping to change at page 24, line 8 skipping to change at page 25, line 34
and enforcement of the server access control policy using the layout and enforcement of the server access control policy using the layout
security credentials, the NOSEC security method MUST NOT be used for security credentials, the NOSEC security method MUST NOT be used for
I/O operation. It MAY only be used to get the System ID attribute I/O operation. It MAY only be used to get the System ID attribute
when the metadata server provided only the OSD name with the device when the metadata server provided only the OSD name with the device
address. The remainder of this section gives an overview of the address. The remainder of this section gives an overview of the
security mechanism described in that standard. The goal is to give security mechanism described in that standard. The goal is to give
the reader a basic understanding of the object security model. Any the reader a basic understanding of the object security model. Any
discrepancies between this text and the actual standard are obviously discrepancies between this text and the actual standard are obviously
to be resolved in favor of the OSD standard. to be resolved in favor of the OSD standard.
9.1. OSD Security Data Types 10.1. OSD Security Data Types
There are three main data types associated with object security: a There are three main data types associated with object security: a
capability, a credential, and security parameters. The capability is capability, a credential, and security parameters. The capability is
a set of fields that specifies an object and what operations can be a set of fields that specifies an object and what operations can be
performed on it. A credential is a signed capability. Only a performed on it. A credential is a signed capability. Only a
security manager that knows the secret device keys can correctly sign security manager that knows the secret device keys can correctly sign
a capability to form a valid credential. In pNFS, the file server a capability to form a valid credential. In pNFS, the file server
acts as the security manager and returns signed capabilities (i.e., acts as the security manager and returns signed capabilities (i.e.,
credentials) to the pNFS client. The security parameters are values credentials) to the pNFS client. The security parameters are values
computed by the issuer of OSD commands (i.e., the client) that prove computed by the issuer of OSD commands (i.e., the client) that prove
skipping to change at page 24, line 31 skipping to change at page 26, line 10
resulting signatures into the security_parameters field of the OSD resulting signatures into the security_parameters field of the OSD
command. The object storage device uses the secret keys it shares command. The object storage device uses the secret keys it shares
with the security manager to validate the signature values in the with the security manager to validate the signature values in the
security parameters. security parameters.
The security types are opaque to the generic layers of the pNFS The security types are opaque to the generic layers of the pNFS
client. The credential contents are defined as opaque within the client. The credential contents are defined as opaque within the
pnfs_osd_object_cred4 type. Instead of repeating the definitions pnfs_osd_object_cred4 type. Instead of repeating the definitions
here, the reader is referred to section 4.9.2.2 of the OSD standard. here, the reader is referred to section 4.9.2.2 of the OSD standard.
9.2. The OSD Security Protocol 10.2. The OSD Security Protocol
The object storage protocol relies on a cryptographically secure The object storage protocol relies on a cryptographically secure
capability to control accesses at the object storage devices. capability to control accesses at the object storage devices.
Capabilities are generated by the metadata server, returned to the Capabilities are generated by the metadata server, returned to the
client, and used by the client as described below to authenticate client, and used by the client as described below to authenticate
their requests to the Object Storage Device (OSD). Capabilities their requests to the Object Storage Device (OSD). Capabilities
therefore achieve the required access and open mode checking. They therefore achieve the required access and open mode checking. They
allow the file server to define and check a policy (e.g., open mode) allow the file server to define and check a policy (e.g., open mode)
and the OSD to enforce that policy without knowing the details (e.g., and the OSD to enforce that policy without knowing the details (e.g.,
user IDs and ACLs). user IDs and ACLs).
skipping to change at page 25, line 43 skipping to change at page 27, line 21
OSD uses the SecretKey it shares with the metadata server to compare OSD uses the SecretKey it shares with the metadata server to compare
the ReqMAC the client sent with a locally computed value: the ReqMAC the client sent with a locally computed value:
LocalCapKey = MAC<SecretKey>(Cap, SystemID) LocalCapKey = MAC<SecretKey>(Cap, SystemID)
LocalReqMAC = MAC<LocalCapKey>(Req, ReqNonce) LocalReqMAC = MAC<LocalCapKey>(Req, ReqNonce)
and if they match the OSD assumes that the capabilities came from an and if they match the OSD assumes that the capabilities came from an
authentic metadata server and allows access to the object, as allowed authentic metadata server and allows access to the object, as allowed
by the Cap. by the Cap.
9.3. Protocol Privacy Requirements 10.3. Protocol Privacy Requirements
Note that if the server LAYOUTGET reply, holding CapKey and Cap, is Note that if the server LAYOUTGET reply, holding CapKey and Cap, is
snooped by another client, it can be used to generate valid OSD snooped by another client, it can be used to generate valid OSD
requests (within the Cap access restrictions). requests (within the Cap access restrictions).
To provide the required privacy requirements for the capability key To provide the required privacy requirements for the capability key
returned by LAYOUTGET, the GSS-API can be used, e.g. by using the returned by LAYOUTGET, the GSS-API can be used, e.g. by using the
RPCSEC_GSS privacy method to send the LAYOUTGET operation or by using RPCSEC_GSS privacy method to send the LAYOUTGET operation or by using
the SSV key to encrypt the capability_key using the GSS_Wrap() the SSV key to encrypt the capability_key using the GSS_Wrap()
function. Two general ways to provide privacy in the absence of GSS- function. Two general ways to provide privacy in the absence of GSS-
API that are independent of NFSv4 are either an isolated network such API that are independent of NFSv4 are either an isolated network such
as a VLAN or a secure channel provided by IPsec [8]. as a VLAN or a secure channel provided by IPsec [8].
9.4. Revoking Capabilities 10.4. Revoking Capabilities
At any time, the metadata server may invalidate all outstanding At any time, the metadata server may invalidate all outstanding
capabilities on an object by changing its POLICY ACCESS TAG capabilities on an object by changing its POLICY ACCESS TAG
attribute. The value of the POLICY ACCESS TAG is part of a attribute. The value of the POLICY ACCESS TAG is part of a
capability, and it must match the state of the object attribute. If capability, and it must match the state of the object attribute. If
they do not match, the OSD rejects accesses to the object with the they do not match, the OSD rejects accesses to the object with the
sense key set to ILLEGAL REQUEST and an additional sense code set to sense key set to ILLEGAL REQUEST and an additional sense code set to
INVALID FIELD IN CDB. When a client attempts to use a capability and INVALID FIELD IN CDB. When a client attempts to use a capability and
is rejected this way, it should issue a LAYOUTCOMMIT for the object is rejected this way, it should issue a LAYOUTCOMMIT for the object
and specify PNFS_OSD_BAD_CRED in the ioerr parameter. The client may and specify PNFS_OSD_BAD_CRED in the ioerr parameter. The client may
skipping to change at page 27, line 5 skipping to change at page 28, line 27
responsibility to enforce access control among multiple users responsibility to enforce access control among multiple users
accessing the same file. It is neither required nor expected that accessing the same file. It is neither required nor expected that
the pNFS client will obtain a separate layout for each user accessing the pNFS client will obtain a separate layout for each user accessing
a shared object. The client SHOULD use OPEN and ACCESS calls to a shared object. The client SHOULD use OPEN and ACCESS calls to
check user permissions when performing I/O so that the server's check user permissions when performing I/O so that the server's
access control policies are correctly enforced. The result of the access control policies are correctly enforced. The result of the
ACCESS operation may be cached while the client holds a valid layout ACCESS operation may be cached while the client holds a valid layout
as the server is expected to recall layouts when the file's access as the server is expected to recall layouts when the file's access
permissions or ACL change. permissions or ACL change.
10. IANA Considerations 11. IANA Considerations
As described in the NFSv4.1 draft [6], new layout type numbers will As described in the NFSv4.1 draft [6], new layout type numbers will
be requested from IANA. This document defines the protocol be requested from IANA. This document defines the protocol
associated with the existing layout type number, associated with the existing layout type number,
LAYOUT4_OSD2_OBJECTS, and it requires no further actions for IANA. LAYOUT4_OSD2_OBJECTS, and it requires no further actions for IANA.
11. References 12. XDR Description of the Objects layout type
11.1. Normative References This section contains the XDR ([4]) description of objects layout
protocol. The XDR description is provided in this document in a way
that makes it simple for the reader to extract into ready to compile
form. The reader can feed this document in the following shell
script to produce the machine readable XDR description of the objects
layout protocol:
#!/bin/sh
grep "^ *///" | sed 's?^ *///??'
I.e. if the above script is stored in a file called "extract.sh", and
this document is in a file called "spec.txt", then the reader can do:
sh extract.sh < spec.txt > pnfs_obj_prot.x
The effect of the script is to remove leading white space from each
line, plus a sentinel sequence of "///".
The XDR description, with the sentinel sequence follows:
///%#include <nfs4_prot.h>
///
////*
/// * Device information
/// */
///enum pnfs_obj_addr_type4 {
/// OBJ_TARGET_NETADDR = 1,
/// OBJ_TARGET_IQN = 2,
/// OBJ_TARGET_WWN = 3
///};
///
///struct pnfs_osd_deviceaddr4 {
/// union target switch (pnfs_osd_addr_type4 type) {
/// case OBJ_TARGET_NETADDR:
/// pnfs_netaddr4 netaddr;
///
/// case OBJ_TARGET_IQN:
/// string iqn<>;
///
/// case OBJ_TARGET_WWN:
/// string wwn<>;
///
/// default:
/// void;
/// };
/// uint64_t lun;
/// opaque systemid<>;
/// pnfs_osd_object_cred4 root_obj_cred;
/// opaque osdname<>;
///};
///
////*
/// * Layout type
/// */
///enum pnfs_osd_raid_algorithm4 {
/// PNFS_OSD_RAID_0 = 1,
/// PNFS_OSD_RAID_4 = 2,
/// PNFS_OSD_RAID_5 = 3,
/// PNFS_OSD_RAID_PQ = 4 /* Reed-Solomon P+Q */
///};
///
///struct pnfs_osd_data_map4 {
/// uint32_t num_comps;
/// length4 stripe_unit;
/// uint32_t group_width;
/// uint32_t group_depth;
/// uint32_t mirror_cnt;
/// pnfs_osd_raid_algorithm4 raid_algorithm;
///};
///
////* Note: deviceid4 is defined by the nfsv4.1 protocol */
///
///struct pnfs_osd_objid4 {
/// deviceid4 device_id;
/// uint64_t partition_id;
/// uint64_t object_id;
///};
///
///enum pnfs_osd_version4 {
/// PNFS_OSD_MISSING = 0,
/// PNFS_OSD_VERSION_1 = 1,
/// PNFS_OSD_VERSION_2 = 2
///};
///
///enum pnfs_osd_cap_key_sec4 {
/// PNFS_OSD_CAP_KEY_SEC_NONE = 0,
/// PNFS_OSD_CAP_KEY_SEC_SSV = 1,
///};
///
///struct pnfs_osd_object_cred4 {
/// pnfs_osd_objid4 object_id;
/// pnfs_osd_version4 osd_version;
/// pnfs_osd_cap_key_sec4 cap_key_sec;
/// opaque capability_key<>;
/// opaque capability<>;
///};
///
///struct pnfs_osd_layout4 {
/// pnfs_osd_data_map4 map;
/// uint32_t comps_index;
/// pnfs_osd_object_cred4 components<>;
///};
///
////*
/// * Layout update
/// */
///union pnfs_osd_deltaspaceused4 switch (bool valid) {
///case TRUE:
/// int64_t delta; /* Bytes consumed by write activity */
///case FALSE:
/// void;
///};
///
///struct pnfs_osd_layoutupdate4 {
/// pnfs_osd_deltaspaceused4 delta_space_used;
///};
///
////*
/// * Layout return
/// */
///enum pnfs_osd_errno4 {
/// PNFS_OSD_ERR_EIO = 1,
/// PNFS_OSD_ERR_NOT_FOUND = 2,
/// PNFS_OSD_ERR_NO_SPACE = 3,
/// PNFS_OSD_ERR_BAD_CRED = 4,
/// PNFS_OSD_ERR_NO_ACCESS = 5,
/// PNFS_OSD_ERR_UNREACHABLE = 6,
/// PNFS_OSD_ERR_RESOURCE = 7
///};
///
///struct pnfs_osd_ioerr4 {
/// pnfs_osd_objid4 component;
/// length4 comp_offset;
/// length4 comp_length;
/// bool iswrite;
/// pnfs_osd_errno4 errno;
///};
///
///struct pnfs_osd_layoutreturn4 {
/// pnfs_osd_ioerr4 ioerr<>;
///};
///
////*
/// * Layout hint
/// */
///union num_comps_hint4 switch (bool valid) {
/// case TRUE:
/// uint32_t num_comps;
/// case FALSE:
/// void;
///};
///
///union stripe_unit_hint4 switch (bool valid) {
/// case TRUE:
/// length4 stripe_unit;
/// case FALSE:
/// void;
///};
///
///union group_width_hint4 switch (bool valid) {
/// case TRUE:
/// uint32_t group_width;
/// case FALSE:
/// void;
///};
///
///union group_depth_hint4 switch (bool valid) {
/// case TRUE:
/// uint32_t group_depth;
/// case FALSE:
/// void;
///};
///
///union mirror_cnt_hint4 switch (bool valid) {
/// case TRUE:
/// uint32_t mirror_cnt;
/// case FALSE:
/// void;
///};
///
///union raid_algorithm_hint4 switch (bool valid) {
/// case TRUE:
/// pnfs_osd_raid_algorithm4 raid_algorithm;
/// case FALSE:
/// void;
///};
///
///struct pnfs_osd_layouthint4 {
/// num_comps_hint4 num_comps_hint;
/// stripe_unit_hint4 stripe_unit_hint;
/// group_width_hint4 group_width_hint;
/// group_depth_hint4 group_depth_hint;
/// mirror_cnt_hint4 mirror_cnt_hint;
/// raid_algorithm_hint4 raid_algorithm_hint;
///};
13. References
13.1. Normative References
[1] Bradner, S., "Key words for use in RFCs to Indicate Requirement [1] Bradner, S., "Key words for use in RFCs to Indicate Requirement
Levels", RFC 2119, March 1997. Levels", RFC 2119, March 1997.
[2] Weber, R., "SCSI Object-Based Storage Device Commands", [2] Weber, R., "SCSI Object-Based Storage Device Commands",
July 2004, <http://www.t10.org/ftp/t10/drafts/osd/osd-r10.pdf>. July 2004, <http://www.t10.org/ftp/t10/drafts/osd/osd-r10.pdf>.
[3] Linn, J., "Generic Security Service Application Program [3] Linn, J., "Generic Security Service Application Program
Interface Version 2, Update 1", RFC 2743, January 2000. Interface Version 2, Update 1", RFC 2743, January 2000.
[4] Eisler, M., "XDR: External Data Representation Standard", [4] Eisler, M., "XDR: External Data Representation Standard",
STD 67, RFC 4506, May 2006. STD 67, RFC 4506, May 2006.
[5] Shepler, S., Callaghan, B., Robinson, D., Thurlow, R., Beame, [5] Shepler, S., Callaghan, B., Robinson, D., Thurlow, R., Beame,
C., Eisler, M., and D. Noveck, "Network File System (NFS) C., Eisler, M., and D. Noveck, "Network File System (NFS)
version 4 Protocol", RFC 3530, April 2003. version 4 Protocol", RFC 3530, April 2003.
11.2. Informative References 13.2. Informative References
[6] Shepler, S., Eisler, M., and D. Noveck, "NFSv4 Minor Version 1", [6] Shepler, S., Eisler, M., and D. Noveck, "NFSv4 Minor Version 1",
March 2007, <http://www.ietf.org/internet-drafts/ February 2008, <http://www.ietf.org/internet-drafts/
draft-ietf-nfsv4-minorversion1-13.txt>. draft-ietf-nfsv4-minorversion1-20.txt>.
[7] Weber, R., "SCSI Object-Based Storage Device Commands -2 [7] Weber, R., "SCSI Object-Based Storage Device Commands -2
(OSD-2)", January 2007, (OSD-2)", January 2008,
<http://www.t10.org/ftp/t10/drafts/osd2/osd2r02.pdf>. <http://www.t10.org/ftp/t10/drafts/osd2/osd2r03.pdf>.
[8] Kent, S. and K. Seo, "Security Architecture for the Internet [8] Kent, S. and K. Seo, "Security Architecture for the Internet
Protocol", RFC 4301, December 2005. Protocol", RFC 4301, December 2005.
[9] MacWilliams, F. and N. Sloane, "The Theory of Error-Correcting
Codes, Part I", 1977.
Appendix A. Acknowledgments Appendix A. Acknowledgments
Todd Pisek was a co-editor of the initial drafts for this document. Todd Pisek was a co-editor of the initial drafts for this document.
Daniel E. Messinger and Pete Wyckoff reviewed and commented on this
document.
Authors' Addresses Authors' Addresses
Benny Halevy Benny Halevy
Panasas, Inc. Panasas, Inc.
1501 Reedsdale St. Suite 400 1501 Reedsdale St. Suite 400
Pittsburgh, PA 15233 Pittsburgh, PA 15233
USA USA
Phone: +1-412-323-3500 Phone: +1-412-323-3500
skipping to change at page 29, line 7 skipping to change at page 35, line 7
1501 Reedsdale St. Suite 400 1501 Reedsdale St. Suite 400
Pittsburgh, PA 15233 Pittsburgh, PA 15233
USA USA
Phone: +1-412-323-3500 Phone: +1-412-323-3500
Email: jimz@panasas.com Email: jimz@panasas.com
URI: http://www.panasas.com/ URI: http://www.panasas.com/
Full Copyright Statement Full Copyright Statement
Copyright (C) The IETF Trust (2007). Copyright (C) The IETF Trust (2008).
This document is subject to the rights, licenses and restrictions This document is subject to the rights, licenses and restrictions
contained in BCP 78, and except as set forth therein, the authors contained in BCP 78, and except as set forth therein, the authors
retain all their rights. retain all their rights.
This document and the information contained herein are provided on an This document and the information contained herein are provided on an
"AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
 End of changes. 57 change blocks. 
112 lines changed or deleted 370 lines changed or added

This html diff was produced by rfcdiff 1.34. The latest version is available from http://tools.ietf.org/tools/rfcdiff/