How to resize LUKS encrypted partition?

I’m not familiar with LUKS, just for some reasons I have to encrypt my disk partition, I followed the wiki here Yubikey based Full Disk Encryption (FDE) on NixOS . But now I don’t know how to resize the encrypted partition. The LVM page on NixOS Wiki also didn’t tell me how to resize the disk. I hope someone can help me, regards.

What is your partition layout? What do you want to change? If you followed that guide exactly, your LUKS is as big as it can be, so I assume you ignored at least this:

  • Partition 2: This will be the Luks-encrypted partition, aka the “luks device”: Rest of your disk

I am not sure is that reference is allowed in these circles :sweat_smile: …but the Arch Linux wiki has a more comprehensive article on resizing LVM on LUKS: Resizing LVM-on-LUKS - ArchWiki

Needless to say, from first glance, I would not recommend this just for fun. I am also not sure how exactly this might be applied to your very specific setup.