APIs in Category: dp-relationship
API version 3.7.1

 
dp-relationship-list-info-iter-end
dp-relationship-list-info-iter-next
dp-relationship-list-info-iter-start
dp-relationship-modify

These APIs list ONTAP data protection relationships as viewed by the DFM database. The API is intentionally generic so that it represents all forms of data protection: SnapVault, Qtree SnapMirror and Volume SnapMirror. Future data protection protocols (e.g. LSM) will be added to this API as they are developed. Making this API generic shields client applications from some of the syntactic differences between protocols.

For the most part, the APIs are straightforward, outputting a blob of information for each relationship. However, three orthogonal concepts arise:

  • being managed by the Protection Manager,
  • being in a data set, and
  • being ignored.

SnapVault and SnapMirror have existed for years, and for years, the DFM Backup Manager and Disaster Recovery Manager have managed SnapVault and SnapMirror relationships. DFM is now implementing the Protection Manager, which provides unified SnapVault and SnapMirror management. The Protection Manager creates, deletes, updates and modifies relationships, but we expect mixed environments and do not want the Protection Manager to automatically modify existing SnapVault and SnapMirror relationships. Thus, relationships may be marked as is-dp-managed, meaning the Protection Manager has full authority to modify or delete the relationship as needed by the data sets and protection policies. Relationships not marked as is-dp-managed will not be modified, updated or deleted by the Protection Manager.

The Protection Manager organizes storage objects (OSSV directories, volumes and qtrees) into data sets, which consists of sets of storage objects linked by a protection policy (which is a tree structure). It is possible to create data sets using storage objects which have pre-existing protection relationships. If a relationship connects two storage objects in a way which matches the data set and policy configuration, that relationship is considered to be in the data set. Note that this only talks about topology and configuration. A relationship might match a data set yet not be managed by the Protection Manager. The API user can combine the is-dp-managed and is-in-dataset filter flags to find such relationships.

Finally, storage objects can be marked as is-dp-ignored by the Protection Manager. This allows a Protection Manager user to reduce UI clutter by marking certain objects as uninteresting. These objects still exist in the DFM database but do not show up in the Protection Manager UI. A relationship may be ignored and managed, not managed and not ignored, or any other combination.

NetApp Manage ONTAP
 
dp-relationship-list-info-iter-end [top]

Ends iteration to list data protection relationships.
Input Name Range Type Description
tag string
Tag from a previous dp-relationship-list-info-iter-start.
 Errno  Description
 EINVALIDTAG

 
dp-relationship-list-info-iter-next [top]
Get next few records in the iteration started by dp-relationship-list-info-iter-start.
Input Name Range Type Description
maximum integer
The maximum number of entries to retrieve. Range: [0..2^31-1]
tag string
Tag from a previous dp-relationship-list-info-iter-start.
 
Output Name Range Type Description
dp-relationships dp-relationship-info[]
List of SnapVault and SnapMirror relationships.
records integer
The number of records actually returned. Range: [0..2^31-1]
 Errno  Description
 EINVALIDTAG

 
