Skip to contentSkip to conversation

hctl from device name or major/minor

DISCUSSION Andy 1 participant 1 message Sep 2, 2008 Device mapper

lore
Share & tools
lore

Andy

author
#0 lore raw

What is the best way to get the hctl from the device name or major/minor
pair? Specificly for use in a prio_callout program for multipath? Is there an API interface in the device mapper of sysfs libraries I should use to get this information or should I just scan the appropriate /sys directory? Currently I just have a simple shell script to give me the path priority I need, but would like to make it a c program.

Thanks,

Andy