Welcome to fdisk (util-linux 2.33.1). Changes will remain in memory only, until you decide to write them. Be careful before using the write command.
Command (m for help): n Partition number (4-128, default 4): First sector (83886047-167772126, default 83886080): Last sector, +/-sectors or +/-size{K,M,G,T,P} (83886080-167772126, default 167772126):
Created a new partition 4 of type 'Linux filesystem' and of size 40 GiB.
Command (m for help):
Command (m for help): p
Disk /dev/sda: 80 GiB, 85899345920 bytes, 167772160 sectors Disk model: VMware Virtual S 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: 58FA54E7-8892-4D0D-BF47-407ED0D1F7CF
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 83886046 82835423 39.5G Linux LVM /dev/sda4 83886080 167772126 83886047 40G Linux filesystem
pvcreate /dev/sda4 Physical volume "/dev/sda4" successfully created. root@kakalong:/dev# vgextend pve /dev/sda4 Volume group "pve" successfully extended root@kakalong:/dev# lvextend -l +100%FREE /dev/pve/root Size of logical volume pve/root changed from 34.62 GiB (8863 extents) to <74.62 GiB (19102 extents). Logical volume pve/root successfully resized. root@kakalong:/dev# lvextend -rl +100%FREE /dev/pve/root Size of logical volume pve/root unchanged from <74.62 GiB (19102 extents). Logical volume pve/root successfully resized. resize2fs 1.44.5 (15-Dec-2018) Filesystem at /dev/mapper/pve-root is mounted on /; on-line resizing required old_desc_blocks = 5, new_desc_blocks = 10 The filesystem on /dev/mapper/pve-root is now 19560448 (4k) blocks long.