Sunteți pe pagina 1din 40

Section 3 : Business Continuity

Local Replication

Chapter 13

EMC Proven Professional


The #1 Certification Program in the information storage and management industry

2009 EMC Corporation. All rights reserved.

Chapter Objective
After completing this chapter you will be able to: o Discuss local replication and the possible uses of local replicas

o Explain consistency considerations when replicating file systems and databases


o Discuss host and array based replication technologies
o Functionality o Differences o Considerations o Selecting the appropriate technology

2009 EMC Corporation. All rights reserved.

Lesson: Local Replica and Data Consistency


Upon completion of this lesson, you will be able to: o Define local replication

o Discuss the possible uses of local replicas


o Explain replica considerations such as Recoverability and Consistency o Describe how consistency is ensured in file system and database replication o Explain Dependent write principle

2009 EMC Corporation. All rights reserved.

What is Replication
o Replica - An exact copy o Replication - The process of reproducing data

o Local replication - Replicating data within the same array or the same data center

REPLICATION

Source
2009 EMC Corporation. All rights reserved.

Replica (Target)

Possible Uses of Local Replicas


o Alternate source for backup
o An alternative to doing backup on production volumes

o Fast recovery
o Provide minimal RTO (recovery time objective)

o Decision support
o Use replicas to run decision support operations such as creating a report
o Reduce burden on production volumes

o Testing platform
o To test critical business data or applications

o Data Migration
o Use replicas to do data migration instead of production volumes
2009 EMC Corporation. All rights reserved.

Replication Considerations
o Types of Replica: choice of replica tie back into RPO (recovery point objective)
o Point-in-Time (PIT)
o non zero RPO

o Continuous
o near zero RPO

o What makes a replica good


o Recoverability/Re-startability
o Replica should be able to restore data on the source device o Restart business operation from replica

o Consistency
o Ensuring consistency is primary requirement for all the replication technologies

2009 EMC Corporation. All rights reserved.

Understanding Consistency
o Ensure data buffered in the host is properly captured on the disk when replica is created
o Data is buffered in the host before written to disk

o Consistency is required to ensure the usability of replica o Consistency can be achieved in various ways:
o For file Systems
o Offline: Un-mount file system o Online: Flush host buffers

o For Databases
o Offline: Shutdown database
o Online: Database in hot backup mode
o Dependent Write I/O Principle o By Holding I/Os
2009 EMC Corporation. All rights reserved.

File System Consistency: Flushing Host Buffer


Application File System Sync Daemon Memory Buffers Logical Volume Manager Physical Disk Driver Data

Source

Replica

2009 EMC Corporation. All rights reserved.

Database Consistency: Dependent write I/O Principle


o Dependent Write: A write I/O that will not be issued by an application until a prior related write I/O has completed
o A logical dependency, not a time dependency

o Inherent in all Database Management Systems (DBMS)


o e.g. Page (data) write is dependent write I/O based on a successful log write

o Necessary for protection against local outages


o Power failures create a dependent write consistent image o A Restart transforms the dependent write consistent to transitionally consistent
o i.e. Committed transactions will be recovered, in-flight transactions will be discarded
2009 EMC Corporation. All rights reserved.

Database Consistency: Dependent Write I/O


Source Replica Source
1

Replica

Consistent

Inconsistent

2009 EMC Corporation. All rights reserved.

Database Consistency: Holding I/O


Source Replica

Consistent

2009 EMC Corporation. All rights reserved.

Lesson Summary
Key points covered in this lesson: o Possible uses of local replicas
o Alternate source for backup
o Fast recovery o Decision support o Testing platform o Data Migration

o Recoverability and Consistency o File system and database replication consistency o Dependent write I/O principle
2009 EMC Corporation. All rights reserved.

Lesson: Local Replication Technologies


Upon completion of this lesson, you will be able to: o Discuss Host and Array based local replication technologies
o Options
o Operation o Comparison

2009 EMC Corporation. All rights reserved.

Local Replication Technologies


o Host based
o Logical Volume Manager (LVM) based replication (LVM mirroring) o File System Snapshot

o Storage Array based


o Full volume mirroring o Pointer based full volume replication o Pointer based virtual replication

2009 EMC Corporation. All rights reserved.

Host Based Replication: LVM-based Replication

Host

Logical Volume
Logical Volume

Physical Volume 1

Physical Volume 2

2009 EMC Corporation. All rights reserved.

LVM-based Replication: Limitations


