I've not done it with NVMe, but I have with SATA HDDs and SATA SSDs. My notes:
Code:
# This is NOT a script. It is manual steps for opening a LUKS encrypted
# partition and looking for LVM LVs inside, which can be mounted and
# accessed for any needs.
# Whenever using encryption, backups that can be restored perfectly are
# mandatory. Any physical or logical issue with LUKS can completely
# destroy all access.
# Convenience variables - change for your needs
DEV=/dev/sdz5
PV=c7205467
# Need to install a few packages if a "Try Ubuntu" desktop environment
# is being used. This also could apply to a recovery system boot.
sudo apt install lvm2 cryptsetup-bin
# Open the container
# Must know the passphrase to unlock the LUKS encrypted
# container. This is usually just inside a full partition.
# The options may be deprecated on newer OSes.
sudo cryptsetup luksOpen $DEV $PV
# Activate the LVM VGs
# LVM2 is used with Ubuntu full disk encryption. -ay order matters.
sudo vgchange -ay
# Create some temporary mount points.
# A mount point is just an empty directory
sudo mkdir /mnt/slash /mnt/home /mnt/Stuff
# Use lsblk to get a list of the LVs available
lsblk -e 7 -o name,size,type,fstype,mountpoint
# Using the found LVs, mount them somewhere
sudo mount /dev/mapper/$PV*home /mnt/home
sudo mount /dev/mapper/$PV*Stuff /mnt/Stuff
# if the storage doesn't mount, perhaps run an fsck on the LV devices.
# access the storage as needed. Probably want to make a backup if
# you had to use these steps to get it mounted, right?
Good luck.
Bookmarks