Expand luks encrypted filesystems

umount /crypto
fsck.ext4 -C 0 -f /dev/mapper/crypto
cryptsetup luksClose crypto
lvextend -L +100M /dev/cryptovg/crypto
cryptsetup luksOpen /dev/cryptovg/crypto crypto
cryptsetup -v resize crypto
fsck.ext4 -f /dev/mapper/crypto
resize4fs /dev/mapper/crypto (you’ll need to install e4fsprogs to use resize4fs)
fsck.ext4 -f /dev/mapper/crypto
mount /dev/mapper/crypto /crypto

3 thoughts on “Expand luks encrypted filesystems

  • I think the posts you have about LUKS is great except for one typo….you can’t use -l with the +100M option those are for extents you need the -L +100M. But I am definitely using your posts to prepare more for the exam…Thanks!!

    • Thank you for pointing out the typo! Concerning the resize4fs I did not mention it because the 16TB bug was only fixed in RHEL 6.1.

Leave a Reply

Your email address will not be published. Required fields are marked *

*


Hit Counter provided by laptop reviews