Migrating LUKS-encrypted drive to a larger one is actually quite simple if you have
- If the drive is not unlocked, unlock it as usual.
- If the unlocked drive is mounted, unmount it:
sudo umount /path/to/unencrypted-volume
- Figure out the device name:
lsblk, look for type
/dev/sdb, and check which device name is the last one.
- Plug in the new drive and run
lsblkagain, a new device, e.g.
sdchas been added.
- Clone drive
sdc(CAREFUL, ALL DATA WILL BE OVERWRITTEN ON THE TARGET DRIVE!):
time sudo dd if=/dev/sdb of=/dev/sdc bs=64K conv=sync,noerror status=progress
- Afterwards you will have to resize the larger target drive:
sudo gpartedwill open the partition editor.
- Select the target drive that you want to extend. The LUKS partition on that drive will likely have a warning icon right next to the partion name. Using the menu select
Partition > Checkand click the check mark icon to run the check and repair routines.
- After those routines have finished, the partition should be extended.