Skip to main content
Formatting
Source Link
AdminBee
  • 23.6k
  • 25
  • 55
  • 77

I had the same problem with Ubuntu 20.04 LTS and this solved the problem for me: https://help.ubuntu.com/community/ResizeEncryptedPartitions

The main steps are:

  1. Boot into live USB

  2. Decrypt your file system.

sudo cryptsetup luksOpen /dev/sda5 crypt1
  1. Get the live CD to recognize (activate) your LVM.
sudo vgscan --mknodes
sudo vgchange -ay
  1. Resize the Crypt.
sudo cryptsetup resize crypt1
  1. Resize the (LVM) Physical Volume.
sudo pvresize /dev/mapper/crypt1
  1. Resize your root (LVM) Logical Volume.

5.1. Unlock the (LVM) Physical Volume.

sudo pvchange -x y /dev/mapper/crypt1

5.2. Resize the (LVM) Physical Volume.

sudo lvresize -l +4G /dev/ubuntu-vg/

Note: Change the +4G to the amount of space you are adding, or +100%FREE to use all of the available space.

5.3. Re-lock the physical volume.

sudo pvchange -x n /dev/mapper/crypt1
  1. Resize the filesystem.
sudo e2fsck -f /dev/mapper/ubuntu--vg-root
sudo resize2fs -p /dev/mapper/ubuntu--vg-root
  1. Reboot
  1. Boot into live USB

  2. Decrypt your file system.

    sudo cryptsetup luksOpen /dev/sda5 crypt1
    
  3. Get the live CD to recognize (activate) your LVM.

    sudo vgscan --mknodes
    sudo vgchange -ay
    
  4. Resize the Crypt.

    sudo cryptsetup resize crypt1
    
  5. Resize the (LVM) Physical Volume.

    sudo pvresize /dev/mapper/crypt1
    
  6. Resize your root (LVM) Logical Volume.

    1. Unlock the (LVM) Physical Volume.

      sudo pvchange -x y /dev/mapper/crypt1
      
    2. Resize the (LVM) Physical Volume.

      sudo lvresize -l +4G /dev/ubuntu-vg/
      

    Note: Change the +4G to the amount of space you are adding, or +100%FREE to use all of the available space.

    1. Re-lock the physical volume.
      sudo pvchange -x n /dev/mapper/crypt1
      
  7. Resize the filesystem.

    sudo e2fsck -f /dev/mapper/ubuntu--vg-root
    sudo resize2fs -p /dev/mapper/ubuntu--vg-root
    
  8. Reboot

I had the same problem with Ubuntu 20.04 LTS and this solved the problem for me: https://help.ubuntu.com/community/ResizeEncryptedPartitions

The main steps are:

  1. Boot into live USB

  2. Decrypt your file system.

sudo cryptsetup luksOpen /dev/sda5 crypt1
  1. Get the live CD to recognize (activate) your LVM.
sudo vgscan --mknodes
sudo vgchange -ay
  1. Resize the Crypt.
sudo cryptsetup resize crypt1
  1. Resize the (LVM) Physical Volume.
sudo pvresize /dev/mapper/crypt1
  1. Resize your root (LVM) Logical Volume.

5.1. Unlock the (LVM) Physical Volume.

sudo pvchange -x y /dev/mapper/crypt1

5.2. Resize the (LVM) Physical Volume.

sudo lvresize -l +4G /dev/ubuntu-vg/

Note: Change the +4G to the amount of space you are adding, or +100%FREE to use all of the available space.

5.3. Re-lock the physical volume.

sudo pvchange -x n /dev/mapper/crypt1
  1. Resize the filesystem.
sudo e2fsck -f /dev/mapper/ubuntu--vg-root
sudo resize2fs -p /dev/mapper/ubuntu--vg-root
  1. Reboot

I had the same problem with Ubuntu 20.04 LTS and this solved the problem for me: https://help.ubuntu.com/community/ResizeEncryptedPartitions

The main steps are:

  1. Boot into live USB

  2. Decrypt your file system.

    sudo cryptsetup luksOpen /dev/sda5 crypt1
    
  3. Get the live CD to recognize (activate) your LVM.

    sudo vgscan --mknodes
    sudo vgchange -ay
    
  4. Resize the Crypt.

    sudo cryptsetup resize crypt1
    
  5. Resize the (LVM) Physical Volume.

    sudo pvresize /dev/mapper/crypt1
    
  6. Resize your root (LVM) Logical Volume.

    1. Unlock the (LVM) Physical Volume.

      sudo pvchange -x y /dev/mapper/crypt1
      
    2. Resize the (LVM) Physical Volume.

      sudo lvresize -l +4G /dev/ubuntu-vg/
      

    Note: Change the +4G to the amount of space you are adding, or +100%FREE to use all of the available space.

    1. Re-lock the physical volume.
      sudo pvchange -x n /dev/mapper/crypt1
      
  7. Resize the filesystem.

    sudo e2fsck -f /dev/mapper/ubuntu--vg-root
    sudo resize2fs -p /dev/mapper/ubuntu--vg-root
    
  8. Reboot

Source Link
Hyperplane
  • 173
  • 1
  • 4

I had the same problem with Ubuntu 20.04 LTS and this solved the problem for me: https://help.ubuntu.com/community/ResizeEncryptedPartitions

The main steps are:

  1. Boot into live USB

  2. Decrypt your file system.

sudo cryptsetup luksOpen /dev/sda5 crypt1
  1. Get the live CD to recognize (activate) your LVM.
sudo vgscan --mknodes
sudo vgchange -ay
  1. Resize the Crypt.
sudo cryptsetup resize crypt1
  1. Resize the (LVM) Physical Volume.
sudo pvresize /dev/mapper/crypt1
  1. Resize your root (LVM) Logical Volume.

5.1. Unlock the (LVM) Physical Volume.

sudo pvchange -x y /dev/mapper/crypt1

5.2. Resize the (LVM) Physical Volume.

sudo lvresize -l +4G /dev/ubuntu-vg/

Note: Change the +4G to the amount of space you are adding, or +100%FREE to use all of the available space.

5.3. Re-lock the physical volume.

sudo pvchange -x n /dev/mapper/crypt1
  1. Resize the filesystem.
sudo e2fsck -f /dev/mapper/ubuntu--vg-root
sudo resize2fs -p /dev/mapper/ubuntu--vg-root
  1. Reboot