Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFE] could we see multipath options somewhere in /sys? #11

Closed
jirib opened this issue Aug 23, 2021 · 2 comments
Closed

[RFE] could we see multipath options somewhere in /sys? #11

jirib opened this issue Aug 23, 2021 · 2 comments

Comments

@jirib
Copy link

jirib commented Aug 23, 2021

Could we see multipath options somewhere in /sys and not to dump configuration via multipath -T and check it?

Today if I see something like this:

# multipath -ll
mpathz (3600601606660450079c71c6173c6a3cc) dm-8 DGC,VRAID
 size=10G features='1 queue_if_no_path' hwhandler='1 alua' wp=rw
 |-+- policy='service-time 0' prio=50 status=active
 | |- 1:0:4:2 sdj 8:144 active ready running
 | `- 3:0:4:2 sdw 65:96 active ready running
 `-+- policy='service-time 0' prio=10 status=enabled
 |- 1:0:5:2 sdr 65:16 active ready running
 `- 3:0:5:2 sdy 65:128 active ready running

that doesn't tells me all multipath options. I need to run multipath -T and locate device section for vendor/model and see the options. Also, queue_if_no_path in the multipath -ll - IIUC - doesn't need to correspond to effective settings, ie. (IIUC) queue_if_no_path in multipath -ll output could be no_path_retry = <value>, right?

IMO if we could see right from a place in /sys the settings, it would be much easier.

@mwilck
Copy link
Collaborator

mwilck commented Aug 23, 2021

The answer to the first question is simply "no". Under /sys, you see the kernel device mapper status. For example, you see member devices under /sys/block/dm-$N/slaves. But most device mapper properties are only visible through the ioctl API and not through sysfs. This is by design. The generic tool for obtaining information from the kernel device-mapper is dmsetup (dmsetup table, dmsetup info). multipath and multipathd provide a more high-level view specific for dm-multipath.

The high-level management of dm-multipath devices is done in user space. This applies to no_path_retry for example. Device mapper only knows queueing state (queue_if_no_path) or non-queueing state. no_path_retry is a concept of multipathd, which counts seconds after the last path goes offline, and switches to non-queueing mode after the specified time (no_path_retry * polling_interval). Thus, what you see in multipath -ll output is indeed effective - it shows how the kernel is configured. If all paths went down in your sample above, the kernel would start queueing, until multipathd tells it to stop by clearing the queue_if_no_path flag.

The command multipath -ll (or multipathd show topology) is a command crafted to provide the most important information about the currently configured maps at a quick glance. We are most certainly not going to change the format or semantics of multipath -ll output, which users have got used to for more than a decade. If you want more specific information, you can use the multipath show paths format "..." and multipathd show maps format "..." commands, which can print a lot of information about the maps and their components using format wildcards (use multipathd show wildcards to get a list of supported outputs).

It is true that multipathd currently has no command (no wildcard) to print all settings that are effective for a given map. This would be an RFE. I'll set myself a reminder, but the todo list quite long already. @jirib, patches would be welcome.

@jirib
Copy link
Author

jirib commented Aug 30, 2021

Thank you very much for explanation. I'm just closing this RFE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants