LVM resize has no effect

I’ve installed LEAP 42.3 on a new clean 2TB drive. During installation I chose LVM option and agreed with the proposed sizes of 10 Gb for /root and 25 Gb for /home, because I didn’t get how to change that numbers during installation process (why the defaults are so small in the first place?!). Now I’m trying to increase sizes of these volumes. I used these commands:

# lvextend -L+20G /dev/system/root
# lvextend -L+2G /dev/system/home

They seemed to work and lvscan conforms it:

lvm> lvscan
  ACTIVE            '/dev/system/home' [27,00 GiB] inherit
  ACTIVE            '/dev/system/root' [30,00 GiB] inherit
  ACTIVE            '/dev/system/swap' [2,00 GiB] inherit

But even after reboot Dolphin keep displaying the same amount of space available for /home and /root as it was before the resize. It was about 1 Gb left for /root before resize and when after resize I try to copy 2 Gb of files to /tmp I receive the message that the storage is full. So in reality available space didn’t increase at all. How can I fix this size issue?

Here is sfdisk output:

:~> sudo sfdisk -l
**Disk /dev/sda: 1,8 TiB, 2000398934016 bytes, 3907029168 sectors**
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x0002b103

**Device****Boot****Start****       End****   Sectors**** Size****Id****Type**
/dev/sda1  *     2048 3907028991 3907026944  1,8T 8e Linux LVM


**Disk /dev/mapper/system-swap: 2 GiB, 2147483648 bytes, 4194304 sectors**
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


**Disk /dev/mapper/system-root: 30 GiB, 32212254720 bytes, 62914560 sectors**
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


**Disk /dev/mapper/system-home: 27 GiB, 28991029248 bytes, 56623104 sectors**
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Enlarging the container of something does not automatically include enlarging what is inside. Thus after you have enlarged the container (LV in this case) you have to extend the file systems on it.

And that is file system type dependent. So consult the man pages for each type you have. Like

man resize2fs
man xfs_growfs
man btrfs

It could be that YaST > System > Partitioner may be of help. But as you already decided to do it with CLI commands it may be better to do all with CLI commands and not trust that YaST understands the “intermediate situation” you now have.

… when reducing the size of a logical volume, you should reduce the size of the file system first; when increasing the size of a logical volume, you should increase the size of the file system last.

Unix and Linux System Administration Handbook 2011

Thanks, guys!

These commands finished the resize:

# sudo xfs_growfs /home
# sudo btrfs filesystem resize max /root