Skip to main content

snapmirror initialize

Contributors
Suggest changes

Start a baseline transfer

Availability: This command is available to cluster and Vserver administrators at the admin privilege level.

Description

The snapmirror initialize command initializes the destination Vserver, volume, Application Consistency Group or a non-ONTAP endpoint of a SnapMirror relationship. The command behaves differently between data protection (DP), extended data protection (XDP) and load-sharing (LS) relationships.

If you specify a sync-mirror or strict-sync-mirror type policy, the snapmirror initialize command creates and initializes a synchronous relationship and brings it InSync, providing zero RPO data protection.

If you are initializing a relationship with a policy of type automated-failover the snapmirror initialize command initializes a SnapMirror active sync relationship and brings the status to InSync, providing zero RPO and zero RTO data protection.

If you are initializing a relationship with a policy of type automated-failover-duplex the snapmirror initialize command initializes a SnapMirror active sync relationship and brings the status to InSync, providing zero RPO, zero RTO data protection and load balanced solution.

SnapMirror active sync is only supported for SAN. As a result, NAS access is not supported on SnapMirror active sync volumes and SnapMirror active sync initialization is not supported on volumes with NAS access.

For data protection (DP) and extended data protection (XDP) relationships, the snapmirror initialize command initializes the destination volume.

For load-sharing (LS) relationships, the snapmirror initialize command initializes a new load-sharing mirror in an existing set of load-sharing mirrors. If the command finishes before the start of a scheduled or manual transfer of the set of load-sharing mirrors, the load-sharing mirror is up to date with the set of load-sharing mirrors; otherwise, the load-sharing mirror will be brought up to date at the next scheduled or manual transfer of the set of load-sharing mirrors.

The initial transfer to an empty destination volume is called a baseline transfer. During a baseline transfer for a data protection (DP) or extended data protection (XDP) relationship, the snapmirror initialize command takes a snapshot on the source volume to capture the current image of the source volume. For data protection relationships, the snapmirror initialize command transfers all of the snapshots up to and including the snapshot created by it from the source volume to the destination volume. For extended data protection (XDP) relationships, the snapmirror initialize command behavior depends on the snapmirror policy associated with the relationship. If the policy type is async-mirror then depending on the rules in the policy it can transfer either all the snapshots up to and including the snapshot created by it or only the snapshot created by it from the source volume to the destination volume. For extended data protection (XDP) relationships with policy type vault or mirror-vault the snapmirror initialize transfers only the snapshot created by it.

After the snapmirror initialize command successfully completes, the last snapshot transferred is made the exported snapshot on the destination volume.

You can use the snapmirror initialize command to initialize a specific load-sharing mirror that is new to the set of load-sharing mirrors. An initialize of the new load-sharing mirror should bring it up to date with the other up-to-date destination volumes in the set of load-sharing mirrors.

Note Using the snapmirror initialize command to initialize a set of load-sharing mirrors will not work. Use the snapmirror initialize-ls-set command to initialize a set of load-sharing mirrors.

If a SnapMirror relationship does not already exist, that is, the relationship was not created using the snapmirror create command, the snapmirror initialize command will implicitly create the SnapMirror relationship, with the same behaviors as described for the snapmirror create command before initializing the relationship. This implicit create feature is not supported for Vservers.

This command is supported for SnapMirror relationships with the field "Relationship Capability" showing as either "8.2 and above" or "Pre 8.2" in the output of the snapmirror show command.

For relationships with "Relationship Capability" of "8.2 and above" , you can track the progress of the operation using the snapmirror show command.

For relationships with "Relationship Capability" of "Pre 8.2" , a job will be spawned to operate on the SnapMirror relationship, and the job id will be shown in the command output. The progress of the job can be tracked using the job show and job history show commands.

The snapmirror initialize command must be used from the destination Vserver or cluster.

Parameters

{ [-S, -source-path {<[vserver:][volume]>|<[[cluster:]//vserver/]volume>|<hostip:/lun/name>|<hostip:/share/share-name>|<[vserver:]/cg/[app-cgname]>}] - Source Path

This parameter specifies the source endpoint of the SnapMirror relationship in one of four path formats. The normal format includes the names of the Vserver (vserver) and/or volume (volume). To support relationships with "Relationship Capability" of "Pre 8.2" , a format which also includes the name of the cluster (cluster) is provided. The "Pre 8.2" format cannot be used when operating in a Vserver context on relationships with "Relationship Capability" of "8.2 and above" . For SnapMirror relationships with an AltaVault source, the source endpoint is specified in the form hostip:/share/share-name . For SnapMirror relationships with a SolidFire source, the source endpoint is specified in the form hostip:/lun/name .

| [-source-cluster <Cluster name>] - Source Cluster

Specifies the source cluster of the SnapMirror relationship. If this parameter is specified, the -source-vserver and -source-volume parameters must also be specified. This parameter is only applicable for relationships with "Relationship Capability" of "Pre 8.2" . This parameter cannot be specified when operating in a Vserver context on relationships with "Relationship Capability" of "8.2 and above" .

[-source-vserver <vserver name>] - Source Vserver

Specifies the source Vserver of the SnapMirror relationship. For relationships with volumes as endpoints, if this parameter is specified, parameters -source-volume and for relationships with "Relationship Capability" of "Pre 8.2" , -source-cluster must also be specified. This parameter is not supported for relationships with non-ONTAP source endpoints.

[-source-volume <volume name>] - Source Volume }

Specifies the source volume of the SnapMirror relationship. If this parameter is specified, parameters -source-vserver and for relationships with "Relationship Capability" of "Pre 8.2" , -source-cluster must also be specified. This parameter is not supported for relationships with non-ONTAP source endpoints.

{ -destination-path {<[vserver:][volume]>|<[[cluster:]//vserver/]volume>|<hostip:/lun/name>|<hostip:/share/share-name>|<[vserver:]/cg/[app-cgname]>} - Destination Path

This parameter specifies the destination endpoint of the SnapMirror relationship in one of four path formats. The normal format includes the names of the Vserver (vserver) and/or volume (volume). To support relationships with "Relationship Capability" of "Pre 8.2" , a format which also includes the name of the cluster (cluster) is provided. The "Pre 8.2" format cannot be used when operating in a Vserver context on relationships with "Relationship Capability" of "8.2 and above" . For SnapMirror relationships with an AltaVault destinations, the destination endpoint is specified in the form hostip:/share/share-name . For SnapMirror relationships with a SolidFire destinations, the destination endpoint is specified in the form hostip:/lun/name .

| [-destination-cluster <Cluster name>] - Destination Cluster

Specifies the destination cluster of the SnapMirror relationship. If this parameter is specified, parameters -destination-vserver and -destination-volume must also be specified. This parameter is only applicable for relationships with "Relationship Capability" of "Pre 8.2" . This parameter cannot be specified when operating in a Vserver context on relationships with "Relationship Capability" of "8.2 and above" .

-destination-vserver <vserver name> - Destination Vserver

Specifies the destination Vserver of the SnapMirror relationship. For relationships with volumes as endpoints, if this parameter is specified, parameters -destination-volume and for relationships with "Relationship Capability" of "Pre 8.2" , -destination-cluster must also be specified. This parameter is not supported for relationships with non-ONTAP destination endpoints.

-destination-volume <volume name> - Destination Volume }

Specifies the destination volume of the SnapMirror relationship. If this parameter is specified, parameters -destination-vserver and for relationships with "Relationship Capability" of "Pre 8.2" , -destination-cluster must also be specified. This parameter is not supported for relationships with non-ONTAP destination endpoints.

[-s, -source-snapshot <text>] - Source Snapshot

This optional parameter specifies the snapshot that snapmirror initialize will use for the baseline transfer. For data protection (DP) relationships, the baseline transfer will include all of the snapshots up to and including the specified snapshot. For extended data protection (XDP) relationships, the snapmirror initialize command behavior depends on the snapmirror policy associated with the relationship. If the policy type is async-mirror then depending on the rules in the policy it can transfer either all the snapshots up to and including the specified snapshot or only the specified snapshot from the source volume to the destination volume. For extended data protection (XDP) relationships with policy type vault or mirror-vault the snapmirror initialize transfers only the specified snapshot. This parameter is not supported for SnapMirror Synchronous relationships and relationships with "Relationship Capability" of "Pre 8.2" .

[-type <snapmirrorType>] - Snapmirror Relationship Type

Specifies the type of SnapMirror relationship if a relationship is implicitly created. This parameter is the same as the one used in the snapmirror create command.

[-policy <sm_policy>] - SnapMirror Policy

This optional parameter designates the name of the SnapMirror policy which is associated with the SnapMirror relationship. If you do not designate a policy, the current policy will be retained. This parameter is not applicable to relationships with "Relationship Capability" of "Pre 8.2" .

Note You define and name a policy using the snapmirror policy create command.
[-k, -throttle <throttleType>] - Throttle (KB/sec)

This optional parameter limits the network bandwidth used for the initialize transfer. It sets the maximum rate (in Kbytes/sec) at which data can be transferred during the operation. If this parameter is not specified, the throttle value configured for the relationship with the snapmirror create or snapmirror modify command will be used. To fully use the network bandwidth available, set the throttle value to unlimited or 0 . The minimum throttle value is four Kbytes/sec, so if you specify a throttle value between 1 and 4 , it will be treated as if you specified 4 . For FlexGroup relationships, the throttle value is applied individually to each constituent relationship. For SnapMirror Synchronous relationships the throttle value is applicable only for asynchronous transfers performed as part of user-initiated operations. The -throttle parameter does not affect load-sharing transfers and transfers for other relationships with "Relationship Capability" of "Pre 8.2" confined to a single cluster.

[-transfer-priority {low|normal}] - Transfer Priority

This optional parameter specifies the priority at which the transfer runs. The default value for this parameter is the value in the SnapMirror policy associated with this relationship. This parameter is not applicable to relationships with a "Relationship Capability" of "Pre 8.2" .

[-cg-item-mappings {<source volume>:@<destination volume>|<source item path>:@<destination item path>}] - Consistency Group Item Mappings

This optional parameter specifies a list of the consistency group (CG) item mappings. It is considered only if the supplied source and destination path values denote valid CG paths. For CG level relationships, this parameter must be specified. The value for this parameter must contain mappings of one or more pairs of constituent source and destination volumes of the form srcvol1:@dstvol1,…​ .

[-is-auto-expand-enabled {true|false}] - Is Auto Expand Enabled

This optional parameter specifies whether or not a FlexGroup SnapMirror relationship and its destination FlexGroup should be auto-expanded if the source FlexGroup is expanded. This parameter is supported only for FlexGroup SnapMirror relationships. If this initialize is creating a new SnapMirror relationship, the default value is true. If it is not creating a new relationship, if a value is specified, it must match the current value for the existing relationship. If the parameter is not specified the existing value will be retained.

[-backoff-level {high|medium|none}] - SM Backoff Level due to Client Ops

This optional parameter specifies the SnapMirror backoff level due to client ops. This parameter is supported only for FlexVol SnapMirror relationships. The default value is high .

[-w, -foreground <true>] - Foreground Process

This specifies whether the operation runs as a foreground process. If this parameter is specified, the default setting is true (the operation runs in the foreground). When set to true , the command will not return until the process completes. This parameter is only applicable to relationships with "Relationship Capability" of "Pre 8.2" .

Examples

To start the initial transfer for the SnapMirror relationship with the destination endpoint vs2.example.com:dept_eng_dp_mirror2 after the relationship has been created with the snapmirror create command, type the following command:

vs2.example.com::> snapmirror initialize -destination-path
       vs2.example.com:dept_eng_dp_mirror2

For relationships with "Relationship Capability" of "Pre 8.2" , to start the initial transfer for the SnapMirror relationship with the destination endpoint cluster2://vs2.example.com/dept_eng_dp_mirror2 after the relationship has been created with the snapmirror create command, type the following command:

cluster2::> snapmirror initialize -destination-path
         cluster2://vs2.example.com/dept_eng_dp_mirror2

To create a data protection mirror relationship between the source endpoint vs1.example.com:dept_mkt , and the destination endpoint vs2.example.com:dep_mkt_dp_mirror , and start the initial transfer, type the following command:

vs2.example.com::> snapmirror initialize -destination-path
         vs.example.com2:dept_mkt_dp_mirror
         -source-path vs1.example.com:dept_mkt

To create a data protection mirror relationship between the source endpoint cluster1://vs1.example.com/dept_mkt , and the destination endpoint cluster2://vs2.example.com/dep_mkt_dp_mirror , and start the initial transfer when the source cluster is running ONTAP 8.1 software, type the following command:

cluster2::> snapmirror initialize -destination-path
         cluster2://vs2.example.com/dept_mkt_dp_mirror
         -source-path cluster1://vs1.example.com/dept_mkt

To create an extended data protection (XDP) relationship between the ONTAP source endpoint vs1.example.com:data_ontap_vol , and the AltaVault destination endpoint 10.0.0.11:/share/share1 , and start the initial transfer, type the following command:

vs1.example.com::> snapmirror initialize -destination-path
  10.0.0.11:/share/share1
  -source-path vs1.example.com:data_ontap_vol -type XDP

To start the initial transfer for the Vserver SnapMirror relationship with destination endpoint dvs1.example.com: after the relationship was created with the snapmirror create command, type the following command:

cluster2::> snapmirror initialize -destination-path
         dvs1.example.com:

To initialize the SnapMirror Synchronous relationship between FlexVol volumes vol_log and vol_log_sync_dp and bring it to InSync, after it is created using the snapmirror create command, type the following command:

vs2.example.com::> snapmirror initialize -destination-path
         vs2.example.com:vol_log_sync_dp

To create a strict SnapMirror Synchronous relationship between FlexVol volumes vol_log and vol_log_sync_dp , to initialize it and bring it to InSync, type the following command:

vs2.example.com::> snapmirror initialize -destination-path
         vs2.example.com:vol_log_sync_dp -source-path
         vs1.example.com:vol_log -policy StrictSync

To create and initialize an SnapMirror active sync relationship with the following attributes:

  • It is between the source Consistency Group cg_src in Vserver vs1.example.com , and the destination Consistency Group cg_dst in Vserver vs2.example.com .

  • It has item mappings between volumes srcvol1 and srcvol2 and volumes dstvol1 and dstvol2 .

  • It uses the policy named AutomatedFailOver that has a policy type of automated-failover .

Type the following command from the destination cluster:

destination::> snapmirror initialize -destination-path
        vs2.example.com:/cg/cg_dst -source-path
  vs1.example.com:/cg/cg_src
  -policy AutomatedFailOver
        -cg-item-mappings srcvol1:@dstvol1,srcvol2:@dstvol2

To initialize the previously created SnapMirror active sync relationship, type the following command from the destination cluster:

destination::> snapmirror initialize -destination-path
        vs2.example.com:/cg/cg_dst

To create and initialize an Application Consistency Group relationship with the following attributes:

  • It is between the source Application Consistency Group app_cg_src in Vserver vs1.example.com , and the destination Application Consistency Group app_cg_dst in Vserver vs2.example.com . It has item mappings between volumes srcvol1 and dstvol2 and volumes srcvol2 and dstvol2 . It uses the default policy named MirrorAndVault that has a policy type of mirror-vault .

Type the following command from the destination cluster:

destination::> snapmirror initialize -destination-path
        vs2.example.com:/cg/app_cg_dst -source-path
        vs1.example.com:/cg/app_cg_src
        -cg-item-mappings srcvol1:@dstvol1,srcvol2:@dstvol2

To initialize the previously created Application Consistency Group relationship, type the following command from the destination cluster:

destination::> snapmirror initialize -destination-path
        vs2.example.com:/cg/app_cg_dst