linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Martin Wilck <martin.wilck@suse.com>
To: "bmarzins@redhat.com" <bmarzins@redhat.com>
Cc: "prajnoha@redhat.com" <prajnoha@redhat.com>,
	"dm-devel@redhat.com" <dm-devel@redhat.com>,
	"teigland@redhat.com" <teigland@redhat.com>,
	"zkabelac@redhat.com" <zkabelac@redhat.com>,
	"linux-lvm@redhat.com" <linux-lvm@redhat.com>,
	Heming Zhao <heming.zhao@suse.com>
Subject: Re: [linux-lvm] Discussion: performance issue on event activation mode
Date: Tue, 28 Sep 2021 19:15:10 +0000	[thread overview]
Message-ID: <420505080258b180629310f9c64a4e5595da1ab7.camel@suse.com> (raw)
In-Reply-To: <20210928174246.GF3087@octiron.msp.redhat.com>

On Tue, 2021-09-28 at 12:42 -0500, Benjamin Marzinski wrote:
> On Tue, Sep 28, 2021 at 03:16:08PM +0000, Martin Wilck wrote:
> > On Tue, 2021-09-28 at 09:42 -0500, David Teigland wrote:
> > 
> > 
> > I have pondered this quite a bit, but I can't say I have a concrete
> > plan.
> > 
> > To avoid depending on "udev settle", multipathd needs to partially
> > revert to udev-independent device detection. At least during
> > initial
> > startup, we may encounter multipath maps with members that don't
> > exist
> > in the udev db, and we need to deal with this situation gracefully.
> > We
> > currently don't, and it's a tough problem to solve cleanly. Not
> > relying
> > on udev opens up a Pandora's box wrt WWID determination, for
> > example.
> > Any such change would without doubt carry a large risk of
> > regressions
> > in some scenarios, which we wouldn't want to happen in our large
> > customer's data centers.
> 
> I'm not actually sure that it's as bad as all that. We just may need
> a
> way for multipathd to detect if the coldplug has happened.  I'm sure
> if
> we say we need it to remove the udev settle, we can get some method
> to
> check this. Perhaps there is one already, that I don't know about.

Our ideas are not so far apart, but this is the wrong thread on the
wrong mailing list :-) Adding dm-devel.

My thinking is: if during startup multipathd encounters existing maps
with member devices missing in udev, it can test the existence of the
devices in sysfs, and if the devices are present there, it shouldn't
flush the maps. This should probably be a general principle, not only
during startup or "boot" (wondering if it makes sense to try and add a
concept like "started during boot" to multipathd - I'd rather try to
keep it generic). Anyway, however you put it, that means that we'd
deviate at least to some extent from the current "always rely on udev"
principle. That's what I meant. Perhaps I exaggerated the difficulties.
Anyway, details need to be worked out, and I expect some rough edges.

> > I also looked into Lennart's "storage daemon" concept where
> > multipathd
> > would continue running over the initramfs/rootfs switch, but that
> > would
> > be yet another step with even higher risk.
> 
> This is the "set argv[0][0] = '@' to disble initramfs daemon killing"
> concept, right? We still have the problem where the udev database
> gets
> cleared, so if we ever need to look at that while processing the
> coldplug events, we'll have problems.

If multipathd had started during initrd processing, it would have seen
the uevents for the member devices. There are no "remove" events, so
multipathd might not even notice that the devices are gone. But libudev
queries on the devices could fail between pivot and coldplug, which is
perhaps even nastier... Also, a daemon running like this would live in
a separate, detached mount namespace. It couldn't just reread its
configuration file or the wwids file; it would have no access to the
ordinary root FS. 

> > 
> > > Otherwise, when the devices file is not used,
> > > md: from reading the md headers from the disk
> > > mpath: from reading sysfs links and /etc/multipath/wwids
> > 
> > Ugh. Reading sysfs links means that you're indirectly depending on
> > udev, because udev creates those. It's *more* fragile than calling
> > into
> > libudev directly, IMO. Using /etc/multipath/wwids is plain wrong in
> > general. It works only on distros that use "find_multipaths
> > strict",
> > like RHEL. Not to mention that the path can be customized in
> > multipath.conf.
> 
> I admit that a wwid being in the wwids file doesn't mean that it is
> definitely a multipath path device (it could always still be
> blacklisted
> for instance). Also, the ability to move the wwids file is
> unfortunate,
> and probably never used. But it is the case that every wwid in the
> wwids
> file has had a multipath device successfully created for it. This is
> true regardless of the find_multipaths setting, and seems to me to be
> a
> good hint. Conversely, if a device wwid isn't in the wwids file, then
> it
> very likely has never been multipathed before (assuming that the
> wwids
> file is on a writable filesystem).

Hm. I hear you, but I am able to run "multipath -a" and add a wwid to
the file without it being created. Actually I'm able to add bogus wwids
to the file in this way.

Regards,
Martin
> 


_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/


  reply	other threads:[~2021-09-29  6:43 UTC|newest]