dp-relationship-list-info-iter-start [top]
Starts iteration to list data protection relationships. These are SnapVault or SnapMirror relationships formed in order to implement data protection policy for a dataset. You can list relationships for a single policy connection or for a particular source or destination storage server.
Input Name Range Type Description
connection-id integer
optional
Identifier of policy connection. If present, only list relationships protecting this connection of the data protection policy. If specified, dataset-name-or-id must also be specified. Range: [1..2^31-1]
dataset-name-or-id obj-name-or-id
optional
Name or identifier of dataset. Relationships protecting any connection of this dataset are listed.
destination-id obj-id
optional
Identifier of the destination Qtree, Volume, Aggregate or Storage System. If not present, relationships to all destinations are listed.
destination-type relationship-endpoint-type
optional
If present, list only relationships where the destination is of the specified type. If not present, list all relationships.
include-deleted boolean
validate
optional
If present and true, relationships which are marked as deleted in the database are also returned. Otherwise, deleted relationships are not returned.
is-dp-ignored boolean
validate
optional
If present and true, only list relationships for which the source object has been marked as ignored for data protection. If present and false, only list relationships for which the source object has not been marked as ignored. If not present, list all relationships.
is-dp-managed boolean
validate
optional
If present and true, only list relationships which are to be managed by the Protection Manager. If present and false, only list relationships which are not to be managed by the Protection Manager. If not present, list all relationships.
is-in-dataset boolean
validate
optional
If present and true, only list relationships which are in a data set. If present and false, only list relationships for which are not in a data set. If not present, list all relationships.
operational-statuses operational-status[]
optional
If specified, the relationships in any of these statuses are only returned.
relationship-id obj-id
optional
Identifier of relationship to list. If unspecified, all relationships are listed.
relationship-states relationship-state[]
optional
If specified, the relationships in any of these states are only returned.
relationship-type relationship-type
optional
If present, list only relationships of specified type. If not present, list all relationships.
source-id obj-id
optional
Identifier of the source Qtree, OSSV Directory, Volume, Aggregate, Storage System, or OSSV host. If not present, relationships from all sources are listed.
source-or-destination-id obj-id
optional
Identifier of either a source or a destination object. If empty, all relationships are listed. The source or destination object must be either a Host, Aggregate, Volume, Qtree, OSSV Directory or DFM group.
source-type relationship-endpoint-type
optional
If present, list only relationships where the source is of the specified type. If not present, list all relationships.
 
Output Name Range Type Description
records integer
Number which tells you how many items have been saved for future retrieval with dp-relationship-list-info-iter-next. Range: [0..2^31-1]
tag string
Tag to be used in subsequent calls to dp-relationship-list-info-iter-next.
 Errno  Description
 EINVALIDINPUT
 EOBJECTNOTFOUND
 EDATABASEERROR

 
dp-relationship-modify [top]
Modify settings of a SnapVault, Qtree SnapMirror or Volume SnapMirror relationship.
Input Name Range Type Description
is-dp-managed boolean
optional
If present and true, set the is-dp-managed flag for this relationship. If present and false, clear the is-dp-managed flag for this relationship. If not present, is-dp-managed flag is not changed. If a relationship has the is-dp-managed flag set, the Protection Manager is allowed to modify the relationship as necessary to make the relationship conform to a data protection policy. This includes modifying any settings or schedules of the relationship, or deleting the relationship if no longer needed. The Protection Manager also has the responsibility of updating the relationship as necessary, either using its own schedules or setting an ONTAP schedule for this relationship.

If the is-dp-managed flag is clear, the Protection Manager will not modify, update, or delete this relationship.

relationship-id obj-id
Identifier of the relationships to be modified.
 Errno  Description
 EOBJECTNOTFOUND
 EAPIERROR
 EDATABASEERROR
 EINVALIDINPUT
 EACCESSDENIED

 
Element definition: dp-relationship-info [top]
Information about a single SnapVault or SnapMirror relationship. Currently, there are three kinds of relationships: SnapVault, Qtree SnapMirror (QSM) and Volume SnapMirror (VSM).
Name Range Type Description
dataset-id obj-id
optional
ID of the data set this relationship is protecting. Not present if this relationship is not protecting a component of a dataset.
dataset-name obj-name
optional
Name of the data set this relationship is protecting. Not present if this relationship is not a protecting a component of a data set.
destination-aggregate-id obj-id
optional
DFM object ID of destination aggregate. If the destination object is a qtree, this is the ID of the aggregate containing the volume that contains the qtree.
destination-full-name obj-full-name
Full name of storage object where this relationship ends.
destination-host-id obj-id
DFM object ID of destination host.
destination-host-name obj-full-name
Fully-qualified domain name of destination host.
destination-id obj-id
DFM Object ID of storage object where this relationship ends.
destination-name obj-name
Name of storage object where this relationship ends.
destination-storageset-id obj-id
optional
DFM object ID of the storage set for the destination for this relationship. This element is only valid for the query if connection-id was supplied.
destination-type relationship-endpoint-type
Type of the destination storage object. SnapVault and Qtree SnapMirror relationships always terminate at a Qtree. Volume SnapMirror relationships always terminate at a Volume.
destination-volume-id obj-id
optional
DFM object ID of destination volume. If the destination object is a qtree, this is the ID of the volume containing that qtree.
is-dp-ignored boolean
validate
True if the source object for this relationship is being ignored by the Protection Manager. See the discussion section for the meaning of "ignoring" objects.
is-dp-managed boolean
validate
True if this relationship is set to be managed by the Protection Manager. See the discussion section for the meaning of "being managed".
is-in-dataset boolean
validate
True if the source object for this relationship matches a dataset.

