Skip to content

Instantly share code, notes, and snippets.

@loveJesus
Created August 29, 2021 16:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save loveJesus/dc31fef8be39457bce959cf195dfb51a to your computer and use it in GitHub Desktop.
Save loveJesus/dc31fef8be39457bce959cf195dfb51a to your computer and use it in GitHub Desktop.
Praise Jesus - Extend a LUKS partition (in my case worked on the live root partition, backup beforehand has been recommended)
# Thank You Jesus for https://semanticlab.net/sysadmin/encryption/How-to-resize-a-LUKS-encrypted-root-partition/
resize with fdisk
# resize the LUKS parititon (dm_crypt-3)
cryptsetup resize dm_crypt-3
# resize the physical device on top of it
pvresize /dev/mapper/dm_crypt-3
# resize the logical device (epiphany-root)
lvextend -l +100%FREE /dev/mapper/epiphany-root
# grow the file system accordingly
resize2fs /dev/mapper/epiphany-root
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment