Why are Device Mapped drives not visible in the list of local disks?

Mar 14, 2021
2
0
1
39
Hi,

I'm using multipath, with disks mapped by WWID and presented as devices at /dev/dm-<n> or /dev/mapper/sym-link to dm-<n>. I don't see these disks either in the list of all local disks, nor when attempting to create a ZFS pool via the Proxmox UI.

Briefly looking through the code I see the get_disks method in PVE::Diskmanage and the relevant section seems to be:
Perl:
dir_glob_foreach('/sys/block', $disk_regex, sub {
    my ($dev) = @_;
    # whitelisting following devices
    # hdX: ide block device
    # sdX: sd block device
    # vdX: virtual block device
    # xvdX: xen virtual block device
    # nvmeXnY: nvme devices
    # cciss!cXnY: cciss devices
    return if $dev !~ m/^(h|s|x?v)d[a-z]+$/ &&
          $dev !~ m/^nvme\d+n\d+$/ &&
          $dev !~ m/^cciss\!c\d+d\d+$/;

is there a reason why dm-<n> (or /dev/mapper/<name> since dm-<n> can change) devices should not be included? Also, would it possible to change this to allow users to specify patterns via the UI?
 
Last edited:
I'm using multipath, with disks mapped by WWID and presented as devices at /dev/dm-<n> or /dev/mapper/sym-link to dm-<n>. I don't see these disks either in the list of all local disks, nor when attempting to create a ZFS pool via the Proxmox UI.
Those devices are not local physical disks, so IMHO it makes no sense to list them (as local physical disk) ...

Note: /dev/mapper would include all LVM logical volume (VM images, ...) - totally confusing
 
Last edited:
Thanks for the explanation.

I was able to get everything working the way I wanted using the CLI, just curious about why things are the way they are. I'm new to Proxmox, and this isn't how I'd normally hook up this storage, but at least for now, it all works.