All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heming Zhao <heming.zhao@suse.com>
To: David Teigland <teigland@redhat.com>, Martin Wilck <mwilck@suse.de>
Cc: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] system boot time regression when using lvm2-2.03.05
Date: Mon, 9 Sep 2019 11:42:17 +0000	[thread overview]
Message-ID: <c1e8a6d2-d180-03c6-38ab-a402e813e99d@suse.com> (raw)
In-Reply-To: <20190906140351.GB652@redhat.com>

Hello David,

You are right.  Without calling _online_pvscan_one(), the pv/vg/lv won't be actived.
The activation jobs will be done by systemd calling lvm2-activation-*.services later.

Current code, the boot process is mainly blocked by:
```
_pvscan_aa
  vgchange_activate
   _activate_lvs_in_vg
    sync_local_dev_names
     fs_unlock
      dm_udev_wait <=== this point!
```

For fix this boot time regression, it looks lvm2 should have a config item in lvm2.conf
i.e.: large_PV_boot_speedup.
When this item is 1, pvcan won't call _online_pvscan_one, then let lvm2-activation*.service
do the active jobs.
Is it a workable solution?

Thanks

On 9/6/19 10:03 PM, David Teigland wrote:
> On Fri, Sep 06, 2019 at 08:51:47AM +0200, Martin Wilck wrote:
>> IIUC this would mean that you skip David's "pvs_online" file generation
>> entirely. How did the auto-activation happen, then?
> 
> I'd like to know which services/commands are activating the LVs.  In the
> slow case it was clearly done by the lvm2-pvscan services, but in the fast
> case it looked like it was not.
> 
>> Could it be that lvm2-activation-net.service activated the VGs?  I can
>> imagine that that would be efficient, because when this service runs
>> late in the boot process, I'd expect all PVs to be online, so
>> everything can be activated in a single big swoop. Unfortunately, this
>> wouldn't work in general, as it would be too late for booting from LVM
>> volumes.
>>
>> However I thought all lvm2-acticvation... services were gone with LVM
>> 2.03?
> 
> They still exist.  In lvm 2.03, the lvm.conf event_activation setting
> controls whether activation is event-based via lvm2-pvscan services, or
> done by lvm2-activation services at fixed points during startup.  LVM
> commands in initramfs could also be interfering and activating more than
> the root LV.
> 
> 

  reply	other threads:[~2019-09-09 11:42 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-29 13:52 [linux-lvm] system boot time regression when using lvm2-2.03.05 Heming Zhao
2019-08-29 14:37 ` David Teigland
2019-09-03  5:02   ` Heming Zhao
2019-09-03 15:17     ` David Teigland
2019-09-04  8:13       ` Heming Zhao
2019-09-05 12:35         ` Heming Zhao
2019-09-05 16:55           ` David Teigland
2019-09-06  4:31             ` Heming Zhao
2019-09-06  5:01               ` Heming Zhao
2019-09-06  6:51                 ` Martin Wilck
2019-09-06  8:46                   ` Heming Zhao
2019-09-06 14:15                     ` David Teigland
2019-09-06 14:26                     ` David Teigland
2019-09-06 14:03                   ` David Teigland
2019-09-09 11:42                     ` Heming Zhao [this message]
2019-09-09 14:09                       ` David Teigland
2019-09-10  8:01                         ` Martin Wilck
2019-09-10 15:20                           ` David Teigland
2019-09-10 20:38                             ` Zdenek Kabelac
2019-09-11  7:17                               ` Martin Wilck
2019-09-11  9:13                                 ` Zdenek Kabelac
2019-09-12 13:58                                   ` Martin Wilck

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=c1e8a6d2-d180-03c6-38ab-a402e813e99d@suse.com \
    --to=heming.zhao@suse.com \
    --cc=linux-lvm@redhat.com \
    --cc=mwilck@suse.de \
    --cc=teigland@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.