[lvm-devel] [PATCH] config: set external_device_info_source=none if udev isn't running
Martin Wilck
mwilck at suse.com
Fri Jan 29 19:58:21 UTC 2021
On Fri, 2021-01-29 at 11:34 -0600, David Teigland wrote:
> On Fri, Jan 29, 2021 at 02:02:11PM +0100, Martin Wilck wrote:
> > LVM filters are hard to get right, even for experienced admins. Not
> > because of the regexes, but because of the many different names
> > under
> > which devices appear under /dev. Telling admins that they need to
> > fiddle with filter rules just to make multipath work sounds like
> > something I'd have said 10 years ago, but not in 2021.
>
> I agree.
>
> > > There will be also a new 'filtering' introduced in a form a basic
> > > acceptance
> > > list of devices - that may be seen in some cases as more simple
> > > to
> > > use.
> >
> > Perhaps this will improve matters, perhaps it'll add more
> > confusion.
> > I don't know enough to tell.
>
> The filter problems, among many others, were the motivation to create
> a
> new feature "devices file" which I'm planning to merge into lvm soon.
>
> Latest devel branch (see latest -N suffix):
>
> https://sourceware.org/git/?p=lvm2.git;a=shortlog;h=refs/heads/dev-dct-devicesid-22
>
Interesting, thanks.
> The basic idea is that a new lvm config file (the devices file) lists
> the
> devices that lvm can use, and lvm will not even look at devices
> outside
> that list. So the user tells lvm which devices it should use, and
> that's
> all lvm sees. (With an optional allowance for pvcreate to implicitly
> mean
> "use this device", to make it easier for people to begin using this.)
>
> The devices are primarily identified by a WWID, or other similar
> identifier. lvm commands are used manage that file, but it can be
> manually edited also. It replaces filters, and will make a number of
> hard
> problems in lvm just go away: the problem of unstable dev names in
> filters goes away, mpath/md component detection goes away (you
> wouldn't
> include component devs in the device file), the system mistakenly
> activating PVs belonging to VMs goes away.
If there are both SCSI devices and multipath devices with the given
WWID, multipath would be preferred, I suppose? What would happen during
device detection, when a SCSI device with the given WWID pops up? How
would lvm "know" that this device was going to be added to a multipath
map without asking udev?
Regards
Martin
More information about the lvm-devel
mailing list