7

I would like to enlarge my encrypted LVM partition, because I gave my virtual machine Ubuntu 20.04 more hard disk space.

I tried to use Gparted, but it gave an error. I also tried the answer on How to expand an encrypted ubuntu partition with LVM, but sudo lvresize -l +100%FREE /dev/ubuntu-vg/root doesn't work, because /dev/ubuntu-vg/root doesn't exist.

How can I easily enlarge an encrypted partition?

Coanda
  • 232
  • 2
  • 9

2 Answers2

6

I found a solution myself.

Live CD

Launch the live CD and use the option "Try Ubuntu".

Instal Partitionmanager

Make sure the universe software can be downloaded:

  • go to the Activities
  • launch Software & Updates
  • enable universe

Open the terminal and install the Partitionmanager:

sudo apt-get update
sudo apt-get install partitionmanager

Partitionmanager

See also the instructions here: http://e1z.ca/devlog/encrypted_partition_resize.html

Open the partitionmanger with sudo rights:

sudo partitionmanager

Right click on the encrypted volume and unlock.

Resize the partition. You might need to resize the vgubuntu on the left as well.

Coanda
  • 232
  • 2
  • 9
  • 1
    GParted now seems to offer similar functionality, without having to install a chunk of the KDE system in order to run Partitionmanager. – Ray Woodcock Nov 08 '21 at 11:33
  • 1
    Even after resizing vgubuntu, my /home partition was failing to recognize additional space. Any ideas? – jayarjo Nov 13 '21 at 08:29
3
sudo lvresize -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv 

I tab completed it and it worked fine, you just had the path wrong.

Greenonline
  • 2,081