How Do I Merge Disks During a Linux Migration?
Scenario
When you migrate a Linux server, you can migrate partitions from different disks on the source server to a single disk on the target server.
Solution
Modify the SMS-Agent configuration file on the source server.
- 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.
- 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 source partitions are located.
- new_disk_name: Enter the names of target disks.
In this example, we will migrate the vdc1 partition on the vdc disk and the vdd1 partition on the vdd disk of the source server to the vdb4 and vdb5 partitions on the vdb disk of the target server.
[vol_disk_modify] vol_name=/dev/vdc1;/dev/vdd1 new_vol_name=/dev/vdb4;/dev/vdb5 disk_name=/dev/vdc;/dev/vdd new_disk_name=/dev/vdb;/dev/vdb
- 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 the target disk is larger than the total size of all the partitions on it, or the migration may fail. If you need to resize the target disk or add a new disk, see Resizing Disks and 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.
- Neither LVM nor Btrfs partitions can be merged.
- 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
- For a system disk, its size must range from 40 GB to 1024 GB.
- For a data disk, its size must range 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
- The disk name must comply with the naming rules and must be unique.
- The disk size must range from 10 GB to 32,768 GB.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot