Why does df -h produce a different disk size than in XO / XOA?
-
Something doesn't seem quite right here.
I originally setup XOA VM via XCP-ng Center. Then I setup XO VM via XOA VM.
Originally XO VM had 40GB Disk Size.
I've tried re-sizing the XO VM Disk via XCP-ng Center and also XOA - but both XO and XOA show 45GB disk size, yet the basic df -h command still shows ~40GB.
Something doesn't seem to be flowing through quite as it should under the hood.
Any ideas while I'm off to investigate to see what could be going on?
-
Increasing VM disk size from XCP-ng center/XO only makes the block device larger, partition and filesystem (what you see in df output) won’t resize automatically, you need to do it manually inside the VM.
-
@ronivay I see. I was having a test of resizing the partition and file system the other day and the guide I was following online for Debian 10 didn't seem to do anything when I followed the guide.
Perhaps I just found a bad guide. I'll do some more Googling now I know that I need to perform these additional steps.
I assumed that it was simply a case of expanding the disk attached to the VM within XO/XOA then everything else was taken care of.
-
There's no black magic As @ronivay said, you need to tell the filesystem inside your VM that the disk grew.
On Cloudinit-enabled VM, there's an auto-grow parameter that is checking at each boot if the disk was extended, and will automatically do it for you. But again, that's inside the VM. Keep in mind: it's not the job of the virtualization system to deal with what's inside the VM