PowerShell Script for Consistency Check When Replica is Inconsistent #DPM #SCDPM #PowerShell

Introduction

System Center Data Protection Manager (SC DPM) has a built-in mechanism to auto-heal if the protected data becomes inconsistent with its replica. This feature is known as Synchronization with Consistency Check, also referred to simply as a Consistency Check (CC). As part of the synchronization process, a consistency check performs block-by-block verification to ensure that all the data on the replica is consistent with the protected data.

You may need to perform synchronization with consistency check to repair inconsistencies between the data on the protected computer and the replica on the DPM server. DPM automatically initiates a consistency check as a daily task if you select the option to automatically perform consistency check if the replica is inconsistent or if you have scheduled a daily consistency check for a protection group. You can configure your protection group to allow DPM to initiate a consistency check as a daily task as shown in Figure 1, if you select the option to automatically perform consistency check if the replica is inconsistent. Microsoft recommends you to use this option for workloads lesser than 1TB or workloads within the same datacenter.

You can also schedule a daily consistency check during off-peak hours to ensure that the replica remains consistent with the protected data. A scheduled consistency check will only run if inconsistencies are detected during synchronization. Microsoft recommends you to use this option for large workloads more than 1TB or for data that is backed up over WAN link (i.e. MPLS, IP-VPN) for branch offices.

Figure 1. Data Protection Manager – Consistency Check Options

Scenario

Sometimes a replica becomes inconsistent because of a change journal overflow or an unexpected shutdown of the protected computer or if the storage volume has been surprise removed from DPM server, in this case a consistency check must be performed. You can perform a one-time manual consistency check as shown in Figure 2.

Figure 2. Data Protection Manager – Perform Manual Consistency Check

When a consistency check is performed and inconsistencies between the protected volume and the replica volume are found, DPM makes the replica consistent.

However, what if you have multiple protection groups and within each protection group you have different members that are Replica Inconsistent as shown in Figure 3 🙁

Figure 3. Data Protection Manager – Perform Manual Consistency Check

You can wait until DPM performs the consistency check if you have a daily consistency check is scheduled as shown in Figure 1 above or go manually to each protected member and select Perform consistency check…

Automation

A better way is to use PowerShell and automate the consistency check task for all members that are in Replica inconsistent state.

Open Windows PowerShell as Administrator on your DPM server and run the following script:

Once you run above script, verification in progress will kick in for all failed members as shown in Figure 4.

Figure 4. Data Protection Manager – Replica inconsistent, verification in progress

Please note that this operation may require DPM to use additional CPU and disk resources. Use with Caution!

You can build upon this simple script and check the status of all replicas every morning. You can send this report via email only when DPM cannot fix its own problem, and needs manual intervention.

Hope this helps!

Cheers,
-Ch@rbel-

About Charbel Nemnom 323 Articles

Charbel Nemnom is a Microsoft Cloud Consultant and Technical Evangelist, totally fan of the latest’s IT platform solutions, accomplished hands-on technical professional with over 15 years of broad IT Infrastructure experience serving on and guiding technical teams to optimize performance of mission-critical enterprise systems. Excellent communicator adept at identifying business needs and bridging the gap between functional groups and technology to foster targeted and innovative IT project development. Well respected by peers through demonstrating passion for technology and performance improvement. Extensive practical knowledge of complex systems builds, network design and virtualization.

Be the first to comment

Leave a Reply