- Documentation
Elastic Compute Service
Elastic Compute Service
Best Practices
O&M
Batch expanding volume partitions and file systems
O&M
Batch expanding volume partitions and file systems
Batch expanding volume partitions and file systems
This topic mainly describes how to use the cloud assistant feature to batch expand volume partitions and file systems without logging in to or restarting an instance.
Applicable scenario
As your business grows and application data increases, the current volume capacity is insufficient to store large amounts of business data. To solve this, you can expand your volume to increase storage capacity without losing existing data. By using the cloud assistant feature, you can batch expand file systems and partitions quickly without manually operating inside instances.
Usage notes
The expansion script provided in this practice only supports expanding volume partitions of the MBR type and the ext4 file systems. You can follow the guide for viewing partition and file system details to confirm the partition type and file system information of volumes mounted on your instances. Prerequisites
Procedure
Step 1: Expand volume
- In the top menu bar, select the project and region of the target instance.
- In the left-side navigation pane, select "Instances & Images > Instances".
- On the Instances page, click the name of the target instance.
- Select the "Volumes" tab.
- On the right side of the target volume, select "... > Extend" in the "Actions" column.
- On the Expand volume page, confirm the current configuration information. For the "New capacity" parameter, enter the volume capacity after expansion. In the example provided in this topic, the volume capacity is expanded to 60 GiB.
- Click the "Extend volume" button to submit the expansion application.
- After the volume is expanded in the console, follow the steps below for expanding partitions and file systems.
Step 2: Create an expansion command
- In the left-side navigation pane, select "Maintenance & Monitoring > Cloud Assistant".
- In the top menu bar, select the region where your business is located.
- Select the "Custom commands" tab to enter the custom command list page.
- Click the "Create a custom command" button to enter the Create a custom command page.
- Enter the following job information as instructed.
This practice only describes necessary parameters. Other parameters remain with default values. For parameter details, refer to Creating custom commands. - Click the "Confirm" button to save the custom command.
Step 3: Expand partition and file system
- In the left-side navigation pane, select "Maintenance & Monitoring > Cloud Assistant".
- In the top menu bar, select the region where your business is located.
- Select the "Job management" tab.
- Click the "Create a job" button and then enter job information based on the following instructions.
This practice only describes necessary parameters. Other parameters remain with default values. For parameter details, refer to Creating jobs. - Click the "Confirm" button to complete the job creation.
- After the job is created, the system automatically redirects you to the Job management page. The new job is then executed immediately.
View expansion results
- In the left-side navigation pane, select "Maintenance & Monitoring > Cloud Assistant".
- In the top menu bar, select the region where your business is located.
- Select the "Job management" tab, and then find the target job in the job list.
- Click the target job name or the number in the "Execution object" column to open the job details page.
- Select the "Execute object" tab to view the command execution results on each instance.
- If the job is in Execution successful status, click the
button to the left of the target instance name for details of the target partition.
- If the following output is displayed, the capacity of volume /dev/vdb1 is successfully expanded to 60 GiB.
Last updated: 2026.06.18 17:49:51