Table of ContentsView in Frames

Syntax for snapmirror.conf file entries

You need to use the correct syntax for each entry in the snapmirror.conf file, to specify the source, the destination, the options, and the schedule for a SnapMirror relationship.

The syntax for entries in the snapmirror.conf file is as follows.src_system:/vol/src_vol[/src_qtree] dest_system:/vol/dest_vol[/dest_qtree] arguments schedule
The parameters in the entries are as follows:
Parameter Description
src_system The name of the system from which you are copying data. SnapMirror uses the /etc/hosts file or the database used by DNS and NIS for name resolution. When SnapMirror searches for the source system name, it should find the IP address for the source system on the network over which you want the transfer to occur.

Example: Suppose you created a private network for connecting source and destination systems, and you name the interface on the source as systemA-e0. You must enter the interface name systemA-e0 in the src_system field.

src_vol/src_qtree The name of the volume or qtree that you are copying. Use only the volume name for volumes. Use the full path name for qtrees.

Example: If the name of the volume is vol1, enter vol1 in the src_vol/src_qtree field. If the name of the qtree is qtree3, and it is contained in the volume vol3, enter the full path, /vol/vol3/qtree3, in the src_vol/src_qtree field.

dest_system The host name of the system to which the data is copied. The name you use must be the exact host name of the destination system.
Note: The dest_system field is case-sensitive.

You can use the hostname command on the destination system to determine what you can enter in this field.

Example: If the name of the destination system is systemA, enter systemA in the dest_system field.

- Using a hyphen (-) specifies the use of default parameters.
dest_vol [/dest_qtree] The name of the destination volume or qtree to which you are copying data. Use only the volume name for volumes. Use the full path name for qtrees.

Example: If the name of the volume is vol1, enter vol1 in the dest_vol[/dest_qtree] field. If the name of the qtree is qtree4, and it is in vol2, enter the full path, /vol/vol2/qtree4, in the dest_vol[/dest_qtree] field.

kbs=kbs Maximum transfer speed, in kilobytes per second, that Data ONTAP can use to transfer data.

The kbs and restart arguments are expressed as a comma-separated list of name=value pairs, with no spaces. For example:kbs=2000,restart=always

restart={ never | always } SnapMirror uses the restart mode to continue an incremental transfer from a checkpoint, if it is interrupted. The options are:
  • never—Restarts the transfer from the beginning and never from the point of interruption. This mode is useful if you must have the latest data on the destination.
  • always—Restarts the transfer, if possible, from the point of interruption. This mode is useful for copying large volumes.

If no option is specified for the restart mode, then the system assigns it the default option, which is set to always.

The transfer always restarts from the point of interruption unless it conflicts with a scheduled transfer, which is configured in the snapmirror.conf file. In case of a conflict, the transfer restarts from the beginning.

cksum= { none | crc32c | crc32c_header_only } Selects the checksum algorithm that is used to check the data replicated by SnapMirror.

none specifies that SnapMirror does not perform a checksum for the data. This option assumes that the network used by SnapMirror is reliable and delivers the data packets from the source to the destination without errors.

crc32c specifies that the data being transferred by SnapMirror is checked by an application-level 32-bit cyclic redundancy check. This check ensures that any transmission errors not corrected at the network level are detected by SnapMirror. However, using this option adds to the processing load of both the source and destination systems.

crc32c_header_only specifies that only the headers of the SnapMirror data packets are checked by the cyclic redundancy check. This check enhances the reliability of volume SnapMirror, with negligible performance impact. This option can be used only with asynchronous volume SnapMirror.

Note: If the source of the SnapMirror relation is specified through the snapmirror.conf file, the default value of this parameter will be none. If the source is specified through the command line interface, the default value will be crc32.
visibility_interval={xs | xm | xh} Determines the amount of time before an automatic Snapshot copy is created on the source volume that is being replicated using synchronous or semi-synchronous SnapMirror. When replicating synchronously or semi-synchronously, using SnapMirror, changes to the source volume do not show immediately on the destination volume, even though the changes have been replicated. The changes are shown only after the source system takes an automatic Snapshot copy of the source volume. This event occurs every three minutes by default. You can change the interval for automatic Snapshot copies, but performance can degrade if you set smaller intervals because Snapshot copies are taken more often. The smallest interval you can set is 30 seconds.
Note: The s, m, and h suffixes specify seconds, minutes, and hours, respectively.
wsize=size Determines the TCP window size used by the SnapMirror relationship.
Note: The TCP window size is specified in bytes.
connection_mode={inet6 | inet | unspec} Specifies whether the relationship uses an IPv6 or IPv4 connection.
  • unspec is the default value of the connection_mode option. An IPv6 connection is attempted first. If an IPv6 connection is not established, then an IPv4 connection is attempted.
  • inet6 specifies the use of an IPv6 connection.
  • inet specifies the use of an IPv4 connection.
schedule specifies the time and frequency of the SnapMirror updates on the destination. Specifying the schedule is mandatory.
schedule consists of four space-separated fields in the following order:minute hour dayofmonth dayofweek
  • minute can be a value from 0 to 59.
  • hour can be a value from 0 to 23.
  • dayofmonth can be a value from 1 to 31.
  • dayofweek can be a value from 0 (Sunday) to 6 (Saturday).

Multiple values, separated by commas, can be entered for any field.

All possible values for a field can be applied with an asterisk (*). If you specify an asterisk in each field of the schedule, SnapMirror updates the destination every minute.

A single dash (-) in any field means “never” and prevents this schedule entry from executing. (This option is useful if you want the server to appear in the /etc/snapmirror.conf file so that snapmirror update can find it, but you do not want the SnapMirror scheduler to run automatically.)

A range of values for any field can be indicated with a low value and a high value separated by a dash. For example, you can indicate that you want an update every hour from 8:00 a.m. to 5:00 p.m. by entering this value in the hour field:

8-17

A range of values followed by a slash and a number indicates the frequency of the update. For example, you can indicate that you want an update every five minutes by entering this value in the minute field:

0-59/5

Using sync or semi-sync instead of the four space-separated fields specifies synchronous or semi-synchronous replication, respectively. For more information, see the na_snapmirror.conf(5) man page.

Example of snapmirror.conf file schedule entries

Suppose you create a private network between systemA and systemB. In the /etc/hosts file on systemA, you specify the host name for the interface as systemA-e0, and you ensure that systemA-e0 is also in the /etc/hosts file on systemB, the destination system. You want to copy vol0 of systemA to vol1 of systemB over the private network every Monday, Wednesday, and Friday at 11 p.m. You also want to use the default for the arguments field.

To copy the data over the private network every Monday, Wednesday, and Friday at 11 p.m., you would enter the following in the /etc/snapmirror.conf file.systemA-e0:vol0 systemB:vol1 - 0 23 * 1,3,5

The following table indicates what the entry in each field in the example means.

Entry Description
systemA-e0 Name of the source system, along with the interface to be used
vol0 Source volume
systemB Name of the destination system
vol1 Destination volume
- Use default values for arguments
0 Starts a SnapMirror update at the 0th minute of the hour(s), as specified in the next (hour) field
23 Starts a SnapMirror update at 11p.m.
* Starts a SnapMirror update on all applicable days of the month, as specified in the next field
1,3,5 Starts a SnapMirror update on Monday, Wednesday, and Friday

Example of a snapmirror.conf file entry with an IPv6 address

The following snapmirror.conf file entry shows the use of an IPv6 address to specify the source system for a given SnapMirror relationship. Note that the IPv6 address is enclosed within square brackets.[fd20:8b1e:b255:4166:2a0:98ff:fe07:23f3]:src_vol dst_system:dst_vol - 15 2 * *

Example of a snapmirror.conf file entry with space character and double quotes in qtree name

The following snapmirror.conf file entry shows how qtree names with space character and double quotes must be specified. This entry indicates that data from the qtree vol/vol1/x y"z on systemA is replicated to the qtree vol/vol2/x y"z on systemB."systemA:/vol/vol1/x y""z" "systemB:/vol/vol2/x y""z" - * * * *
Note: Qtree names with space character or double quotes might not work with previous versions of Data ONTAP. Therefore, when reverting to a previous version of Data ONTAP, you must check for compatibility.

Example setting maximum update speed

The following line in an /etc/snapmirror.conf file sets the speed to 2000 kilobytes per second.systemA:vol0 systemA:vol1 kbs=2000 15 * * 1,2,3,4,5
Note: The specified transfer speed might not be achievable because transfer speed is limited by factors such as network bandwidth.

Example specifying always restart

The following line in an /etc/snapmirror.conf file sets the restart value to always.systemA:vol0 systemA:vol1 kbs=2000,restart=always 15 * * 1,2,3,4,5

Example specifying default values for maximum speed and restart

If you set the value of only one argument (kbs or restart), the other argument uses the default value. If you want to use the default argument for both values, enter a dash (-).

The following line in an /etc/snapmirror.conf file sets both arguments to the default value.systemA:vol0 systemA:vol1 - 15 * * 1,2,3,4,5

Example specifying 15-minute interval updates during specific hours

If you want to schedule an update every afternoon at 1:00, 1:15, 1:30, 1:45, 5:00, 5:15, 5:30, 5:45, 7:00, 7:15, 7:30, and 7:45, you should enter the following in the schedule field.systemA:vol0 systemA:vol1 - 0,15,30,45 13,17,19 * *
Note: An update is started when the current time matches a value in all four fields. Be careful that a value in the day of the month field does not exclude a value in the day of the week field. For example, the following schedule updates the destination every afternoon at 1:00, 1:30, 3:00, 3:30, 5:00, and 5:30, but only when the first day of the month falls on a Monday.systemA:vol0 systemA:vol1 - 0,30 13,15,17 1 1
Note: The schedule represents the goal of the SnapMirror feature. Factors that might prevent SnapMirror from updating every minute include resource limitations or network connectivity. If an update is in progress when another is scheduled to occur, SnapMirror will start another transfer as soon as the first transfer is complete. However, if more than one update gets queued while a transfer is in progress, SnapMirror only performs the update queued last. The other updates become obsolete due to the later update.