Skip to content

Duplicate disk selection warning: both pci-* and virtio-* paths point to the same disk on Debian 14 #4

@congzhangzh

Description

@congzhangzh

Environment

  • OS: Debian 14 (Forky)
  • Virtualization: [KVM/QEMU]
  • Disk: virtio block device (/dev/vda)

Issue Description

When selecting disks from /dev/disk/by-path/ for ZFS pool creation, multiple paths appear to be different disks but actually point to the same physical device /dev/vda:

  • /dev/disk/by-path/pci-0000:XX:XX.X-.../dev/vda
  • /dev/disk/by-path/virtio-pci-0000:XX:XX.X-.../dev/vda

If both paths are selected, it results in a duplicate disk error since ZFS attempts to add the same physical disk twice to the pool.

Expected Behavior

The installation/configuration script should:

  1. Detect when multiple paths resolve to the same device
  2. Warn users about duplicate disk selection
  3. Automatically deduplicate or prevent selecting the same disk multiple times

Actual Behavior

Both paths appear as separate options, allowing users to mistakenly select the same disk twice, leading to configuration errors.

Reproduction Steps

  1. Boot Debian 14 in a VM with virtio disk
  2. List available disks in /dev/disk/by-path/
  3. Observe multiple paths pointing to /dev/vda
  4. Attempt to create ZFS pool selecting both paths
  5. Error occurs due to duplicate disk selection

Suggested Solution

Add disk deduplication logic to resolve all paths to their actual device names before validation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions