Resizing disk on Debian

Igor Iglesias
May 27, 2023

--

Recently during a droplet(DigitalOcean VM) configuration based on a custom image, I had to resize one disk’s partition to full fill all the space “given” by DigitalOcean. So, let’s begin!

gdisk -l /dev/vda to check the disk and space available

You can see that the disk has 50.0 GiB on the image Disk /dev/vda, and the partition I wanted to resize was number 2(already resized in the image).

Now growpart /dev/vda 2 and then

df -Th /dev/vda2 to see the filesystem

In my case was XFS

Now just run xfs_growfs /dev/vda2 and it’s done

--

--

Igor Iglesias
Igor Iglesias

Written by Igor Iglesias

Professional with more than 10 years of experience in network management, working in large networks with multiple vendors and technologies.

No responses yet