I need help to resize my LV: /dev/mapper/ubuntu--vg-ubuntu--lv
The ubuntu installation is a VM, and the disk has been expanded from 8 GB to 11 GB. How do I resize / expand the /dev/mapper/ubuntu--vg-ubuntu--lv volume?
sudo pvdisplay:
--- Physical volume ---
PV Name /dev/vda3
VG Name ubuntu-vg
PV Size 8.46 GiB / not usable 3.00 MiB
Allocatable yes
PE Size 4.00 MiB
Total PE 2166
Free PE 503
Allocated PE 1663
PV UUID fhw3L2-RTCL-wu3w-WovP-6pGF-iQjv-tujWKE
sudo vgdisplay:
--- Volume group ---
VG Name ubuntu-vg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
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 8.46 GiB
PE Size 4.00 MiB
Total PE 2166
Alloc PE / Size 1663 / <6.50 GiB
Free PE / Size 503 / 1.96 GiB
VG UUID ZTcc3J-A3jZ-olN4-rFGR-h40F-wqFD-c3hmCn
sudo lvdisplay:
LV Path /dev/ubuntu-vg/ubuntu-lv
LV Name ubuntu-lv
VG Name ubuntu-vg
LV UUID Q31Qia-F92v-te0V-P1fH-4SXv-3uB8-4889p0
LV Write Access read/write
LV Creation host, time ubuntu-server, 2021-10-02 09:59:32 +0200
LV Status available
# open 1
LV Size <6.50 GiB
Current LE 1663
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0
More info added:
GPT PMBR size mismatch (20971519 != 23068671) will be corrected by write.
The backup GPT table is not on the end of the device. This problem will be corrected by write.
Disk /dev/vda: 11 GiB, 11811160064 bytes, 23068672 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
Disklabel type: gpt
Disk identifier: 07C77B10-B73C-442D-9F03-A422017A6AE9
Device Start End Sectors Size Type
/dev/vda1 2048 1050623 1048576 512M EFI System
/dev/vda2 1050624 3147775 2097152 1G Linux filesystem
/dev/vda3 3147776 20899839 17752064 8.5G Linux filesystem
Disk /dev/mapper/ubuntu--vg-ubuntu--lv: 6.51 GiB, 6975127552 bytes, 13623296 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
When I try sudo lvextend -l 100%VG ubuntu-vg/ubuntu-lv
I get:
/etc/lvm/archive/.lvm_outlineserver_26853_1055914493: write error
failed: No space left on device
And when I try sudo fdisk -l /dev/mapper/ubuntu--vg-ubuntu--lv
:
Disk /dev/mapper/ubuntu--vg-ubuntu--lv: 6.51 GiB, 6975127552 bytes,
13623296 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
and last when I try sudo resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
I get:
resize2fs 1.45.5 (07-Jan-2020) The filesystem is already 1702912 (4k)
blocks long. Nothing to do!