root@k3s-node-03:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 63.4M 1 loop /snap/core20/1974
loop1 7:1 0 111.9M 1 loop /snap/lxd/24322
loop2 7:2 0 53.3M 1 loop /snap/snapd/19457
loop3 7:3 0 63.5M 1 loop /snap/core20/2015
loop4 7:4 0 40.9M 1 loop /snap/snapd/20290
sda 8:0 0 50G 0 disk
├─sda1 8:1 0 1M 0 part
├─sda2 8:2 0 1.8G 0 part /boot
└─sda3 8:3 0 14.2G 0 part
└─ubuntu--vg-ubuntu--lv 253:0 0 14.2G 0 lvm /
sdb 8:16 0 50G 0 disk
sr0 11:0 1 2G 0 rom
root@k3s-node-03:~#
root@k3s-node-03:~#
root@k3s-node-03:~# vgs
VG #PV #LV #SN Attr VSize VFree
ubuntu-vg 1 1 0 wz--n- <14.25g 0
root@k3s-node-03:~#
root@k3s-node-03:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
ubuntu-lv ubuntu-vg -wi-ao---- <14.25g
root@k3s-node-03:~#
root@k3s-node-03:~# pvs
PV VG Fmt Attr PSize PFree
/dev/sda3 ubuntu-vg lvm2 a-- <14.25g 0
root@k3s-node-03:~#
root@k3s-node-03:~# cfdisk /dev/sda
GPT PMBR size mismatch (33554431 != 104857599) will be corrected by write.
The backup GPT table is not on the end of the device. This problem will be corrected by write.
Syncing disks.
root@k3s-node-03:~#
root@k3s-node-03:~# pvresize /dev/sda3
Physical volume "/dev/sda3" changed
1 physical volume(s) resized or updated / 0 physical volume(s) not resized
root@k3s-node-03:~#
root@k3s-node-03:~# pvs
PV VG Fmt Attr PSize PFree
/dev/sda3 ubuntu-vg lvm2 a-- <48.25g 34.00g
root@k3s-node-03:~#
root@k3s-node-03:~# vgs
VG #PV #LV #SN Attr VSize VFree
ubuntu-vg 1 1 0 wz--n- <48.25g 34.00g
root@k3s-node-03:~#
root@k3s-node-03:~# lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
Size of logical volume ubuntu-vg/ubuntu-lv changed from <14.25 GiB (3647 extents) to <48.25 GiB (12351 extents).
Logical volume ubuntu-vg/ubuntu-lv successfully resized.
root@k3s-node-03:~#
root@k3s-node-03:~# vgs
VG #PV #LV #SN Attr VSize VFree
ubuntu-vg 1 1 0 wz--n- <48.25g 0
root@k3s-node-03:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
ubuntu-lv ubuntu-vg -wi-ao---- <48.25g
root@k3s-node-03:~#
root@k3s-node-03:~# df -hT
Filesystem Type Size Used Avail Use% Mounted on
tmpfs tmpfs 392M 1.4M 390M 1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv ext4 14G 11G 2.6G 82% /
tmpfs tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs tmpfs 5.0M 0 5.0M 0% /run/lock
/dev/sda2 ext4 1.7G 251M 1.4G 16% /boot
tmpfs tmpfs 392M 4.0K 392M 1% /run/user/0
root@k3s-node-03:~#
root@k3s-node-03:~# resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
resize2fs 1.46.5 (30-Dec-2021)
Filesystem at /dev/mapper/ubuntu--vg-ubuntu--lv is mounted on /; on-line resizing required
old_desc_blocks = 2, new_desc_blocks = 7
The filesystem on /dev/mapper/ubuntu--vg-ubuntu--lv is now 12647424 (4k) blocks long.
root@k3s-node-03:~#
root@k3s-node-03:~# df -hT
Filesystem Type Size Used Avail Use% Mounted on
tmpfs tmpfs 392M 1.4M 390M 1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv ext4 48G 11G 35G 24% /
tmpfs tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs tmpfs 5.0M 0 5.0M 0% /run/lock
/dev/sda2 ext4 1.7G 251M 1.4G 16% /boot
tmpfs tmpfs 392M 4.0K 392M 1% /run/user/0
root@k3s-node-03:~#
Post navigation