A relationship is considered to match a data set if:

  • the source object is a member of a storage set
  • the destination object is a member of a storage set
  • both storage sets are assigned to adjacent nodes of a single data set.

If the relationship does not match the above criteria, it is not considered part of a data set.

lag integer
Seconds since the completion of the last successful transfer to the destination. This value is undefined and will be returned as 0 for Unintialized relationshaps. Range: [0..2^31-1]
lag-status obj-status
Lag status of the relationship lag versus the DP policy lag threshold settings. Possible values are "unknown", "normal", "warning" and "error".
operational-status operational-status
Status of the relationship
relationship-id obj-id
Identifier of the relationship.
relationship-state relationship-state
State of the relationship
relationship-type relationship-type
Type of the relationship.
source-aggregate-id obj-id
optional
DFM object ID of source aggregate. Not present if the source object is an OSSV directory.
source-full-name obj-full-name
Full name of storage object where this relationship originates.
source-host-id obj-id
DFM object ID of source host.
source-host-name obj-full-name
Fully-qualified domain name of source host.
source-id obj-id
DFM object ID of storage object where this relationship originates.
source-name obj-name
Name of storage object where this relationship originates.
source-storageset-id obj-id
optional
DFM object ID of the storage set for the source for this relationship. This element is only valid for the query if connection-id was supplied.
source-type relationship-endpoint-type
Type of the source storage object. SnapVault relationships originate at either a Qtree or OSSV Directory. Qtree SnapMirror relationships originate at a Qtree. Volume SnapMirror relationships originate at a Volume.
source-volume-id obj-id
optional
DFM object ID of source volume. Not present if the source object is an OSSV directory.

 
Element definition: obj-id [top]
Identification number (ID) for a DFM object. This typedef is an alias for the builtin ZAPI type integer. Object IDs are unsigned integers in the range [1..2^31 - 1]. In some contexts, an object ID is also allowed to be 0, which is interpreted as a null value, e.g., a reference to no object at all.

The ID for a DFM object is always assigned by the system; the user is never allowed to assign an ID to an object. Therefore, an input element of type obj-id is always used to refer to an existing object by its ID. The ZAPI must specify the object's DFM object type (e.g. data set, host, DP policy, etc.). Some ZAPIs allow the object to be one of several different types.

If the value of an obj-id input element does not match the ID of any existing DFM object of the specified type or types, then typically the ZAPI fails with error code EOBJECTNOTFOUND. A ZAPI may deviate from this general rule, for example, it may return a more specific error code. In either case, the ZAPI specification must document its behavior.

[none]

 
Element definition: obj-name-or-id [top]
Name or internal ID of a DFM object. This typedef is an alias for the builtin ZAPI type string. An obj-name-or-id must contain between 1 and 64 characters, and must conform to one of the following formats:
  • It must have the format of an obj-name, or
  • It must be the decimal numeric string form of a positive integer whose value is in the range [1..2^31 - 1].
Elements of type obj-name-or-id are used only as inputs to ZAPIs. The value must match either the name or internal ID of an existing DFM object. The ZAPI must specify the object's DFM object type (e.g. data set, host, DP policy, etc.). Some ZAPIs allow the object to be one of several different types.

If the format of an obj-name-or-id input element does not conform, or the value does not match the name or ID of an existing object, then generally the ZAPI documents that it fails with error code EOBJECTNOTFOUND. A ZAPI may return more specific error codes. In such cases, the ZAPI specification must document its behavior.

If a ZAPI can accept a null value (e.g. reference to no object at all) for such an element, then the element is declared optional, and the absence of the input element represents a null value.

