GParted doesn’t find partition in encrypted drive

gparted

I need to make my partition bigger, but when I launch GParted to do so it only detects two partitions. One holding the Grub, and one just being my main 1TB hard-drive.

However, in my Dolphin file manager you see I have another 9.3 GiB partition. That one needs to be expanded otherwise I won't be able to install things anymore. But GParted doesn't find it.

I hope it ain't a problem the partition is encrypted?

enter image description here

Best Answer

(The following assumes that your distribution uses sudo to run commands as the superuser; if that's not the case, then become superuser with su - and omit the sudo.)

  1. Boot from the installation media.
  2. Start a live session.
  3. Open a terminal.
  4. Open the encrypted partition using cryptsetup:

    sudo cryptsetup luksOpen /dev/sda5 sda5_crypt
    
  5. Check that the logical volumes have been autodiscovered using lvs:

    sudo lvs -o full_name,size
    

    If they have not been autodiscovered force a LVM rescan with vgchange:

    sudo vgchange -aay
    
  6. Examine the size of the LVM physical volume with pvs:

    sudo pvs
    
  7. If there is no free space, then extend the physical volume to cover the partition with

    sudo pvresize /dev/mapper/sda5_crypt
    
  8. Examine the size of the logical volumes with

    sudo lvs -o full_name,size
    
  9. You can now resize individual LVM logical volumes using lvresize.

    sudo lvresize --resizefs --size ‹size› ‹logicalvolume›

    • ‹size› is in MiB by default; use nG for GiB; see the manual page for details.
    • ‹logicalvolume› is the name as given by lvs -o fullname.
Related Question