I installed debian stretch using encrypted lvm from the installer on a usb drive.
during installation, with all disks connected, sdo5 is assigned to my boot disk. when running the full system, my boot disk is now assigned sdn5
this is problematic, because I have an encrypted data disk that shows up as sdo1, as per blkid.
I need to change the crypt configuration and initramfs to look for sdn, so that sdo is free. how can I do that?
simply changing the crypttab and running update-initramfs -u -k all gives an error about invalid line in crypttab and then the system will not boot.
cryptsetup: WARNING: invalid line in /etc/crypttab for sdo5_crypt
there must be another step. where is sdo5_crypt referenced other than crypttab?
my crypttab is as follows:
sdo5_crypt UUID=long_string_here none luks
and my fstab is:
/dev/mapper/coldstorage--vg-root / ext4 errors=remount-ro 0 1
# /boot was on /dev/sdo1 during installation
UUID=long_string_here /boot ext2 defaults 0 2
/dev/mapper/coldstorage--vg-swap_1 none swap sw 0 0
EDIT:
I can see there is a lingering /dev/mapper/sdo5_crypt even when I reboot after changing crypttab but not updating initramfs (which causes the system to request the password for sdn5)
If I can rename that, it might be enough? lvrename does not seem to work.
# ls /dev/mapper/
control sdo5_crypt coldstorage--vg-root coldstorage--vg-swap_1
result of pvdisplay
--- Physical volume ---
PV Name /dev/mapper/sdo5_crypt
VG Name coldstorage-vg
and attempt to fix... # pvmove /dev/mapper/sdo5_crypt /dev/mapper/sdn5_crypt Physical Volume "/dev/mapper/sdn5_crypt" not found in Volume Group "coldstorage-vg".