Is it safe to use GParted to resize my Proxmox partitions?

vonhabsi

New Member
Oct 28, 2024
5
0
1
I've installed Proxmox on a cloud VM with 200GB of space and I think I dedicated too much space to the `local` partition, rather than the `local-lvm` where it seems Proxmox prefers to install the VM disks.

This is sample output from `parted -l` and it seems the disks I want to resize are
Code:
dev/mapper/pve-root: 64.2GB
and
Code:
Disk /dev/mapper/pve-data: 121GB
. I want to shrink the `pve-root` partition and create more space for the `pve-data` partition.

Will it be safe to use GParted for the resizing?

From what I see those labelled like
Code:
Model: Linux device-mapper (thin) (dm) Disk /dev/mapper/pve-vm--101--disk--0: 21.5GB
are the disks used by the VMs and are allocated from the `local-lvm` partition which is where I need more space.

Is it OK to use the `local` partition for VMs? It seems that is where the templates and ISOs are stored.

Code:
Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/pve-data_tmeta: 1237MB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags: 

Model: Linux device-mapper (thin-pool) (dm)
Disk /dev/mapper/pve-data-tpool: 121GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  93.6GB  93.6GB  primary
 2      93.6GB  107GB   13.7GB  primary


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/pve-data: 121GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  93.6GB  93.6GB  primary
 2      93.6GB  107GB   13.7GB  primary


Model: Linux device-mapper (thin) (dm)
Disk /dev/mapper/pve-vm--101--disk--0: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags: 

Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/pve-data_tdata: 121GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  93.6GB  93.6GB  primary
 2      93.6GB  107GB   13.7GB  primary


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/pve-root: 64.2GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags: 

Number  Start  End     Size    File system  Flags
 1      0.00B  64.2GB  64.2GB  ext4
 
No, you don't need gparted as it's already lvm you just can use lvm cmd's, see lvresize and lvextend, lvs, lvdisplay etc to do so.
 
  • Like
Reactions: vonhabsi
No, you don't need gparted as it's already lvm you just can use lvm cmd's, see lvresize and lvextend, lvs, lvdisplay etc to do so.
Can these commands be run on the live system or will I have to boot into some kind of rescue mode before running them?

It is possible to unmount the disks in the live system before executing them?
 
Yes, just manipulate lvm's in live pve and no reboot required.
You just mounted root and you cannot umount that, the other are lvm-thin volumes without filesystem and so not mounted.
 
  • Like
Reactions: vonhabsi
Let me save you a trip down the LVM rabbit hole. If you need to resize, back everything up and reinstall Proxmox with the desired sizes.
Redo your network and storage, and restore all VM/LXC. Thank me later.

Otherwise you risk possible data corruption if you're not used to resizing LVM from commandline. It's very hard to visualize an LVM layout with just the commandline tools.

Alternative: Make a standalone "portable" proxmox on a USB stick / SD card / external SSD, and install Webmin (runs on port 10000) and WeLees for graphical LVM management. You will also have the same level of ZFS support with this solution, and pretty much guaranteed no VM stuff / open files will be running when you resize.

If you already have an rpool, you will want to make the portable ext4 (and possibly vice versa, for convenience; but ext4 will be universal)

https://webmin.com/docs/modules/logical-volume-management/

https://www.welees.com/visual-lvm.html

https://pve.proxmox.com/wiki/Developer_Workstations_with_Proxmox_VE_and_X11
 
Last edited:

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!