Help Center/ Server Migration Service/ FAQs/ Product Consultation/ How Do I Verify Data Consistency Between the Source and Target Servers?
Updated on 2024-08-22 GMT+08:00

How Do I Verify Data Consistency Between the Source and Target Servers?

SMS consistency verification allows you to verify data consistency before and after the migration. You can enable this function when you start an incremental synchronization.

Precautions

  • Before enabling this function, you are advised to stop services (and databases if any) on the source server. If they are not stopped, data on the source server keeps changing, which will affect the consistency.

    It is normal for some directories on the source and target servers to have slight differences. For instance, there are directories on the source server where data is always changing, such as the directory where SMS-Agent was installed and the /var/log directory where stores system logs.

  • The time required for consistency verification depends on the number and size of files to be verified. If consistency verification takes a long time during the final incremental synchronization, the time required for service cutover will also increase. Evaluate the impacts on your services.
  • Consistency verification occupies significant source disk I/O resources. Evaluate the potential impacts on your source services.

Constraints

  • Consistency verification does not apply to migration scenarios where disks or partitions are adjusted. In this case, paths on the source and target servers are not perfectly mapped to each other.
  • It is not applicable to verification of cross-file system files or shared folders.
  • To prevent your services on the source server from being affected, a maximum of 100,000 files can be verified in a single directory.
  • To prevent excessive memory usage, only paths that are shorter than 1024 bytes are verified.

Enabling Consistency Verification

  1. Open the Sync Incremental Data dialog box by referring to section Synchronizing Incremental Data.
  2. Enable Verify Consistency and correctly enter the directories for which data consistency is to be verified. If the entered directories are incorrect or empty, 0 will be displayed for these directories in the verification results.

    • The larger the amount of data to be verified, the longer the consistency verification goes on. You are advised to verify only key directories.
    • The following directories will be excluded from consistency verification by default:
      • /, /etc, /dev, /sys, /usr, /boot, and /run in Linux
      • Root directories of partitions in Windows, for example, C:\ and D:\.

  3. Select a verification method.

    • Quick verification: compares the file size and last modification time.
    • SHA256 verification: compares SHA256 checksums. This option is only available if SMS-Agent V3.35.0 or later is used. This method scans file content in binary mode. It consumes a large amount of disk I/O resources and takes a long time but is more accurate.

  4. (Optional) Enable Verify Inconsistencies to verify files that were verified to be inconsistent in the previous verification. This option can only be enabled after at least one consistency verification is complete.
  5. Click Yes to synchronize incremental data and verify consistency. After the synchronization and verification are complete, you can view the verification results by referring to Viewing Verification Results.

Disabling Consistency Verification

If you want to disable consistency verification after the incremental synchronization starts, perform the following steps:

  1. Choose More > Pause in the Operation column to pause the synchronization task.
  2. Click Start in the Operation column.
  3. In the displayed dialog box, disable Verify Consistency and click Yes.

Viewing Verification Results

To view the data consistency verification results, choose More > Manage Migration Settings > View Verification Results in the Operation column.

If 0 is displayed in the Files Verified column, it means the specified directory could not be found or is empty.

All files verified to be inconsistent are recorded in the log file sms_cmp_result.log in the SMS-Agent installation directory (*/SmsAgent/agent/Logs/ on Linux and C://SMS-Agent-Py*/Logs on Windows) on the source server.

Estimating Verification Time

The following table lists the verification time tested on servers where only the migration process runs but is for reference only.

OS

Specifications

Disk Performance

Verification Time (per 100 GB)

Windows

2 vCPUs and 4 GB of memory

5,000 IOPS/150 MB/s

About 17 minutes

Linux

2 vCPUs and 4 GB of memory

5,000 IOPS/150 MB/s

About 13 minutes