Local Replication: Section 3: Business Continuity
Local Replication: Section 3: Business Continuity
Local Replication
Chapter Objective
REPLICATION
• Types of Replica: choice of replica tie back into RPO (recovery point
objective)
• Point-in-Time (PIT)
• non zero RPO
• Continuous
• near zero RPO
• What makes a replica good
• Recoverability/Re-startability
• Replica should be able to restore data on the source device
• Restart business operation from replica
• Consistency
• Ensuring consistency is primary requirement for all the replication technologies
Understanding Consistency
Source Replica
Database Consistency: Dependent write I/O
Principle
• Dependent Write: A write I/O that will not be issued by an application until a
prior related write I/O has completed
• A logical dependency, not a time dependency
• Inherent in all Database Management Systems (DBMS)
• e.g. Page (data) write is dependent write I/O based on a successful log write
• Necessary for protection against local outages
• Power failures create a dependent write consistent image
• A Restart transforms the dependent write consistent to transitionally consistent
• i.e. Committed transactions will be recovered, in-flight transactions will be discarded
Database Consistency: Dependent Write I/O
Source Replica Source Replica
1 1 1
2 2 2
3 3 3 3
4 4 4 4
C Consistent
D Inconsistent
Database Consistency: Holding I/O
Source Replica
1 1
5 5 2 2
3 3
4 4
Consistent
Lesson Summary
• Host based
• Logical Volume Manager (LVM) based replication (LVM mirroring)
• File System Snapshot
• Storage Array based
• Full volume mirroring
• Pointer based full volume replication
• Pointer based virtual replication
Host Based Replication: LVM-based Replication
Physical
Host Logical Volume Volume 1
Logical Volume
Physical
Volume 2
LVM-based Replication: Limitations
Array
Source Replica
Source Target
Array
Full Volume Mirroring: Detached
Detached - PIT
Read/Write Read/Write
Source Target
Array
Full Volume Mirroring: Source and Target
Relationship
Source Target
Write to Target
Read/Write Read/Write
Source Target
Source Target
Full Copy Mode
• Targets do not hold actual data, but hold pointers to where the data
is located
• Target requires a small fraction of the size of the source volumes
• A replication session is setup between source and target devices
• Target devices are accessible immediately when the session is started
• At the start of the session the target device holds pointers to data on source
device
• Typically recommended if the changes to the source are less than
30%
Virtual Replication: Copy on First Write
Example
Target
Virtual Device
Source 0 0 0 0 0 0 0 0
At PIT
Target 0 0 0 0 0 0 0 0
Source 1 0 0 1 0 1 0 0
After PIT…
Target 0 0 1 1 0 0 0 1
For resynchronization/restore
Logical OR 1 0 1 1 0 1 0 1
0 = unchanged 1 = changed
Restore/Restart Operation
-----OR------
• Start production on target
• Resolve issues with source while continuing operations on target
• After issue resolution restore latest data on target to source
Restore/Restart Considerations
• Before a Restore
• Stop all access to the Source and Target devices
• Identify target to be used for restore
• Based on RPO and Data Consistency
• Perform Restore
• Before starting production on target
• Stop all access to the Source and Target devices
• Identify Target to be used for restart
• Based on RPO and Data Consistency
• Create a “Gold” copy of Target
• As a precaution against further failures
• Start production on Target
Restore/Restart Considerations (cont.)
06:00 A.M.
Source
12:00 P.M.
Point-In-Time
06:00 P.M.
12:00 A.M.
: 12 : 01 : 02 : 03 : 04 : 05 : 06 : 07 : 08 : 09 : 10 : 11 : 12 : 01 : 02 : 03 : 04 : 05 : 06 : 07 : 08 : 09 : 10 : 11 :
A.M. P.M.
Local Replication Management: Array Based