Skip to content

LUKS LVM "Operation was canceled" #3737

@VesselWave

Description

@VesselWave

Distribution

CachyOS

Package version

6.6.3

Frequency

Always

Bug description

Opening LUKS Encrypted LVM partition:

  1. Doesn't save password to keyring
  2. Gives "Operation Canceled"

Steps to reproduce

Pre:

  1. Create a partition (use GParted for visual feedback, so for safety of your data)

LUKS

  1. Set it up a LUKS Partition sudo cryptsetup -y -v luksFormat /dev/MYLUKS,MYLUKS is a name of the mapper I chose
  2. Open LUKS sudo cryptsetup open /dev/<device> MYLUKS

LVM

LVM Explained

Here is a recap of how LVM works

  1. Create Physics Volume (LVM "partition") sudo pvcreate /dev/mapper/MYLUKS

  2. Create Volume Group (abstraction that combines several partitions) sudo vgcreate vg01 /dev/mapper/MYLUKS I called it vg01

  3. Create Logical Volume (actual useful space) sudo lvcreate -l 100%FREE -n lv01 vg01 I called it lv01

File system (EXT4)

  1. sudo mkfs.ext4 /dev/vg01/lv01
  2. Mount it and create a file the to verify later that you opened a correct thing

Close everything (or just reboot)

  1. sudo umount /dev/vg01/lv01
    sudo lvchange -a n /dev/vg01/lv01
    sudo cryptsetup luksClose /dev/mapper/MYLUKS

Reproduction

  1. Click on the encrypted device in Nemo
  2. It will prompt for the passphrase, choose "remember forever"
  3. It will prompt for sudo password
  4. "Operation was canceled"
  5. Click on the device again
  6. The device is opened
  7. Close as step 9 in pre, or reboot
  8. Click again
  9. Still prompts for password

Expected behavior

Saves passphrase in keyring

Opens LVM without "Operation was canceled"

Additional information

NOTE:

The same error happens in GNOME Files

In Dolphin (KDE FIles), the password is saved but it is still a two step process


If I save the password manually the password prompt is bypassed, just so you are sure that my keyring works

secret-tool store -l "Encryption passphrase for <device name> (Disk)" gvfs-luks-uuid <UUID>

(get UUID with GParted or lsblk -f 5th column called UUID)


This issue is important because LVM inside LUKS is how default Ubuntu encryption works

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions