Extend local-lvm proxmox

Vicemi

New Member
Oct 28, 2022
2
0
1
I have recently changed the NVME of my proxmox server, before I had a 1tb NVME and now I have changed it for a 2tb, what happens is that I have cloned everything from the 1tb disk to the 2tb disk, but proxmox still recognizes the local-lvm as 1tb, and I want to expand it and put more storage.

pvs:

Code:
PV             VG  Fmt  Attr PSize    PFree
  /dev/nvme1n1p3 pve lvm2 a--  <953.37g    0


vgs:

Code:
VG  #PV #LV #SN Attr   VSize    VFree
  pve   1   4   0 wz--n- <953.37g    0


lvs:

Code:
LV            VG  Attr       LSize    Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  data          pve twi-aotz-- <832.70g             94.35  3.48                           
  root          pve -wi-ao----   96.00g                                                   
  swap          pve -wi-ao----    8.00g                                                   
  vm-100-disk-0 pve Vwi-aotz--  900.00g data        87.29


lsblk:

Code:
NAME                         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                            8:0    0 447.1G  0 disk
└─sda1                         8:1    0 447.1G  0 part /mnt/pve/ssd1
sdb                            8:16   0 931.5G  0 disk
├─sdb1                         8:17   0 931.5G  0 part /mnt/pve/disco3
└─sdb2                         8:18   0  1007K  0 part
nvme1n1                      259:0    0   1.8T  0 disk
├─nvme1n1p1                  259:1    0  1007K  0 part
├─nvme1n1p2                  259:2    0   512M  0 part /boot/efi
└─nvme1n1p3                  259:3    0   1.8T  0 part
  ├─pve-swap                 253:0    0     8G  0 lvm  [SWAP]
  ├─pve-root                 253:1    0    96G  0 lvm  /
  ├─pve-data_tmeta           253:2    0   8.3G  0 lvm 
  │ └─pve-data-tpool         253:4    0 832.7G  0 lvm 
  │   ├─pve-data             253:5    0 832.7G  1 lvm 
  │   └─pve-vm--100--disk--0 253:6    0   900G  0 lvm 
  └─pve-data_tdata           253:3    0 832.7G  0 lvm 
    └─pve-data-tpool         253:4    0 832.7G  0 lvm 
      ├─pve-data             253:5    0 832.7G  1 lvm 
      └─pve-vm--100--disk--0 253:6    0   900G  0 lvm 
nvme0n1                      259:4    0 447.1G  0 disk
└─nvme0n1p1                  259:6    0 447.1G  0 part /mnt/pve/nvme1
 
I see that your underlying partition is already in the correct size (1.8T)

Now you can resize the filesystem.

You can view the state of the pysical volume (PV) with

Code:
pvs

You need to resize the PV with
Code:
pvresize /dev/nvme1n1p3

now the logical volume (LV) has free space to grow as shown with:

Code:
vgs

To resize the LV to the full size of the PV

Code:
lvextend -l "+100%FREE" /dev/pve/data

also interesting in this context:

Code:
pvdisplay
vgdisplay
lvdisplay
 

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!