mirror_zfs/cmd/vdev_id
Tony Hutter 3ee4e6d8b7
vdev_id: Fix partition regular expression
Given a DM device name, the old vdev_id script would extract any text
after a 'p' as the partition number.  It then appends "-part" + the
partition number to the name, giving a by-vdev name like "L0-part5".

This works fine if the DM name is like 'dm-2p5', but doesn't work if
the DM name is a multipath name like "mpatha".  In those cases it
incorrectly matches the 'p' in "mpatha", giving by-vdev names like
"L0-partatha".

This patch fixes the issue by making the partition regex match stricter.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #11637
2021-02-24 09:58:46 -08:00
..
Makefile.am Add vdev_id for JBOD-friendly udev aliases 2012-06-01 08:55:14 -07:00
vdev_id vdev_id: Fix partition regular expression 2021-02-24 09:58:46 -08:00