Discussion:
[linux-lvm] multipath_component_detection
Ken Goods
2017-01-16 19:46:20 UTC
Permalink
Hi all,
Just a quick question. I've been setting up a (iscsi) LUN and want to create an LVM PV on it.

The docs I have read are somewhat conflicted. Some say that the underlying devices should be filtered, however according to comments in lvm.conf it says that if multipath_component_detection is enabled, "LVM2 will ignore devices used as component paths of device-mapper multipath devices".

So filtering is no longer necessary with LVM2?

I would just try it but this is a live email server and I'd like to keep the downtime to a minimum.

Thanks in advance.




Ken
Peter Rajnoha
2017-01-17 11:19:44 UTC
Permalink
Post by Ken Goods
Hi all,
Just a quick question. I've been setting up a (iscsi) LUN and want to
create an LVM PV on it.
The docs I have read are somewhat conflicted. Some say that the
underlying devices should be filtered, however according to comments in
lvm.conf it says that if multipath_component_detection is enabled, "LVM2
will ignore devices used as component paths of device-mapper multipath
devices".
So filtering is no longer necessary with LVM2?
The multipath component detection is an automatic filter in LVM2 (if
enabled with devices/multipath_component_detection=1 in LVM
configuration - that is used by default). So in this case you don't need
to set up devices/global_filter (or devices/filter) manually. LVM will
filter multipath components automatically by looking at the device stack
and if it detects that there's a multipath device on top of certain set
of devices, such devices are assumed as multipath components and they're
filtered automatically.

Of course, for this automatic filter to work correctly, you also need to
have your multipath correctly configured - LVM doesn't know that the
devices are multipath components unless there's multipath device already
set up and running on top of those components.

However, there's one improvement in this detection if you use
devices/external_device_info_source="udev" in your LVM configuration
(this is not used by default yet). In this case, LVM reads information
from udev database which in turn has this information about multipath
components directly from multipath and that one takes this information
from its own configuration (the component WWID list in multipath's
configuraton) - so in this case you don't even need to have multipath
device set up yet on top of multipath components for LVM to detect
multipath components properly.

But usually, if your system is properly configured, you always have
multipath device set up and running on top of multipath components.
--
Peter
Ken Goods
2017-01-17 16:27:40 UTC
Permalink
Thanks so much Peter, exactly what I was looking for. Also thanks for the heads up on external_device_info_source, I'll use it.

----- Original Message -----

From: "Peter Rajnoha" <***@redhat.com>
To: ***@cropusainsurance.com
Cc: "LVM general discussion and development" <linux-***@redhat.com>
Sent: Tuesday, January 17, 2017 3:19:44 AM
Subject: Re: [linux-lvm] multipath_component_detection
Post by Ken Goods
Hi all,
Just a quick question. I've been setting up a (iscsi) LUN and want to
create an LVM PV on it.
The docs I have read are somewhat conflicted. Some say that the
underlying devices should be filtered, however according to comments in
lvm.conf it says that if multipath_component_detection is enabled, "LVM2
will ignore devices used as component paths of device-mapper multipath
devices".
So filtering is no longer necessary with LVM2?
The multipath component detection is an automatic filter in LVM2 (if
enabled with devices/multipath_component_detection=1 in LVM
configuration - that is used by default). So in this case you don't need
to set up devices/global_filter (or devices/filter) manually. LVM will
filter multipath components automatically by looking at the device stack
and if it detects that there's a multipath device on top of certain set
of devices, such devices are assumed as multipath components and they're
filtered automatically.

Of course, for this automatic filter to work correctly, you also need to
have your multipath correctly configured - LVM doesn't know that the
devices are multipath components unless there's multipath device already
set up and running on top of those components.

However, there's one improvement in this detection if you use
devices/external_device_info_source="udev" in your LVM configuration
(this is not used by default yet). In this case, LVM reads information
from udev database which in turn has this information about multipath
components directly from multipath and that one takes this information
from its own configuration (the component WWID list in multipath's
configuraton) - so in this case you don't even need to have multipath
device set up yet on top of multipath components for LVM to detect
multipath components properly.

But usually, if your system is properly configured, you always have
multipath device set up and running on top of multipath components.
--
Peter
Loading...