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

Mar 14, 2021
2
0
1
38
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.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!