Resize hard disk

Feb 21, 2023
32
0
6
I have an docker running in an VM and it need more storage.

I have resized it here;
1693320156732.png

But in the VM cant use it...
1693320185145.png

/dev/sba2 is the extra space...
 
Hi,
you will have to increase:
  1. The disk itself (which you already did)
  2. The partition on the disk (not sure what you changed or didn't change there)
  3. The filesystem on that partition
It is easiest to use a Linux Live CD with tools such as gparted [0] to perform steps 2 and 3.

[0] https://gparted.org/livecd.php
 
In the unlikely event this lack of forward capacity planning happens to me (cough, cough) I tend to just add another disk, move existing stuff from /var/lib/docker to that and then make it a sym-link to the new disk.

Of course that means shutting down Docker for a moment... no reboot required, though.

You may want to prune the original disk manually so its free space is reclaimed (fstrim).

Sounds easier than messing with a live CD to me and net storage consumption would be the same.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!