How to resize additional disk/partition for Cloud VM Print

  • cloud vm, resize partition, resize2fs, growpart, cloud-init
  • 3

By default, our Cloud Server preinstalled with cloud-init for auto VM deployment. This including provision of network, user credentials, as well as resize partition automatically.

However, partition automatically resize is not possible for custom usage where customer order additional/secondary storage which add later to their Cloud VM.

In order to resize secondary or other partition, you can use following steps:

1) Identify drive letter by issuing command:

fdisk -l | grep /dev/sd

2) grow partition layer, assuming the drive letter  is /dev/sdb1 in physical volume /dev/sdb:

growpart /dev/sdb 1

3) resize filesystem

resize2fs /dev/sdb1

4) confirm the new partition size

df -h

That's it.


Was this answer helpful?

« Back