mpathconf - Man Page

A tool for configuring device-mapper-multipath

Synopsis

mpathconf [commands] [options]

Description

mpathconf is a utility that creates or modifies /etc/multipath.conf. It can enable or disable multipathing and configure some common options. mpathconf can also load the dm_multipath module, start and stop the multipathd daemon, and configure the multipathd service to start automatically or not. If mpathconf is called with no commands, it will display the current configuration, but will not create of modify /etc/multipath.conf

The default options for mpathconf are --with_module The --with_multipathd option is not set by default.  Enabling multipathing will load the dm_multipath module but it will not immediately start it. This is so that users can manually edit their config file if necessary, before starting multipathd.

If /etc/multipath.conf already exists, mpathconf will edit it. If it does not exist, mpathconf will create a default file with user_friendly_names set and find_multipaths set to on. To disable these, use the --user_friendly_names n and --find_multipaths off options

Commands

--enable

Removes any line that blacklists all device nodes from the /etc/multipath.conf blacklist section. Also, creates /etc/multipath.conf if it doesn't exist.

--disable

Adds a line that blacklists all device nodes to the /etc/multipath.conf blacklist section. If no blacklist section exists, it will create one.

--allow <device>

Modifies the /etc/multipath/conf blacklist to blacklist all wwids and the blacklist_exceptions to whitelist <device>. <device> can be in the form of MAJOR:MINOR, a wwid, or the name of a device-mapper device, either a multipath device, or any device on stacked on top of one or more multipath devices. This command can be used multiple times to allow multiple devices.  NOTE: This action will create a configuration file that mpathconf will not be able to revert back to its previous state. Because of this, --outfile is required when using --allow.

--user_friendly_names { y | n }

If set to y, this adds the line user_friendly_names yes to the /etc/multipath.conf defaults section. If set to n, this removes the line, if present. This command can be used along with any other command.

--recheck_wwid { y | n }

If set to y, this adds the line recheck_wwid yes to the /etc/multipath.conf defaults section, or sets an existing line to yes. If set to n, this sets an existing recheck_wwid line to no. This command can be used along with any other command.

--find_multipaths { on | yes | y | off | no | n | strict | greedy | smart }

If set to <value>, this adds the line find_multipaths <value> to the /etc/multipath.conf defaults section. This command can be used along with any other command. y and n can be used instead of yes and no.

--property_blacklist { y | n }

If set to y, this adds the line property (SCSI_IDENT_|ID_WWN) to the /etc/multipath.conf blacklist_exceptions section. If set to n, this removes the line, if present. This command can be used along with any other command.

--enable_foreign { y | n }

If set to y, this adds the line enable_foreign .* to the /etc/multipath.conf defaults section. if set to n, this removes the line, if present. This command can be used along with any other command.

--option <option_name>:[<value>]

Sets the defaults section option <option_name> to <value>. If the option was not previously set in the defaults section, it is added. If it was set, its value is changed to <value>. If <value> is left blank, then the option is removed from the defaults section, if was set there. This command can be used along with any other command.

--outfile <filename>

Write the resulting multipath configuration to <filename> instead of /etc/multipath.conf.

Options

--with_module { y | n }

If set to y, this runs modprobe dm_multipath to install the multipath modules. This option only works with the --enable command. This option is set to y by default.

--with_multipathd { y | n }

If set to y, this runs service multipathd start to start the multipathd daemon on --enable, service multipathd stop to stop the multipathd daemon on --disable, and service multipathd reload to reconfigure multipathd on --user_friendly_names and --find_multipaths. This option is set to n by default.

Files

/etc/multipath.conf

See Also

multipath.conf(5), modprobe(8), multipath(8), multipathd(8), service(8),

Author

Benjamin Marzinski <bmarzins@redhat.com>

Info

June 2010 Linux Administrator's Manual