Hi all, I initially set up a Proxmox running inside ESXi with a small drive and would like to expand it now (64gb > 80gb). In ESXi, I increased the size of the hard drive for Proxmox. I'm not sure what to do inside Proxmox, however. I was reading a few threads online and ran a command (which I forgot), and it expanded it a little bit, but not what I expected. Someone instructed me to use a gparted live CD, so I used that and was able to expand the physical volume to 80GB.
Of note, I only have one VM running in Proxmox and current has 37GB hard drive size. It was 32GB and I increased the size to 37GB. But I would like to learn how to increase the size of /data/ (or pve-data) for more space for VMs. I have used ESXi mostly in the past, so the partition structure and commands in Proxmox are unfamiliar to me, and the LVM structure is unafaimilar. Thank you.
Code:
root@pve:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 80G 0 disk
├─sda1 8:1 0 1007K 0 part
├─sda2 8:2 0 512M 0 part
└─sda3 8:3 0 79.5G 0 part
├─pve-swap 253:0 0 4G 0 lvm [SWAP]
├─pve-root 253:1 0 15.8G 0 lvm /
├─pve-data_tmeta 253:2 0 1G 0 lvm
│ └─pve-data-tpool 253:4 0 41.8G 0 lvm
│ ├─pve-data 253:5 0 41.8G 0 lvm
│ ├─pve-vm--100--disk--0 253:6 0 37G 0 lvm
│ ├─pve-vm--100--disk--1 253:7 0 4M 0 lvm
│ └─pve-vm--100--state--suspend--2021--03--21 253:8 0 8.5G 0 lvm
└─pve-data_tdata 253:3 0 41.8G 0 lvm
└─pve-data-tpool 253:4 0 41.8G 0 lvm
├─pve-data 253:5 0 41.8G 0 lvm
├─pve-vm--100--disk--0 253:6 0 37G 0 lvm
├─pve-vm--100--disk--1 253:7 0 4M 0 lvm
└─pve-vm--100--state--suspend--2021--03--21 253:8 0 8.5G 0 lvm
sr0 11:0 1 1024M 0 rom
root@pve:~# pvdisplay
--- Physical volume ---
PV Name /dev/sda3
VG Name pve
PV Size <79.50 GiB / not usable 1.98 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 20351
Free PE 4096
Allocated PE 16255
PV UUID eKtf2H-1zxT-PmVZ-Mq2F-HIQs-c3tv-IlxgLD
root@pve:~# lvscan
ACTIVE '/dev/pve/swap' [4.00 GiB] inherit
ACTIVE '/dev/pve/root' [15.75 GiB] inherit
ACTIVE '/dev/pve/data' [<41.75 GiB] inherit
ACTIVE '/dev/pve/vm-100-disk-0' [37.00 GiB] inherit
ACTIVE '/dev/pve/vm-100-disk-1' [4.00 MiB] inherit
ACTIVE '/dev/pve/vm-100-state-suspend-2021-03-21' [<8.49 GiB] inherit
root@pve:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
data pve twi-aotz-- <41.75g 85.47 3.34
root pve -wi-ao---- 15.75g
swap pve -wi-ao---- 4.00g
vm-100-disk-0 pve Vwi-a-tz-- 37.00g data 96.43
vm-100-disk-1 pve Vwi-a-tz-- 4.00m data 3.12
vm-100-state-suspend-2021-03-21 pve Vwi-a-tz-- <8.49g data 0.00
root@pve:~# fdisk -l
Disk /dev/sda: 80 GiB, 85899345920 bytes, 167772160 sectors
Disk model: Virtual disk
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: E1C1E873-0841-435E-B7F8-1BA20DF0BF28
Device Start End Sectors Size Type
/dev/sda1 34 2047 2014 1007K BIOS boot
/dev/sda2 2048 1050623 1048576 512M EFI System
/dev/sda3 1050624 167772126 166721503 79.5G Linux LVM
Disk /dev/mapper/pve-swap: 4 GiB, 4294967296 bytes, 8388608 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/pve-root: 15.8 GiB, 16911433728 bytes, 33030144 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/pve-vm--100--disk--0: 37 GiB, 39728447488 bytes, 77594624 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 65536 bytes / 65536 bytes
Disklabel type: gpt
Disk identifier: C65A35F5-9AA9-4E4C-9B82-1AB9F7E84198
Device Start End Sectors Size Type
/dev/mapper/pve-vm--100--disk--0-part1 40 409639 409600 200M EFI System
/dev/mapper/pve-vm--100--disk--0-part2 409640 77594583 77184944 36.8G unknown
Partition 1 does not start on physical sector boundary.
Partition 2 does not start on physical sector boundary.
Disk /dev/mapper/pve-vm--100--disk--1: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 65536 bytes / 65536 bytes
Disk /dev/mapper/pve-vm--100--state--suspend--2021--03--21: 8.5 GiB, 9114222592 bytes, 17801216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 65536 bytes / 65536 bytes