[SOLVED] How to resize an LVM thin pool to make space for the pve/root LV in order to be able to run upgrade to PVE9?

8192K

Member
Apr 12, 2024
52
6
8
Code:
sda                            8:0    0 119.2G  0 disk
├─sda1                         8:1    0  1007K  0 part
├─sda2                         8:2    0     1G  0 part /boot/efi
└─sda3                         8:3    0 118.2G  0 part
  ├─pve-swap                 252:0    0     8G  0 lvm  [SWAP]
  ├─pve-root                 252:1    0   8.5G  0 lvm  /
  ├─pve-data_tmeta           252:2    0     1G  0 lvm 
  │ └─pve-data-tpool         252:4    0  99.7G  0 lvm 
  │   ├─pve-data             252:5    0  99.7G  1 lvm 
  │   └─pve-vm--100--disk--0 252:6    0     2G  0 lvm 
  └─pve-data_tdata           252:3    0  99.7G  0 lvm 
    └─pve-data-tpool         252:4    0  99.7G  0 lvm 
      ├─pve-data             252:5    0  99.7G  1 lvm 
      └─pve-vm--100--disk--0 252:6    0     2G  0 lvm
This is my drive layout. sda3 is the LVM proxmox set up during install and I gave the pve/root LV only 8.5GB as it seemed more than enough. Now I wish to upgrade to PVE9 and it does not seem there's enough free space (only 3.9GB) to be able to execute the installation via apt.

How can I adjust the LVM structure so the pve/root LV can increase to a size of 14GB? I do not have physical access to the machine nor can I use the web interface. Only SSH.
 
Try "lvreduce -L 92G pve/data" which sets an *absolut* new size !! Then
"lvresize --size 16g pve/root"
"resize2fs /dev/mapper/pve-root"
 
  • Like
Reactions: cnado
And that's possible to do via SSH? Wouldn't I have to boot into a live environment for this to work?
 
No, ssh into pve and do the 3 cmd's one after the other as long as you don't get an error before.
 
First command returns "Thin pool volumes pve/data_tdata cannot be reduced in size yet".