0

Please help me , when I try to increase the partition size in LVM, but when I try it doesn’t work, I do the following:

  df -h

Filesystem Size Used Avail Use% Mounted on udev 3.9G 0 3.9G 0% /dev tmpfs 795M 1.3M 794M 1% /run /dev/mapper/ubuntu--vg-ubuntu--lv 244G 113G 121G 49% /

sudo lvextend --resizefs -l +100%FREE ubuntu-vg/ubuntu-lv

Size of logical volume ubuntu-vg/ubuntu-lv unchanged from <248.00 GiB (63487 extents). Logical volume ubuntu-vg/ubuntu-lv successfully resized. resize2fs 1.45.5 (07-Jan-2020) The filesystem is already 65010688 (4k) blocks long. Nothing to do!

df -h

Filesystem Size Used Avail Use% Mounted on /dev/mapper/ubuntu--vg-ubuntu--lv 244G 113G 121G 49% /

sudo vgs VG #PV #LV #SN Attr VSize VFree ubuntu-vg 1 1 0 wz--n- <248.00g 0

lsblk

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT loop0 7:0 0 63.5M 1 loop /snap/core20/1974 loop1 7:1 0 63.5M 1 loop /snap/core20/2015 loop2 7:2 0 91.9M 1 loop /snap/lxd/24061 loop3 7:3 0 40.9M 1 loop /snap/snapd/20290 loop4 7:4 0 40.9M 1 loop /snap/snapd/20092 sda 8:0 0 250G 0 disk ├─sda1 8:1 0 1M 0 part ├─sda2 8:2 0 2G 0 part /boot └─sda3 8:3 0 248G 0 part └─ubuntu--vg-ubuntu--lv 253:0 0 248G 0 lvm / sr0 11:0 1 1024M 0 rom

sudo vgdisplay --- Volume group --- VG Name ubuntu-vg System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 5 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 <248.00 GiB PE Size 4.00 MiB Total PE 63487 Alloc PE / Size 63487 / <248.00 GiB Free PE / Size 0 / 0 VG UUID Vl06pF-MGCJ-WFC9-Vz45-UCuf-EsEI-9IFP8R

Afterwards everything remains the same. I don't understand what I'm doing wrong. More precisely, I do not have a complete understanding.

2 Answers2

1

The LV is already at its maximum size of approximately 247 GiB and there are no more extents available to allocate:

vgdisplay
--- Volume group ---
VG Name               ubuntu-vg
...
VG Size               <248.00 GiB
PE Size               4.00 MiB
Total PE              63487
Alloc PE / Size       63487 / <248.00 GiB
Free  PE / Size       0 / 0

There is a little over half of the filesystem it contains still unused:

df -h
Filesystem                         Size  Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-ubuntu--lv  244G  113G  121G  49% /
Chris Davies
  • 116,213
  • 16
  • 160
  • 287
0

What a fool I am. For some reason I thought that this was all available, and not how much was left. Such thoughts arose due to an error that there is not enough disk space. But actually everything is fine. Sorry for the nonsense(