Skip to main content
3 of 4
added 31 characters in body
Antti Haapala
  • 1.2k
  • 10
  • 11

For those that come to the answer to find out how to simply resize a LUKS partition to the size of the resized container, the commands are as follows:

  • with LUKS encrypted volume opened and the opened volume mapped as opened-volume, execute

    sudo cryptsetup resize /dev/mapper/opened-volume
    
  • then resize the file system. E.g. if it is an Ext4 filesystem, you can resize it even if it is mounted with

    sudo resize2fs /dev/mapper/opened-volume
    

I did both commands with a mounted file system with no interruption; it was possible to resize the container without unmounting it first because the encrypted volume was on a LVM logical volume (using lvresize)!

Antti Haapala
  • 1.2k
  • 10
  • 11