I'm facing an issue in my Ubuntu Mate 18.04 system.
I installed the file system in a LVM partition and would like to enlarge the swap space. I followed the instructions here but I get this message when I try to enlarge the partition
Insufficient free space: 512 extents needed, but only 0 available
This is the content of my disk according to fdisk -l
Disk /dev/sda: 232,9 GiB, 250059350016 bytes, 488397168 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: 8F28ED66-4E76-4B77-AB4B-D0AB345E21CA
Device Start End Sectors Size Type
/dev/sda1 2048 1050623 1048576 512M EFI System
/dev/sda2 1050624 488396799 487346176 232,4G Linux LVM
Disk /dev/mapper/ubuntu--mate--vg-root: 231,4 GiB, 248474763264 bytes, 485302272 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
Disk /dev/mapper/ubuntu--mate--vg-swap_1: 996 MiB, 1044381696 bytes, 2039808 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
It seems like there's no free space left on the Physical volume in order to further enlarge the swap partition. If I type
sudo lvresize -l +100%FREE /dev/ubuntu-mate-vg/swap_1
I get
New size (249 extents) matches existing size (249 extents).
Therefore I'd like to shrink a bit (say, 5 Gb) my main partition vg-root and make that space available for swap. But I don't know how to do it :-/ Do you have any suggestion?
Thank you Marco