I bought a new larger SSD to replace my old one. The old one has 3 partitions, 2 for booting and a third (last) one with LVM2 on LUKS. I did the following to migrate:
- dd the contents of the old drive to the new one (bs=4M)
- Run partprobe on the new drive (it complained that "Not all of the space available to /dev/sdb appears to be used, you can fix the GPT to use all of the space")
- I used gdisk -> extra functionality -> "relocate backup data structures to the end of the disk"
- At this point, if I opened the partition with cryptsetup, LVM worked fine
- I then resized the third partition with GParted (when I tried to use the whole disk it threw an error that I can't resize it past the size of the disk, so I had to make it 2 MiB smaller than what GParted showed)
- I then opened the now larger partition with cryptsetup and for some reason LVM doesn't detect the LVM physical volume anymore.
Running lvmdiskscan -v:
/dev/mapper/crypt_ssd [930,76 GiB] LVM physical volume
Running pvdisplay /dev/mapper/crypt_ssd
Failed to find physical volume "/dev/mapper/crypt_ssd".
Where did I screw up? lvscan doesn't do anything.