[Bug 1854355] Re: LUKS partition on LVM has wrong device name

Thomas Bouve 1854355 at bugs.launchpad.net
Mon May 18 21:56:28 UTC 2020


I'm seeing the same behavior. Changing nvme0n1p3_crypt to
nvme1n1p3_crypt in /etc/crypttab (in the hope of aligning the naming
convention with the underlying NVME device files) and  running:

# dmsetup rename nvme0n1p3_crypt nvme1n1p3_crypt
# update-initramfs -c -t -k all
# update-grub
# reboot

will flip things around. The NVME device and its partitions will now be
nvme0n1pX on the next reboot while the LUKS device will be on
nvme1n1p3_crypt. Each time I rename the LUKS device the underlying
devices will flip around as well and never end up having the same naming
convention.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to lvm2 in Ubuntu.
https://bugs.launchpad.net/bugs/1854355

Title:
  LUKS partition on LVM has wrong device name

Status in lvm2 package in Ubuntu:
  Confirmed

Bug description:
  Ubuntu release: Ubuntu Desktop 18.04.2 LTS
  Kernel: 5.0.0-36-generic
  Storage devices: two NVMe SSDs (1TB and 512GB)

  Ubuntu Desktop install – selected the options to use disk encryption and LVM
  The largest disk (1TB) is used for the Ubuntu install and this has the device name /dev/nvme0n1 in the Ubiquity installer. Install completes and upon rebooting the operating system asks for the encryption passphrase for the LUKS partition (nvme0n1p3_crypt) which does decrypt as expected.
  Now when logging in and running lsblk it shows the LUKS partition to be in the wrong place. The 1TB disk now has the name nvme1n1 but the LUKS partition on that disk has the name nvme0n1p3_crypt.

  Output of lsblk:
  nvme1n1                 259:0    0 953.9G  0 disk
  ├─nvme1n1p1             259:1    0   512M  0 part  /boot/efi
  ├─nvme1n1p2             259:2    0   732M  0 part  /boot
  └─nvme1n1p3             259:3    0 952.7G  0 part
    └─nvme0n1p3_crypt     253:0    0 952.7G  0 crypt
      ├─ubuntu--vg-root   253:1    0 930.4G  0 lvm   /
      └─ubuntu--vg-swap_1 253:2    0   976M  0 lvm   [SWAP]
  nvme0n1                 259:4    0   477G  0 disk

  The LUKS partition doesn’t appear to be under nvme0n1p3 but it does on
  nvme1n1p3 which can be seen when running a luksDump command.

  Output of luksDump:
  root at USERPC:~# cryptsetup luksDump /dev/nvme0n1p3 | grep -i "slot 0"
  Device /dev/nvme0n1p3 doesn't exist or access denied.
  root at USERPC:~# cryptsetup luksDump /dev/nvme1n1p3 | grep -i "slot 0"
  Key Slot 0: ENABLED

  The implications of this so far in my case is not being able to find
  the correct LUKS partition device name via custom scripts to
  populate/modify key slots (e.g. 'dmsetup ls' returns the device name
  nvme0n1p3_crypt). There has not been an issue with Ubuntu decrypting
  the disk before the login screen.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lvm2/+bug/1854355/+subscriptions



More information about the foundations-bugs mailing list