Summary
I'm attempting to extend partition with LVM on it and its failing... All Googles and Bings have failed so unsure where the issue lies. Here is what's happened so far.
This is a virtual server that was given 8GB of Storage. It hit its cap after the application was applied (and ran out of space during updates and downloads). It only required 4GB more, so applied 4GB (VirtIO). This was detected by the OS and I used fdisk to get VDA3 from 8GB to 12GB, but the LVM will not extend.
Original Issue (6.2G FULL)
admin@host:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 63.3M 1 loop /snap/core20/1778
loop1 7:1 0 63.2M 1 loop /snap/core20/1738
loop2 7:2 0 79.9M 1 loop /snap/lxd/22923
loop3 7:3 0 103M 1 loop /snap/lxd/23541
loop4 7:4 0 49.6M 1 loop /snap/snapd/17883
loop5 7:5 0 49.8M 1 loop /snap/snapd/17950
vda 252:0 0 12G 0 disk
├─vda1 252:1 0 1M 0 part
├─vda2 252:2 0 1.8G 0 part /boot
└─vda3 252:3 0 6.2G 0 part
└─ubuntu--vg-ubuntu--lv 253:0 0 6.2G 0 lvm /
Partition
sudo fdisk /dev/vda
command: p
command: d, 3
command: n, 3, #default, #default, n
command: w
New Output (10.2GB on VDA3, not LVM)
admin@host:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 63.3M 1 loop /snap/core20/1778
loop1 7:1 0 79.9M 1 loop /snap/lxd/22923
loop2 7:2 0 49.6M 1 loop /snap/snapd/17883
loop3 7:3 0 49.8M 1 loop /snap/snapd/17950
loop4 7:4 0 103M 1 loop /snap/lxd/23541
loop5 7:5 0 63.2M 1 loop /snap/core20/1738
vda 252:0 0 12G 0 disk
├─vda1 252:1 0 1M 0 part
├─vda2 252:2 0 1.8G 0 part /boot
└─vda3 252:3 0 10.2G 0 part
└─ubuntu--vg-ubuntu--lv 253:0 0 6.2G 0 lvm /
admin@host:~$ sudo vgdisplay
--- Volume group ---
VG Name ubuntu-vg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 1
Act PV 1
VG Size <6.25 GiB
PE Size 4.00 MiB
Total PE 1599
Alloc PE / Size 1599 / <6.25 GiB
Free PE / Size 0 / 0
VG UUID o7ksYe-qxbY-CmVj-A5le-qjG0-IYQt-aQgzlB
Issue
Here is where I'm stuck. Every guide, post and forum I've been digging into has failed. I'm assuming at some point its supposed to show FREE PE / Size is supposed to be detected, but nothing ever gives up the extra space from the partition.
Attempts
rebooting | nothing changes.
partprobe | nothing changes.
resize2fs /dev/vda3 | error:
- resize2fs 1.46.5 (30-Dec-2021)
- resize2fs: Device or resource busy while trying to open /dev/vda3
- Couldn't find valid filesystem superblock.
Note: This is supposed to be the next step after the partition resize (from my guidance when starting this). I also attempted to do it on the LVM and got "The filesystem is already 1637376 (4k) blocks long. Nothing to do!"
sudo lvextend -r -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv | Error: /etc/lvm/archive/.lvm_host_3409_915866633: write error failed: No space left on device
sudo pvresize /dev/vda3
/etc/lvm/archive/.lvm_host_10938_2037765275: write error failed: No space left on device
0 physical volume(s) resized or updated / 1 physical volume(s) not resized
I'm not new to Linux, but far from a pro... Thanks to anyone in advance that reads and assists :3
// Requested Outputs
admin@host:~$ sudo lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
ubuntu-lv ubuntu-vg -wi-ao---- <6.25g