🔧

Huawei

1 notes  •  Tools & Utilities

Extend Partitions and File Systems on Huawei Cloud Data Disks

When you expand a data disk on Huawei Cloud (or any cloud), the extra space is unallocated. This guide extends the existing partition and file system to use the new space without data loss.

Prerequisites

  • The disk has been expanded in the Huawei Cloud console
  • The growpart utility is available (install if missing)
  • Example: disk /dev/vdb expanded from 100 GB to 150 GB, partition /dev/vdb1

Steps

# Install growpart if not already present
yum install cloud-utils-growpart

# View current partition layout
fdisk -l /dev/vdb

# Extend the partition to use all available space
growpart /dev/vdb 1

# Verify the partition was extended
fdisk -l /dev/vdb

# Resize the file system (ext4)
resize2fs /dev/vdb1

# For XFS file systems:
xfs_growfs /mount/point

Verify

df -h /mount/point

The available disk space should reflect the new size.

Notes

  • This procedure works non-destructively on MBR and GPT partitions.
  • Run growpart without arguments to check if the tool is installed.
  • For the root partition (/dev/vda1), a reboot may be required after growpart.