Increase disk space -vm

Sep 17, 2020
315
20
38
Hello All,

I'm running the MGW on VMWare and have increased the capacity of the disk within VMware.

My Environment:
lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 0 70G 0 disk ├─sda1 8:1 0 1007K 0 part ├─sda2 8:2 0 512M 0 part └─sda3 8:3 0 39.5G 0 part ├─pmg-swap 253:0 0 4G 0 lvm [SWAP] └─pmg-root 253:1 0 35.5G 0 lvm / sr0 11:0 1 1024M 0 rom

I have tried a few different methods to try and increase disk space without success.
The partition is reflecting its new overall size, but I cant grow it... any info appreciated.
 
have tried a few different methods to try and increase disk space without success.
The partition is reflecting its new overall size, but I cant grow it... any info appreciated.
The thing that has been resized is the disk in VMWare (/dev/sda ) - now you need to resize the partition (/dev/sda3), using something like `parted` or `gdisk`, then the physical volume of the volumegroup (pvresize /dev/sda3), then you need to resize the root LV - `lvresize -l 100%VG pmg/root)

Please look for a tutorial on this online - there's tons around and it's not really specific to PMG

I hope this helps!
 
Hi Stoiko,

I have successfully expanded disks on Centos & AWS w/EXT4 & XFS, but for some reason, not happening here under my PMG box.
I tried looking for anything potentially geared towards PMG/PVE but no luck.
 
Answer: I was able to resolve this by installing parted to assist in the expanding of the partition which was apparently where I was getting stuck.

lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS sda 8:0 0 70G 0 disk ├─sda1 8:1 0 1007K 0 part ├─sda2 8:2 0 512M 0 part └─sda3 8:3 0 69.5G 0 part ├─pmg-swap 253:0 0 4G 0 lvm [SWAP] └─pmg-root 253:1 0 65.5G 0 lvm / sr0 11:0 1 1024M 0 rom
 
  • Like
Reactions: Stoiko Ivanov
I've followed steps above successfully on a temporary/test deployment of mail gateway 7.3-8 and successfully increased swap and root but even after multiple reboots the GUI dashboard still shows original sizes. How do I get the GUI to reflect the true space as confirmed successfully increased from the CLI? Any ideas?

VM deployment with a single virtual disk (VMware environment). Increased virtual disk to 100GB and used parted etc etc .... so everything looks successfully increased on CLI. Just super odd the GUI is not updating.
 
Last edited:
If EXT4 partition
growpart /dev/xvda 1
resize2fs /dev/xvda1

If XFS partition
growpart /dev/xvda 1
xfs_growfs /dev/xvda1

Sorry, replace xvda with your drive details :)
 

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!