Score:1

lvresize command doesn't increase size of lvm

bt flag

This is my output of lsblk:

 lsblk
NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0          7:0    0  63.3M  1 loop /snap/core20/1828
loop1          7:1    0  63.3M  1 loop /snap/core20/1852
loop2          7:2    0  67.2M  1 loop /snap/lxd/21835
loop3          7:3    0  91.9M  1 loop /snap/lxd/24061
loop4          7:4    0  49.9M  1 loop /snap/snapd/18357
loop5          7:5    0  49.9M  1 loop /snap/snapd/18596
loop6          7:6    0   3.1G  0 loop /var/tmp
sda            8:0    0   155G  0 disk
├─sda1         8:1    0   1.1G  0 part /boot/efi
└─sda2         8:2    0 138.7G  0 part
  └─vg0-root 253:0    0    74G  0 lvm  /
sr0           11:0    1  1024M  0 rom

but when I want to increase lvm size to max of sda2 it shows Nothing to do message:

root:~# sudo lvresize -tvl +100%FREE /dev/mapper/vg0-root
  TEST MODE: Metadata will NOT be updated and volumes will not be (de)activated.
  Converted 100%FREE into at most 0 physical extents.
  New size (18930 extents) matches existing size (18930 extens).

root:~# sudo lvresize -vl +100%FREE /dev/mapper/vg0-root
  Converted 100%FREE into at most 0 physical extents.
  New size (18930 extents) matches existing size (18930 extents).
root:~# sudo resize2fs -p /dev/mapper/vg0-root

resize2fs 1.45.5 (07-Jan-2020)
The filesystem is already 19384320 (4k) blocks long.  Nothing to do!

updated

# vgdisplay
  --- Volume group ---
  VG Name               vg0
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  4
  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               <73.95 GiB
  PE Size               4.00 MiB
  Total PE              18930
  Alloc PE / Size       18930 / <73.95 GiB
  Free  PE / Size       0 / 0
  VG UUID               anzb9z-z1ML-h0xn-21Eq-WvLn-Pgpl-NwH5OR
hr flag
I wonder if the physical volume doesn't extend across the whole partition (maybe because the partition was resized after the volume was `pvcreate`d)? Perhaps it would be helpful to add the output of `vgdisplay` to your question.
S.M Emamian avatar
bt flag
@steeldriver updated my question.
hr flag
I’m voting to close this question because it's been cross-posted and answered [here](https://unix.stackexchange.com/questions/741427/lvresize-command-doesnt-increase-size-of-lvm)
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.