o LVM based replicas add overhead on host CPUs
o Each write is translated into two writes on the disk o Can degrade application performance

o If host volumes are already storage array LUNs then the added redundancy provided by LVM mirroring is unnecessary
o The devices will have some RAID protection already

o Both replica and source are stored within the same volume group
o Replica cannot be accessed by another host o If server fails, both source and replica would be unavailable

o Keeping track of changes on the mirrors is a challenge


2009 EMC Corporation. All rights reserved.

File System Snapshot


o Pointer-based replica
o Uses Copy on First Write principle o Uses bitmap and block map
o Bitmap: Used to track blocks that have changed on the production/source FS after creation of snap initially all zero o Block map: Used to indicate block address from which data is to be read when the data is accessed from the Snap FS initially points to production/source FS

o Requires a fraction of the space used by the original FS o Implemented by either FS itself or by LVM

2009 EMC Corporation. All rights reserved.

File System Snapshots How it Works


o Write to Production FS Snap FS Metadata BLK 1-0 2-0 3-2 3-0 4-1 4-0 Bit 1-0 2-0 3-0 3-1 4-0 4-1

Prod FS Metadata
1 Data a 2 Data b c 3 Data C d 4 Data D

New writes

N Data N
2009 EMC Corporation. All rights reserved.

1 Nodata no data Data d 2 Data no data c 3 no data 4 no data

File System Snapshots How it Works


o Reads from snap FS
o Consult the bitmap
o If 0 then direct read to the production FS o If 1 then go to the block map get the block address and read data from that address

Prod FS Metadata 1 Data a 2 Data b 3 Data C 4 Data D

Snap FS Metadata BLK 1-0 2-0 3-2 4-1 Bit 1-0 2-0 3-1 4-1

N Data N
2009 EMC Corporation. All rights reserved.

1 Nodata Data d 2 Data c 3 no data 4 no data

Storage Array Based Local Replication


o Replication performed by the Array Operating Environment o Replicas are on the same array

o Types of array based replication


o Full-volume mirroring o Pointer-based full-volume replication o Pointer-based virtual replication

Array Source

Replica

Production Server
2009 EMC Corporation. All rights reserved.

BC Server

Full Volume Mirroring: Attached


o Target is a full physical copy of the source device o Target is attached to the source and data from source is copied to the target o Target is unavailable while it is attached o Target device is as large as the source device

o Good for full backup, decision support, development, testing and restore to last PIT
Attached
Read/Write Not Ready

Source
Array
2009 EMC Corporation. All rights reserved.

Target

Full Volume Mirroring: Detached


o After synchronization, target can be detached from the source and made available for BC (business continuity) operations o PIT is determined by the time of detachment o After detachment, re-synchronization can be incremental
o Only updated blocks are resynchronized

o Modified blocks are tracked using bitmaps


Detached - PIT
Read/Write Read/Write

Source
Array
2009 EMC Corporation. All rights reserved.

Target

Full Volume Mirroring: Source and Target Relationship

Attached/ Synchronization

Detached

Resynchronization

Source = Target

Source Target

Source = Target

2009 EMC Corporation. All rights reserved.

Pointer-based Full Volume Replication


o Provide full copy of source data on the target o Target device is made accessible for business operation as soon as the replication session is started o Point-in-Time is determined by time of session activation o Two modes
o Copy on First Access (deferred) o Full Copy mode

o Target device is at least as large as the source device

2009 EMC Corporation. All rights reserved.

Copy on First Access (CoFA) Mode: Deferred Mode


Write to Source
Read/Write Read/Write

Source

Target

Write to Target
Read/Write Read/Write

Source

Target

Read from Target


Read/Write Read/Write

Source
2009 EMC Corporation. All rights reserved.

Target

Full Copy Mode


o On session start, the entire contents of the Source device is copied to the Target device in the background o If the replication session is terminated, the target will contain all the original data from the source at the PIT of activation
o Target can be used for restore and recovery o In CoFA mode, the target will only have data was accessed until termination, and therefore it cannot be used for restore and recovery

o Most vendor implementations provide the ability to track changes:


o Made to the Source or Target
o Enables incremental re-synchronization

2009 EMC Corporation. All rights reserved.

Pointer Based Virtual Replication


o Targets do not hold actual data, but hold pointers to where the data is located
o Target requires a small fraction of the size of the source volumes

o A replication session is setup between source and target devices


o Target devices are accessible immediately when the session is started o At the start of the session the target device holds pointers to data on source device

o Typically recommended if the changes to the source are less than 30%

