Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Server Migration Service/ User Guide(ME-Abu Dhabi Region)/ FAQs/ Disk Management/ How Do I Merge Disks During a Linux Migration?

How Do I Merge Disks During a Linux Migration?

Updated on 2024-03-15 GMT+08:00

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.

NOTICE:
  • 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.
  1. On the source server, go to the config directory in the Agent installation directory.

    cd SMS-Agent/agent/config

  2. Open and edit the disk.cfg configuration file in config.

    vi disk.cfg

  3. 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
    CAUTION:
    • 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.

  4. 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.
In the following example, we will change the size of the target disk vdb to 40 GB.
[disk_size_modify]
disk_name=/dev/vdb
adjust_size=40G
CAUTION:
  • 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.
In the following example, we will add a 10 GB disk called vdd to a target server.
[disk_add]
disk_name=/dev/vdd
disk_size=10G
CAUTION:
  • 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.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback