https://bugs.kde.org/show_bug.cgi?id=528457

            Bug ID: 528457
           Summary: Partition manager mistakes btrfs label for LUKS2
                    device label.
    Classification: Applications
           Product: partitionmanager
      Version First 26.08.2
       Reported In:
          Platform: NixOS
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

DESCRIPTION

When changing the filesystem label of a Btrfs filesystem contained inside an
unlocked LUKS2 partition, KDE Partition Manager appears to target the
underlying LUKS2 partition instead of the Btrfs filesystem.

The Btrfs filesystem is mounted and accessible, and its current label is
correctly displayed as "microsd". However, attempting to change the label to
"root" fails because the generated operation is executed against the underlying
LUKS2 device.

STEPS TO REPRODUCE
1. Have a Btrfs filesystem inside a LUKS2-encrypted partition.
2. Unlock the LUKS2 partition so that the Btrfs filesystem is available as a
mapped device.
3. In KDE Partition Manager, select the Btrfs filesystem and change its
filesystem label from "microsd" to "root".
4. Apply the operation.

OBSERVED RESULT

The operation fails with:

"Set label for partition '/dev/nvme0n1p5' from "microsd" to "root": Error"

The detailed error is:

"No valid Btrfs found on /dev/nvme0n1p5"

The underlying partition `/dev/nvme0n1p5` is a LUKS2 container, not a Btrfs
filesystem. The actual Btrfs filesystem is on the mapped device:

`/dev/mapper/luks-66ef80f3-cafd-4d0e-8df0-f84043b24d14`

The filesystem label can be changed successfully from the command line with:

`sudo btrfs filesystem label / root`

EXPECTED RESULT

KDE Partition Manager should apply the label operation to the Btrfs filesystem
inside the unlocked LUKS2 container, rather than attempting to operate on the
underlying LUKS2 partition.

SOFTWARE/OS VERSIONS

Operating System: NixOS 26.11 (unstable)

KDE Plasma Version: 6.x
KDE Frameworks Version: 6.x
Qt Version: 6.x

ADDITIONAL INFORMATION

`lsblk` shows the following storage hierarchy:

    nvme0n1p5                                   part  crypto_LUKS
    └─luks-66ef80f3-cafd-4d0e-8df0-f84043b24d14 crypt btrfs       microsd
                                                                 /home
                                                                 /nix/store
                                                                 /nix
                                                                 /

`/dev/nvme0n1p5` is therefore the LUKS2 container, while the Btrfs filesystem
with label "microsd" is the mapped device inside it.

The failure appears to occur because the label operation is generated for
`/dev/nvme0n1p5` even though the selected filesystem is Btrfs.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to