NetApp SnapMirror Setup, Commands, and Scheduling

Classified in Computers

Written on in English with a size of 2.88 KB

SnapMirror (SM)

SnapMirror (SM) requires a license. It operates at the volume or qtree level, is used for disaster recovery (DR) and replication, and requires both a source and destination filer.

Synchronous SnapMirror

Synchronous SM replicates from the source to the destination nearly at the same time data is written to the source (saved to NVRAM).

Command Notes

All SnapMirror commands must be run on the destination filer, except snapmirror status, which can be run on either the source or destination.

Configuration Steps

  1. Enable SM on source & destination filer

    source-filer> options snapmirror.enable
    snapmirror.enable            on
    source-filer> options snapmirror.access
    snapmirror.access            legacy
    
  2. SnapMirror access

    Ensure the destination filer has SnapMirror access to the source filer by listing /etc/snapmirror.allow on the source:

    source-filer> rdfile /etc/snapmirror.allow
    destination-filer
    destination-filer2
    
  3. Initializing a SnapMirror relation

    destination-filer> vol create demo_destination aggr01 100g
    destination-filer> vol restrict demo_destination
    

    Examples of initializing:

    destination-filer> snapmirror initialize -s source-filer:demo_source destination-filer:demo_destination
    
    destination-filer> snapmirror initialize -s source-filer:/vol/demo1/qtree destination-filer:/vol/demo1/
    
  4. Monitoring the status

    destination-filer> snapmirror status
    snapmirror is on.
    source                         destination                         state          lag status
    source-filer:demo_source       destination-filer:demo_destination   uninitialized  -   transferring (1690 mb done)
    source-filer:/vol/demo1/qtree  destination-filer:/vol/demo1/qtree  uninitialized  -   transferring (32 mb done)
    
  5. SnapMirror schedule

    You can set a synchronous SnapMirror schedule in /etc/snapmirror.conf by adding 'sync' instead of a cron-style frequency.

    destination-filer> rdfile /etc/snapmirror.conf
    source-filer:demo_source       destination-filer:demo_destination – 0 * * *  # this syncs every hour
    source-filer:/vol/demo1/qtree   destination-filer:/vol/demo1/qtree – 0 21 * *  # this syncs every 9:00 pm
    
  6. Other SnapMirror commands

    • To break a SnapMirror relation – run snapmirror quiesce and snapmirror break.
    • To update SnapMirror data – run snapmirror update.
    • To resync a broken relation – run snapmirror resync.
    • To abort a relation – run snapmirror abort.

Related entries: