Skip to contentSkip to conversation

multipath: clean up find_multipaths documentation

PATCH In review Benjamin Marzinski 3 participants 6 messages Mar 7, 2025 – Jul 17 Device mapper

lore
Share & tools
lore

Benjamin Marzinski

author maintainer
#0 lore raw

PATCH 1/2 multipath: clean up find_multipaths documentation

The preferred term is "on" instead of "yes".

---
 multipath/multipath.conf.5.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
multipath/multipath.conf.5.in +1 -1
index 0c1eff40..bdb6b605 100644
@@ -1214,7 +1214,7 @@ Both multipathd and multipath treat every non-blacklisted device as multipath
 device path.
 .TP
 .I smart
-This differs from \fIfind_multipaths yes\fR only in
+This differs from \fIfind_multipaths on\fR only in
 the way it treats new devices for which only one path has been
 detected yet. When such a device is first encountered in udev rules, it is
 treated as a multipath device. multipathd waits whether additional paths with
Signature · 1 line
2.48.1
author maintainer
#1 lore raw

PATCH 2/2 multipathd: Add multipathd man page section about sockets

Add a section with information about how to communicate with the multipathd daemon to the man page. Also mention that multipathd CLI commands can be run without the -k option.

---
 multipathd/multipathd.8.in | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
multipathd/multipathd.8.in +31 -0
index 315884eb..5b1aeb42 100644
@@ -83,6 +83,11 @@ multipathd executes the given command (see \fBCOMMANDS\fR below). If the
 command contains whitespace or shell special characters, it needs to be quoted
 like in \fImultipathd -k'show topology'\fR. No whitespace is allowed between
 the \fB-k\fR and the command string.
+
+Commands can also be issued without using \fB-k\fR. In this case, the command
+string should not be quoted. Command arguments that contain whitespace or
+special characters still need to be quoted, like in \fImultipathd show paths
+format "%n %w"\fR
 .
 .TP
 .B \-k
@@ -103,6 +108,32 @@ multipath devices on dmevents. Use this flag to force it to use the old event
 waiting method, based on creating a separate thread for each device.
 .
 .
+.\" ----------------------------------------------------------------------------
+.SH COMMUNICATING WITH MULTIPATHD
+.\" ----------------------------------------------------------------------------
+
+In addition to the multipathd CLI, the \fBlibmpathcmd\fR library can be used to
+send commands (see \fBCOMMANDS\fR below) to the multipathd daemon from other
+programs. By default, multipathd listens on both the \fI@ABSTRACT_SOCKET@\fR
+abstract namespace socket and the \fI@PATHNAME_SOCKET@\fR socket file.
+libmpathcmd will use either of these sockets to connect to multipathd. The
+socket file can be useful to communicate with multipathd from different
+namespaces since it can be bind mounted in them, unlike the abstract namespace
+socket. Multipathd will accept \fBlist|show\fR commands from any user. All
+other commands must be issued by root.
+
+It is possible to change the sockets that multipathd listens on. If
+\fImultipathd.socket\fR is running, multipathd will use the sockets it listens
+on.  A maximum of two sockets can be defined by \fImultipathd.socket\fR, and by
+default it listens on \fI@ABSTRACT_SOCKET@\fR and \fI@PATHNAME_SOCKET@\fR. If
+\fImultipathd.socket\fR is not running, a single socket can be configured for
+listening on by setting the \fIMULTIPATH_SOCKET_NAME\fR environment variable
+when starting multipathd. This environment variable must also be set to make
+multipathd CLI commands (or any other program using libmpathcmd) connect to the
+multipathd daemon using a non-default socket, regardless of whether that socket
+was set for the daemon using \fImultipathd.socket\fR or the
+\fIMULTIPATH_SOCKET_NAME\fR environment variable.
+.
 .
 .\" ----------------------------------------------------------------------------
 .SH COMMANDS
Signature · 1 line
2.48.1
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] multipathd: Add multipathd man page section about sockets

Quoted 5 lines · Benjamin Marzinski

Add a section with information about how to communicate with the multipathd daemon to the man page. Also mention that multipathd CLI commands can be run without the -k option.

Quoted 79 lines

---
 multipathd/multipathd.8.in | 31 +++++++++++++++++++++++++++++++

 1 file changed, 31 insertions(+)
multipathd/multipathd.8.in +0 -0
index 315884eb..5b1aeb42 100644
@@ -83,6 +83,11 @@ multipathd executes the given command (see

\fBCOMMANDS\fR below). If the
 command contains whitespace or shell special characters, it needs to be quoted
 like in \fImultipathd -k'show topology'\fR. No whitespace is allowed between
 the \fB-k\fR and the command string.

