Multipath already uses -B to run in a mode where it won't write the the bindings file (which can be useful in the initramfs). Its simple to make multipathd able to work this way as well. Signed-off-by: Benjamin Marzinski <bmarzins@xxxxxxxxxx> --- multipathd/main.c | 5 ++++- multipathd/multipathd.8 | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/multipathd/main.c b/multipathd/main.c index bc21d04..7429f66 100644 --- a/multipathd/main.c +++ b/multipathd/main.c @@ -1971,7 +1971,7 @@ main (int argc, char *argv[]) if (!conf) exit(1); - while ((arg = getopt(argc, argv, ":dsv:k::")) != EOF ) { + while ((arg = getopt(argc, argv, ":dsv:k::B")) != EOF ) { switch(arg) { case 'd': logsink = 0; @@ -1990,6 +1990,9 @@ main (int argc, char *argv[]) case 'k': uxclnt(optarg); exit(0); + case 'B': + conf->bindings_read_only = 1; + break; default: ; } diff --git a/multipathd/multipathd.8 b/multipathd/multipathd.8 index 358141d..7fe6597 100644 --- a/multipathd/multipathd.8 +++ b/multipathd/multipathd.8 @@ -28,6 +28,11 @@ Suppress timestamps. Do not prefix logging messages with a timestamp. .B -v "level" Verbosity level. Print additional information while running multipathd. A level of 0 means only print errors. A level of 3 or greater prints debugging information as well. .TP +.B -B +Read-only bindings file. Multipathd will not write to the user_friendly_names +bindings file. If a user_friendly_name doesn't already exist for a device, it +will use its WWID as its alias. +.TP .B -k multipathd will enter interactive mode. From this mode, the available commands can be viewed by entering "help". When you are finished entering commands, press CTRL-D to quit. -- 1.8.3.1 -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel