Why Is There Less Data on the Target Server After the Migration Than There Was on the Source Server?
Symptom
After the migration was complete, the amount of migrated data was less than the total amount of data scanned on the source server.
Possible Causes
The total amount of data to be migrated on the source server is collected by the Agent through the df-Th command. The amount of migrated data is the total combined size of all the migrated files.
If these two amounts are different, the possible causes are as follows:
- Possible cause 1: Some files were deleted from the source server, but the processes using these file still exist.
The rm command or other software is often used to delete files. If a file is used by a running process when it is deleted, it will still be accessible to this process and will continue to occupy disk space.
- On the source server, run df -Th to check whether the used disk space is the same as the total amount of migrated data.
- In the root directory of the source server, run du -sh * to check the disk usage of directories.
In the above figures, df reports a larger data volume than du.
- Run the following command on the source server:
lsof -n / |grep deleted
If information similar to the following is displayed, some files were deleted but are still in use by some running processes.
- If the migration task can be finished and the target server can be launched, the data unmigrated has no effects on the target server, and this problem can be ignored.
- (Optional) On the source server, run lsof -n / |grep deleted and stop all the processes returned.
- (Optional) Restart the source server at an appropriate time to stop the processes.
- On the source server, run df -Th to check whether the used disk space is the same as the total amount of migrated data.
- Possible cause 2: Some directories were excluded from migration.
In Linux, the Agent does not migrate files in the following directories by default:
/proc/*
/sys/*
/lost+found/*
/var/lib/ntp/proc/*
But these directories are counted in the total volume of source data scanned by the Agent.
In the root directory of the source server, run du -sh * to check how much space is occupied by directories that were not migrated, such as /proc/*, /sys/*, /lost+found/*, and /var/lib/ntp/proc/*.
If the total size of these excluded directories equals to the size of unmigrated data, the migration is successful, and this problem can be ignored.
- Possible cause 3: There were data changes on the source server during the migration.
When a migration starts, the Agent runs the df -Th command to obtain information about directories where each partition is mounted and traverses these directories to calculate the amount of data to be migrated.
Data that has already been migrated is not affected by changes to the source data. However, if data that has not been migrated changes, the most current version is what migrated.
The amount of data displayed on the SMS console reflects information collected from the source server during the first scan. During the migration, if a large amount of data is changed on the source server, for example, a large amount of data is deleted before being migrated, the amount of data migrated may be less than the total amount of data scanned for the first time.
You can run df -Th on the source and target servers for comparison.
- Possible cause 4: A large number of sparse files existed on the source server.
Sparse files are scanned but ignored during the migration. This may lead to the amount of migrated data less than the total amount of data calculated during the first scan.
There are many ways to generate sparse files in Linux, such as running the dd command.
Disk Management FAQs
- Why Was a 40 GB EVS Disk Added to the Target Server During the Migration?
- Why Can't I Attach the Original System Disk Back to a Target Server?
- How Do I Resize Partitions and Disks When I Migrate a Windows Source Server?
- How Do I Shrink the Disk Partitions on a Source Server Running Windows?
- How Do I Exclude a Partition from Migration in Windows?
- How Do I Resolve Error "Target server has fewer disks than source server. Select another target server" When I Configure the Target Server?
- What Are the Requirements on Disks on a Target Server?
- How Can I Migrate a Source Server with a Large System Disk?
- How Do I Resolve Error "Some disks on the target server are smaller than those on the source server. Select another target server" When I Configure the Target Server?
- Can SMS Migrate Local Disks on a Source Server?
- Why Do I Need to Set the Target Server Disk Be at Least 1 GB Larger than the Paired Source Server GPT Disk on Alibaba Cloud?
- Why Can't I Specify Whether to Migrate a Physical Volume When I Resize Disk Partitions in Linux?
- Why Can't I Specify Whether to Migrate a Logical Volume When I Resize Disk Partitions in Linux?
- What Are the Rules for Resizing Volume Groups, Disks, and Partitions?
- How Do I Migrate a Server with a System Disk Larger Than 1 TB?
- How Do I Detach the Temporary System Disk from My Target Server and Re-attach the Original Disk?
- Why Is There Less Data on the Target Server After the Migration Than There Was on the Source Server?
- How Do I Merge Disks During a Linux Migration?
- How Do I Split a Disk During a Linux Migration?
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.
more