multipathd/multipathd.8.in +2 -0
+
+Commands can also be issued without using \fB-k\fR. In this case,

the command
+string should not be quoted. Command arguments that contain whitespace or
+special characters still need to be quoted, like in \fImultipathd show paths
+format "%n %w"\fR
 .
 .TP
 .B \-k

multipathd/multipathd.8.in +0 -0
@@ -103,6 +108,32 @@ multipath devices on dmevents. Use this flag to

force it to use the old event
 waiting method, based on creating a separate thread for each device. .
 .
+.\" ----------------------------------------------------------------
------------
+.SH COMMUNICATING WITH MULTIPATHD
+.\" ----------------------------------------------------------------
------------

multipathd/multipathd.8.in +2 -0
+
+In addition to the multipathd CLI, the \fBlibmpathcmd\fR library can

be used to
+send commands (see \fBCOMMANDS\fR below) to the multipathd daemon from other
+programs. By default, multipathd listens on both the \fI@ABSTRACT_SOCKET@\fR
+abstract namespace socket and the \fI@PATHNAME_SOCKET@\fR socket file.
+libmpathcmd will use either of these sockets to connect to multipathd. The
+socket file can be useful to communicate with multipathd from different
+namespaces since it can be bind mounted in them, unlike the abstract namespace
+socket. Multipathd will accept \fBlist|show\fR commands from any user. All

multipathd/multipathd.8.in +4 -0
+other commands must be issued by root.
+
+It is possible to change the sockets that multipathd listens on. If
+\fImultipathd.socket\fR is running, multipathd will use the sockets

it listens
+on.  A maximum of two sockets can be defined by \fImultipathd.socket\fR, and by
+default it listens on \fI@ABSTRACT_SOCKET@\fR and \fI@PATHNAME_SOCKET@\fR. If
+\fImultipathd.socket\fR is not running, a single socket can be configured for
+listening on by setting the \fIMULTIPATH_SOCKET_NAME\fR environment variable
+when starting multipathd. This environment variable must also be set to make
+multipathd CLI commands (or any other program using libmpathcmd) connect to the
+multipathd daemon using a non-default socket, regardless of whether that socket
+was set for the daemon using \fImultipathd.socket\fR or the +\fIMULTIPATH_SOCKET_NAME\fR environment variable.
+.
 .
 .\" ----------------------------------------------------------------
------------
 .SH COMMANDS

Reviewed-by on v1 1/2
#3 lore raw
In reply to Benjamin Marzinski
Quoted 3 lines · Benjamin Marzinski

The preferred term is "on" instead of "yes".

Quoted 21 lines

---
 multipath/multipath.conf.5.in | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
multipath/multipath.conf.5.in +0 -0
index 0c1eff40..bdb6b605 100644
@@ -1214,7 +1214,7 @@ Both multipathd and multipath treat every non-

blacklisted device as multipath
 device path.
 .TP
 .I smart

multipath/multipath.conf.5.in +1 -1
-This differs from \fIfind_multipaths yes\fR only in
+This differs from \fIfind_multipaths on\fR only in

 the way it treats new devices for which only one path has been detected yet. When such a device is first encountered in udev rules, it is
 treated as a multipath device. multipathd waits whether additional paths with

#4 lore raw
In reply to Benjamin Marzinski
Quoted 12 lines · Benjamin Marzinski

The preferred term is "on" instead of "yes".

---
  multipath/multipath.conf.5.in | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
multipath/multipath.conf.5.in +0 -0
index 0c1eff40..bdb6b605 100644

multipath/multipath.conf.5.in Both multipathd and multipath treat every non-blacklisted device as multipath · line 1220

Quoted 8 lines
multipath/multipath.conf.5.in +1 -1
@@ -1214,7 +1214,7 @@ Both multipathd and multipath treat every non-blacklisted device as multipath
  device path.
  .TP
  .I smart
-This differs from \fIfind_multipaths yes\fR only in
+This differs from \fIfind_multipaths on\fR only in
  the way it treats new devices for which only one path has been
  detected yet. When such a device is first encountered in udev rules, it is
  treated as a multipath device. multipathd waits whether additional paths with

Could we please backport this patch to the stable-0.10.y and stable-0.11.y branches?

Thanks.

#5 lore raw
Quoted 3 lines · Xose Vazquez Perez

Could we please backport this patch to the stable-0.10.y and stable- 0.11.y branches?

Done, thanks for the reminder.

Martin

Signature · 4 lines
Dr. Martin Wilck <[email protected]>
SUSE Software Solutions Germany GmbH, Frankenstr. 146, 90461 Nürnberg,
Germany
Geschäftsführer: Jochen Jaser, Andrew McDonald (HRB 36809,AG Nürnberg)