How Do I Split a Disk During a Linux Migration?
Scenario
When you migrate a Linux server, you can migrate partitions from a disk on the source server to different disks on the target server.
If you need to reduce the size of a partition or disk on the target server, you can resize the partition or disk when creating a task on the SMS console after the SMS-Agent is started.
Solution
You can modify the SMS-Agent configuration file on the source server.
![](https://support.huaweicloud.com/eu/sms_faq/public_sys-resources/notice_3.0-en-us.png)
- The modified configuration file will only be used for the target server. It will not affect the source server.
- The migration progress bar on the SMS console may not be able to show the real-time progress after you modify the configuration file.
Splitting by Partition
You can split a partition by modifying the partition mapping.
- On the source server, go to the config directory in the Agent installation directory.
cd SMS-Agent/agent/config
- Open and edit the disk.cfg configuration file in config.
vi disk.cfg
- Modify parameters under vol_disk_modify.
- vol_name: Enter the names of the original partitions.
- new_vol_name: Enter the names of the new partitions.
- disk_name: Enter the names of disks where the original partitions are located.
- new_disk_name: Enter the names of target disks where the new partitions are located.
In the following example, we will migrate the vda2 and vda3 partitions from the source disk vda to the target disks vdb and vdc.
[vol_disk_modify] vol_name=/dev/vda2;/dev/vda3 new_vol_name=/dev/vdb2;/dev/vdc2 disk_name=/dev/vda;/dev/vda new_disk_name=/dev/vdb;/dev/vdc
- Use semicolons (;) to separate disk or partition names. Make sure that the same number of values configured for each of the above four parameters.
- Make sure that the available space on the target server can accommodate the new partitions, or the migration may fail. To adjust the size, see Resizing Disks or Adding Disks.
- Make sure that you follow the right naming format of "Disk name+Partition number", for example, vdb4. The new partition name must be unique.
- Save settings in the disk.cfg configuration file and restart the Agent.
:wq
Resizing Disks
You can resize target disks by modifying the disk_size_modify parameter in the disk.cfg configuration file.
- disk_name: Enter the names of target disks.
- adjust_size: Enter the new disk sizes.
[disk_size_modify] disk_name=/dev/vdb adjust_size=40G
![](https://support.huaweicloud.com/eu/sms_faq/public_sys-resources/caution_3.0-en-us.png)
- If the target disk is a system disk, its size range must be from 40 GB to 1024 GB.
- If the target disk is a data disk, its size range must be from 40 GB to 32,768 GB.
Adding Disks
You can add disks by modifying the disk_add parameter in the disk.cfg configuration file.
- disk_name: Enter the names of new disks.
- adjust_size: Enter the sizes of new disks, in GB.
[disk_add] disk_name=/dev/vdd disk_size=10G
![](https://support.huaweicloud.com/eu/sms_faq/public_sys-resources/caution_3.0-en-us.png)
- The disk name must comply with the naming rules and must be unique.
- The disk size range must be from 10 GB to 32,768 GB.
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