I've installed Kubuntu 20.04 with LVM/encryption, and found out that the installer created a 1GB swap volume (not a file), even though my laptop has 16GB of RAM, and I installed Kubuntu onto a 512GB SSD.
Why wasn't it an option during the installation process, to specify the swap size? Why make a swap volume (which is a pain to resize), instead of swap file, which is very easy to resize?
I do development work and I need 8+GB of swap. Since there's already a swap volume, I don't want to create a separate swap file. But resizing the volume isn't possible, because the root volume is mounted.
Do I have to shut down my system, boot from another device, mount my encrypted volume, then hope I can resize the swap that way? Is there no easier way? lvresize didn't work, and the kvpm GUI has been discontinued after bionic.
$ sudo lvresize /dev/mapper/vgkubuntu-swap_1 -L +7G
Insufficient free space: 1792 extents needed, but only 0 available
I guess it needs the root partition to be shrunk first, but trying to do that throws this scary warning:
$ sudo lvresize /dev/mapper/vgkubuntu-root -L -7G
WARNING: Reducing active and open logical volume to 467.75 GiB.
THIS MAY DESTROY YOUR DATA (filesystem etc.)
Why wasn't it an option during the installation process, to specify the swap size? Why make a swap volume (which is a pain to resize), instead of swap file, which is very easy to resize?
I do development work and I need 8+GB of swap. Since there's already a swap volume, I don't want to create a separate swap file. But resizing the volume isn't possible, because the root volume is mounted.
Do I have to shut down my system, boot from another device, mount my encrypted volume, then hope I can resize the swap that way? Is there no easier way? lvresize didn't work, and the kvpm GUI has been discontinued after bionic.
$ sudo lvresize /dev/mapper/vgkubuntu-swap_1 -L +7G
Insufficient free space: 1792 extents needed, but only 0 available
I guess it needs the root partition to be shrunk first, but trying to do that throws this scary warning:
$ sudo lvresize /dev/mapper/vgkubuntu-root -L -7G
WARNING: Reducing active and open logical volume to 467.75 GiB.
THIS MAY DESTROY YOUR DATA (filesystem etc.)
Comment