Skip to main content
Last updated on

Resize a volume

You can grow a volume online — no need to detach it from the VM, no data loss. After resizing in the Portal, you still need to grow the partition + filesystem inside the OS for the new capacity to be visible.

Grow only, never shrink

Volume size can only grow — it cannot shrink. Plan carefully before confirming so you don't pay for capacity you don't need.

Step 1. Resize in the Portal

Go to Cloud Server → Volumes, click next to the volume → Increase size.

Action menu on a volume with the Increase size item

Type the new size (must be larger than the current size) and click Confirm.

Increase size dialog

Once the Portal confirms the resize, the block device is larger. The OS does not see the new capacity yet — go to step 2 to make it usable.

Step 2. Grow the partition and filesystem inside the OS

Linux (ext4)

# 1. Confirm the block device is at the new size
lsblk

# 2. Grow the partition (if you use partitions)
sudo growpart /dev/sdb 1

# 3. Grow the ext4 filesystem
sudo resize2fs /dev/sdb1 # or /dev/sdb if you formatted directly on the device

# 4. Verify
df -h /mnt/data

Linux (XFS)

# Grow an XFS filesystem — only requires the volume to be mounted
sudo xfs_growfs /mnt/data

df -h /mnt/data

Windows

  1. Open Disk Management (diskmgmt.msc).
  2. Right-click the disk you want to grow → Extend Volume.
  3. The wizard uses all newly unallocated space. Click NextFinish.
Rehearse before production

Before resizing a production volume for the first time, run through the commands on a staging machine so you know the right tools for the filesystem you use (ext4, xfs, btrfs…). Picking the wrong command rarely loses data but eats time to recover.

Notes

  • LVM, RAID, encryption: grow the PV/LV or encrypted layer first, before running resize2fs / xfs_growfs.
  • Boot volume: can be grown like a data volume — make sure the partition table is supported (growpart handles GPT and MBR).
  • Backup: snapshot the volume before resizing if the data matters.