Thread overview: 86+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-06  6:15 [linux-lvm] Discussion: performance issue on event activation mode heming.zhao
2021-06-06 16:35 ` Roger Heflin
2021-06-07 10:27   ` Martin Wilck
2021-06-07 15:30     ` heming.zhao
2021-06-07 15:45       ` Martin Wilck
2021-06-07 20:52       ` Roger Heflin
2021-06-07 21:30     ` David Teigland
2021-06-08  8:26       ` Martin Wilck
2021-06-08 15:39         ` David Teigland
2021-06-08 15:47           ` Martin Wilck
2021-06-08 16:02             ` Zdenek Kabelac
2021-06-08 16:05               ` Martin Wilck
2021-06-08 16:03             ` David Teigland
2021-06-08 16:07               ` Martin Wilck
2021-06-15 17:03           ` David Teigland
2021-06-15 18:21             ` Zdenek Kabelac
2021-06-16 16:18             ` heming.zhao
2021-06-16 16:38               ` David Teigland
2021-06-17  3:46                 ` heming.zhao
2021-06-17 15:27                   ` David Teigland
2021-06-08 16:49         ` heming.zhao
2021-06-08 16:18       ` heming.zhao
2021-06-09  4:01         ` heming.zhao
2021-06-09  5:37           ` Heming Zhao
2021-06-09 18:59             ` David Teigland
2021-06-10 17:23               ` heming.zhao
2021-06-07 15:48 ` Martin Wilck
2021-06-07 16:31   ` Zdenek Kabelac
2021-06-07 21:48   ` David Teigland
2021-06-08 12:29     ` Peter Rajnoha
2021-06-08 13:23       ` Martin Wilck
2021-06-08 13:41         ` Peter Rajnoha
2021-06-08 13:46           ` Zdenek Kabelac
2021-06-08 13:56             ` Peter Rajnoha
2021-06-08 14:23               ` Zdenek Kabelac
2021-06-08 14:48               ` Martin Wilck
2021-06-08 15:19                 ` Peter Rajnoha
2021-06-08 15:39                   ` Martin Wilck
2021-09-09 19:44         ` David Teigland
2021-09-10 17:38           ` Martin Wilck
2021-09-12 16:51             ` heming.zhao
2021-09-27 10:00           ` Peter Rajnoha
2021-09-27 15:38             ` David Teigland
2021-09-28  6:34               ` Martin Wilck
2021-09-28 14:42                 ` David Teigland
2021-09-28 15:16                   ` Martin Wilck
2021-09-28 15:31                     ` Martin Wilck
2021-09-28 15:56                     ` David Teigland
2021-09-28 18:03                       ` Benjamin Marzinski
2021-09-28 17:42                     ` Benjamin Marzinski
2021-09-28 19:15                       ` Martin Wilck [this message]
2021-09-29 22:06                       ` Peter Rajnoha
2021-09-30  7:51                         ` Martin Wilck
2021-09-30  8:07                           ` heming.zhao
2021-09-30  9:31                             ` Martin Wilck
2021-09-30 11:41                             ` Peter Rajnoha
2021-09-30 15:32                               ` heming.zhao
2021-10-01  7:41                                 ` Martin Wilck
2021-10-01  8:08                                   ` Peter Rajnoha
2021-09-30 11:29                           ` Peter Rajnoha
2021-09-30 16:04                             ` David Teigland
2021-09-30 14:41                           ` Benjamin Marzinski
2021-10-01  7:42                             ` Martin Wilck
2021-09-29 21:53                 ` Peter Rajnoha
2021-09-30  7:45                   ` Martin Wilck
2021-09-29 21:39               ` Peter Rajnoha
2021-09-30  7:22                 ` Martin Wilck
2021-09-30 14:26                   ` David Teigland
2021-09-30 15:55                 ` David Teigland
2021-10-01  8:00                   ` Peter Rajnoha
2021-10-18  6:24                   ` Martin Wilck
2021-10-18 15:04                     ` David Teigland
2021-10-18 16:56                       ` heming.zhao
2021-10-18 21:51                       ` Zdenek Kabelac
2021-10-19 17:18                         ` David Teigland
2021-10-20 14:40                       ` Martin Wilck
2021-10-20 14:50                         ` David Teigland
2021-10-20 14:54                           ` Martin Wilck
2021-10-20 15:12                             ` David Teigland
2021-06-07 16:40 ` David Teigland
2021-07-02 21:09 ` David Teigland
2021-07-02 21:22   ` Martin Wilck
2021-07-02 22:02     ` David Teigland
2021-07-03 11:49       ` heming.zhao
2021-07-08 10:10         ` Tom Yan
2021-07-02 21:31   ` Tom Yan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=420505080258b180629310f9c64a4e5595da1ab7.camel@suse.com \
    --to=martin.wilck@suse.com \
    --cc=bmarzins@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=heming.zhao@suse.com \
    --cc=linux-lvm@redhat.com \
    --cc=prajnoha@redhat.com \
    --cc=teigland@redhat.com \
    --cc=zkabelac@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).