Sunday, September 21, 2014

How does SnapMirror Semi-Sync Work ?

Dear readers, I recommend you to first read my post 'How SnapMirror Sync works' ( how-does-snapmirror-sync-work.html ), before reading Semi-Sync.

How SnapMirror Semi-Sync Works

Semi-synchronous mode provides a middle ground that keeps the primary and secondary file systems more closely synchronized than in asynchronous mode, but with less application performance impact than in synchronous mode. Configuration of semi-synchronous mode is very similar to that of synchronous mode by simply replacing “sync” with “semi-sync.” An example follows:

fas1:vol1 fas2:vol1 – semi-sync

The key difference between synchronous and semi-synchronous modes is that NVLOG forwarding is turned off in semi-synchronous mode. This means that client writes are acknowledged soon after the primary system writes the data to its NVRAM. Since NVLOG forwarding is turned off, the data is now protected at the secondary site only through CP forwarding. Since the maximum window of time between any two CPs is 10 seconds, a disaster at the primary site could result in a data loss of approximately 10 seconds.

The summary of high-level steps and a diagram depicting SnapMirror Semi-Sync are as follows:

1. The storage system receives a write request. This request could be a file-oriented request from an NFS, CIFS, or DAFS client, or it could be a block-oriented request using FCP or iSCSI.

2. After the request is safely stored in NVRAM and cache memory on the primary system, Data ONTAP acknowledges the write to the client system, and the application that requested the write is free to continue processing.

3. Under certain conditions, a consistency point (CP) is triggered. Typically, this occurs when the NVRAM journal is one-half full, or when 10 seconds have passed since the most recent CP, whichever comes first.

4. When a CP is triggered, Data ONTAP uses the transaction data in cache memory to build a list of data block changes that need to be written to disk. It also computes parity information at this time. After the required disk modifications are ready, the local RAID software writes the data blocks to the disk, and the data blocks are also sent across the network to the secondary system, which initiates its own write to disk.

5. When the secondary storage system receives the CP data blocks, it sends an acknowledgement to the primary storage system, and Data ONTAP considers the CP complete.


Functional diagram of Semi-Sync 

No comments:

Post a Comment