HomeFreeBSD

vdev_id: Create symlinks even if no /dev/mapper/

Description

vdev_id: Create symlinks even if no /dev/mapper/

vdev_id uses the /dev/mapper/ symlinks to resolve a UUID to a dm name
(like dm-1). However on some multipath setups, there is no /dev/mapper/
entry for the UUID at the time vdev_id is called by udev. However,
this isn't necessarily needed, as we may be able to resolve the dm
name from the $DEVNAME that udev passes us (like DEVNAME="/dev/dm-1").

This patch tries to resolve the dm name from $DEVNAME first, before
falling back to looking in /dev/mapper/. This fixed an issue where the
by-vdev names weren't reliably showing up on one of our nodes.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #11698

Details

Provenance
Tony Hutter <hutter2@llnl.gov>Authored on Mar 8 2021, 4:43 PM
GitHub <noreply@github.com>Committed on Mar 8 2021, 4:43 PM
Parents
rGb2eebe3ae7e3: ZTS events_002: Improve speed and reliability
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rG4fdbd434508f: vdev_id: Create symlinks even if no /dev/mapper/ (authored by Tony Hutter <hutter2@llnl.gov>).Mar 8 2021, 4:43 PM