[none]

 
Element definition: operational-status [top]
Status of the relationship. Possible values are "idle", "transferring", "pending", "aborting", "migrating", "quiescing", "resyncing", "waiting", "syncing", "in_sync" or "paused".
  • idle: No data is being transferred.
  • transferring: Transfer has been initiated, but has not yet finished, or is just finishing.
  • pending: The secondary storage system cannot be updated because of a resource issue; the transfer is retried automatically.
  • aborting: A transfer is being aborted and cleaned up.
  • migrating: Valid only in case of 'qtree_snapmirror' or 'volume_snapmirror' relationships.
  • quiescing: The specified volume or qtree is waiting for all existing transfers to complete. The destination is being brought into a stable state.
  • resyncing: The specified volume or qtree is being matched with data in the common Snapshot copy.
  • waiting: Valid only in case of 'qtree_snapmirror' or 'volume_snapmirror' relationships. SnapMirror is waiting for a new tape to be put in the tape device.
  • syncing: Valid only in case of 'qtree_snapmirror' or 'volume_snapmirror' relationships.
  • in_sync: Valid only in case of 'qtree_snapmirror' or 'volume_snapmirror' relationships.
  • paused: Valid only in case of 'qtree_snapmirror' or 'volume_snapmirror' relationships.
[none]

 
Element definition: relationship-endpoint-type [top]
Type of an object at either the source or destination of a data protection relationship. Values for source objects are "ossv_directory", "volume" or "qtree". Values for destination objects are "volume" or "qtree".
[none]

 
Element definition: relationship-state [top]
State of the relationship. Possible values are "uninitialized", "snapvaulted", "snapmirrored", "broken_off", "quiesced", "source", "unknown" or "restoring"
  • uninitialized: The destination storage volume or qtree is not yet initialized or is being initialized.
  • snapvaulted: Valid only in case of 'snapvault' relationships. The relationship is created and the qtree is a SnapVault secondary destination.
  • snapmirrored: Valid only in case of 'qtree_snapmirror' or 'volume_snapmirror' relationships. The destination volume or qtree is in a SnapMirror relationship.
  • broken_off: Valid only in case of 'qtree_snapmirror' or 'volume_snapmirror' relationships. The destination was in a SnapMirror relationship, but a snapmirror break command made the volume or qtree writable. This state is reported as long as the base Snapshot copy is still present in the volume. If the Snapshot copy is deleted, the state is listed as "uninitialized" if the destination is in the /etc/snapmirror.conf filen then the Snapshot copy is no longer listed. A successful snapmirror resync command restores the snapmirrored status.
  • quiesced: Valid only in case of 'qtree_snapmirror' or 'volume_snapmirror' relationships. SnapMirror is in a consistent internal state and no SnapMirror activity is occurring. In this state, you can create Snapshot copies with confidence that all destinations are consistent. The snapmirror quiesce command brings the destination into this state. The snapmirror resume command restarts all SnapMirror activities.
  • source: This state is reported when the snapvault status or snapmirror status command is run on the primary storage system. When the destination is on another system, its status is unknown, so the source status is reported. In case of 'snapvault' relationships, it also appears if snapvault status is run on secondary storage systems after the snapvault restore command was run on an associated primary storage system.
  • unknown: The destination volume or the volume that contains the destination qtree is in an unknown state. It might be offline or restricted
  • restoring: Valid only in case of 'snapvault' relationships.
[none]

 
Element definition: relationship-type [top]
Type of a data protection relationship. Legal values are "snapvault", "qtree_snapmirror" and "volume_snapmirror".
[none]

 
Element definition: obj-full-name [top]
Full name of a DFM object. This typedef is an alias for the builtin ZAPI type string. An object full name conforms to all the rules of an obj-name, except that the full name may be up to 255 characters long.

DFM creates full names by concatenating an object name with any parent object names, so as to create a unique name for an object. The format of full names is as follows:

  • Host full names are the either the fully-qualified domain name or the IP address in dotted-decimal format of the host.
  • Aggregate full names are the host name and the aggregate name, separated by a colon, e.g. hostname:aggr0.
  • Volume full names are the host name and the volume name, separated by ":/", e.g. hostname:/volume. Note this does not include "/vol". Volume and aggregate full names are distinguished by the presence of a forward slash after the colon.
  • Qtree full names are the containing volume full name and the qtree name, separated by a slash, e.g. hostname:/volume/qtree. The data not contained by any qtree may be represented by "-", e.g. hostname:/volume/-.
  • Lun Path full names are either a volume or qtree full name and the LUN path, separated by a slash, e.g. hostname:/volume/LUN or hostname:/volume/qtree/LUN.
  • Network full names are a network address block in CIDR format, e.g. 1.2.3.0/8.
  • OSSV Directory full names are the OSSV host name and the OSSV path, separated by a colon, e.g. host-lnx:/usr/local or host-w2k:c:/temp
  • Include any others here...
  • Initiator Group full names are host name and the initiator group name, separated by a colon, e.g. hostname:igroup.

For any DFM object not listed above, the obj-name and obj-full-name are identical.

[none]

 
Element definition: obj-name [top]
Name of a DFM object. This typedef is an alias for the builtin ZAPI type string. An object name must conform to the following format:
  • It must contain between 1 and 64 characters.
  • It may start with any character and may contain any combination of characters, except that it may not consist solely of decimal digits ('0' through '9').
  • In some contexts, a name may be the empty string (""), which is interpreted as a null value, e.g., a reference to no object at all.
The behavior of a ZAPI when it encounters an error involving an obj-name input element depends on how the ZAPI uses the input element. Here are the general rules:
  • If the input name element is used to create a new object with the given name, or rename an existing object to that name, and the name does not conform to the above format, then the ZAPI fails with error code EINVALIDINPUTERROR. Note that because EINVALIDINPUTERROR is such a common error code, ZAPI specifications are not required to document cases when they may return it.
  • If the input name element is used to refer to an existing object with that name, and there is no object with that name, then the ZAPI fails with error code EOBJECTNOTFOUND. Generally the ZAPI specification documents cases when it may return this error code.
A ZAPI may deviate from these general rules, for example, it may return more specific error codes. In such cases, the ZAPI specification must document its behavior.

If an input name element is used to refer to an existing object, then the ZAPI specification must specify which DFM object type (e.g. data set, host, DP policy, etc.) is allowed. Some ZAPIs allow the object to be one of several different types. See the description of obj-full-name for examples of valid input formats.

Note that there is no requirement that all object names must be unique. However, the names for some specific types of objects are constrained such that no two objects of that type may have the same name. For example, this constraint applies to data sets, DP schedules, and DP policies. This means that no two data sets may have the same name, but a data set may have the same name as a DP schedule or DP policy.

In general, object names are compared in a case-insensitive manner. This means that, for example, "MyObject" and "MYOBJECT" are considered to be the same name for purposes of: creating new objects, renaming existing objects, or looking up an object by name. On the other hand, ZAPIs that return an obj-name generally do not change the capitalization at all. For example, if an object's name has been set to "MyObject", then list iteration ZAPIs that return the object's name return it as "MyObject" rather than "MYOBJECT" or "myobject".

ZAPIs that operate on obj-name values and do not follow these general rules about case sensitivity must document the rules that they do follow.

One important exception to these general rules is that volumes, qtrees, OSSV directories, SRM paths, interfaces, FCP targets and FC switch ports all have case-sensitive names. When looking up objects of these types by name, the case must match the object name.

[none]

 
Element definition: obj-status [top]
A status value which can be associated with a DFM object. This typedef is an alias for the builtin ZAPI type string. The severity associated with an event has this type.

Possible values are: 'unknown', 'normal', 'information', 'unmanaged' 'warning', 'error', 'critical', 'emergency'.

  • unknown: An object has an unknown status when it transitions from one state to another. Ideally, an object will have this status briefly. For example, when an object has been added, but not yet discovered.
  • normal: An object has normal status when it is working within the thresholds specified in DFM.
  • information: The information events are normal occurrences on an object for which you can define alarms.
  • unmanaged: An object is considered to be unmanaged when the login and password are not set for the appliance or agent.
  • warning: An object has the warning status when an event related to the object occurred that an administrator should know about. The event will not cause service disruption.
  • error: An object has error status when it does not cause any service disruption, but it may affect performance.
  • critical: An object has critical status when it is still performing, but service disruption may occur if corrective action is not taken immediately.
  • emergency: An object is in emergency status when it stops performing unexpectedly and could lose data.
In some contexts, it is important that severities are ordered (as above). For example, an alarm might be triggered if an event with a given severity "or worse" occurs. In this example, worse means "after" in the list above.
[none]