2009 EMC Corporation. All rights reserved.

Virtual Replication: Copy on First Write Example


Target Virtual Device

Source

Save Location

2009 EMC Corporation. All rights reserved.

Tracking Changes to Source and Target


o Changes will/can occur to the Source/Target devices after PIT has been created o How and at what level of granularity should this be tracked
o Too expensive to track changes at a bit by bit level
o Would require an equivalent amount of storage to keep track

o Based on the vendor some level of granularity is chosen and a bit map is created (one for source and one for target)
o For example one could choose 32 KB as the granularity o If any change is made to any bit on one 32KB chunk the whole chunk is flagged as changed in the bit map

o For 1GB device, map would only take up 32768/8/1024 = 4KB space

2009 EMC Corporation. All rights reserved.

Tracking Changes to Source and Target: Bitmap


Source 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

At PIT
Target

After PIT

Source Target

1 0

0 0

0 1

1 1

0 0

1 0

0 0

0 1

For resynchronization/restore Logical OR 1 0 1 1 0 1 0 1

0 = unchanged
2009 EMC Corporation. All rights reserved.

1 = changed

Restore/Restart Operation
o Source has a failure
o Logical Corruption o Physical failure of source devices o Failure of Production server

o Solution
o Restore data from target to source
o The restore would typically be done incrementally o Applications can be restarted even before synchronization is complete

-----OR-----o Start production on target


o Resolve issues with source while continuing operations on target o After issue resolution restore latest data on target to source
2009 EMC Corporation. All rights reserved.

Restore/Restart Considerations
o Before a Restore
o Stop all access to the Source and Target devices o Identify target to be used for restore
o Based on RPO and Data Consistency

o Perform Restore

o Before starting production on target


o Stop all access to the Source and Target devices o Identify Target to be used for restart
o Based on RPO and Data Consistency

o Create a Gold copy of Target


o As a precaution against further failures

o Start production on Target


2009 EMC Corporation. All rights reserved.

Restore/Restart Considerations (cont.)


o Pointer-based full volume replicas
o Restores can be performed to either the original source device or to any other device of like size
o Restores to the original source could be incremental in nature o Restore to a new device would involve a full synchronization

o Pointer-based virtual replicas


o Restores can be performed to the original source or to any other device of like size as long as the original source device is healthy
o Target only has pointers
o Pointers to source for data that has not been written to after PIT

o Pointers to the save location for data was written after PIT

o Thus to perform a restore to an alternate volume the source must be healthy to access data that has not yet been copied over to the target

2009 EMC Corporation. All rights reserved.

Array Replicas: Which Technology?


Factor Performance impact on source Full-volume mirroring Pointer-based full-volume Pointer-based virtual replication replication CoFA mode some impact Full copy no impact High impact

No impact

Size of target Accessibility of source for restoration

At least same as the Small fraction of the At least same as the source source source Not required Only after synchronization and detachment from the source CoFA mode required Full copy not required Required

Accessibility to target

Immediately accessible

Immediately accessible

2009 EMC Corporation. All rights reserved.

Creating Multiple Replicas


Target Devices
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.
2009 EMC Corporation. All rights reserved.

P.M.

Local Replication Management: Array Based


o Replication management software residing on storage array o Provides an interface for easy and reliable replication management o Two types of interface:
o CLI

o GUI

2009 EMC Corporation. All rights reserved.

Lesson Summary
Key points covered in this lesson: o Replication technologies
o Host based
o LVM based mirroring o File system snapshot

o Array based
o Full volume mirroring o Pointer-based full volume copy
o Pointer-based virtual replica

2009 EMC Corporation. All rights reserved.

Chapter Summary
Key points covered in this chapter: o Definition and possible use of local replicas

Additional Task Research on EMC Replication Products

o Consistency considerations when replicating file systems and databases


o Host based replication
o LVM based mirroring, File System Snapshot

o Storage array based replication


o Full volume mirroring, Pointer based full volume and virtual replication o Choice of technology

2009 EMC Corporation. All rights reserved.

Check Your Knowledge


o Describe the uses of a local replica in various business operations. o How can consistency be ensured when replicating a database? o What are the differences among full volume mirroring and pointer based replicas?

o What is the key difference between full copy mode and deferred mode?
o What are the considerations when performing restore operations for each array replication technology?

2009 EMC Corporation. All rights reserved.

#1 IT company

For more information visit


2009 EMC Corporation. All rights reserved.

http://education.EMC.com

S-ar putea să vă placă și