Downsizing Disks on Linux
This section explains how to downsize disks for a Linux server with over-provisioned storage capacity when you migrate it to Huawei Cloud using SMS.
There are two ways to do this, as SMS gives you the flexibility to use an existing server or create a new server as the target server.
- If you choose to migrate to an existing server with smaller disks than the source server, you can adjust disk settings based on the target server disks. Note that disks on the target server will be formatted and re-partitioned based on the updated disk settings during the migration. Ensure that data on the target server has been backed up and its disks can be formatted before the migration.
- If you choose to migrate to a new server, you can adjust disk and partition settings based on the actual disk usage of the source server. Then SMS will create a new server based on the adjusted disk and partition settings.
Constraints
You need to note that:
- For a Linux server using LVM, you can choose whether to migrate specific physical or logical volumes and resize the paired target volumes.
- Partition resizing is not supported for Btrfs partitions on Linux.
- For a Linux server, the system and swap partitions are migrated by default.
- You can choose to migrate all or none volume groups by using the Migrate All Volume Groups option.
- If you choose to migrate none of the logical volumes in a volume group, their physical volumes will not be migrated by default.
- In a Linux block-level migration, you can upsize partitions, but you cannot downsize them.
- In a Linux file-level migration, you can upsize or downsize partitions. When you downsize a partition, the new partition size must be at least 1 GB larger than the used partition space. If the current size does not meet this condition, downsizing is not possible. For details, see What Are the Rules for Resizing Volume Groups, Disks, and Partitions?
Prerequisites
You have completed the migration preparations.
Procedure
- Install and start the SMS-Agent on the source server. After the Agent is started, you can see the source server record on the Servers page of the SMS console.
- Configure a target server. In the Configure Basic Settings > Migration Settings (Optional) area, enable Resize Disks and Partitions and click Resize Disks and Partitions. For details about the resizing rules, see What Are the Rules for Resizing Volume Groups, Disks, and Partitions?
Once set, the setting of disk and partition resizing cannot be modified. To modify the setting, delete the task, restart the SMS-Agent, and configure the target server again.
- (Optional) Configure volume groups. If the source server uses LVM, you can resize logical and physical volumes. If the source server does not use LVM, skip this step.
- Resize partitions and, if needed, click Resize Disk to adjust disk sizes.
- Resize disks if needed. You can view the overview of the disks to be migrated near the bottom of the window. After the adjustment is complete, click Next: Confirm.
Figure 1 Viewing adjusted disks
- After confirming the settings are correct, click OK to save them.
- After all parameters are configured, save the settings and start the migration. SMS will create a target server based on the adjusted disk and partition settings. After the migration is complete, click the target server name in the Target column to view its basics and disk information.
Figure 2 Viewing the target server
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