linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: David Teigland <teigland@redhat.com>
To: Tom Yan <tom.ty89@gmail.com>
Cc: linux-lvm@redhat.com
Subject: Re: [linux-lvm] pvscan --cache -aay $device does not activate LV with multiple "legs"
Date: Mon, 28 Jun 2021 10:08:27 -0500	[thread overview]
Message-ID: <20210628150827.GA23977@redhat.com> (raw)
In-Reply-To: <CAGnHSE=HRk+x4tcVdPuZFtnBGai3dP5KC6wHpeX1adAXq_mftQ@mail.gmail.com>

On Sun, Jun 27, 2021 at 09:01:43PM +0800, Tom Yan wrote:
> [tom@archlinux ~]$ sudo pvscan --cache -aay /dev/sdb
>   pvscan[2066] PV /dev/sdb online, VG green is complete.
>   pvscan[2066] VG green skip autoactivation.

The "skip autoactivation" means that the VG has already been activated
by a prior pvscan, so it's not being activated again.  This state is kept
in /run/lvm/vgs_online/<vgname>.  The files under /run need to be cleared
by reboot.  The first pvscan to activate the VG creates that temp file
(during startup there's often a race among multiple pvscans to activate
the same VG, and the temp file ensures that only one of them does it.)

> So is this some kind of bug/regression? Or is it intended for some
> reason? What I expect would be, when the command is run with any of
> the legs of such an LV as the device, it will check whether all legs
> of it are available and if so, the LV will be activated.

The files under /run/lvm/pvs_online/ record which PVs have appeared during
startup; they are created by the pvscan for each device.  pvscan uses
these to know when the VG is complete and the LVs can be activated.

To test this out manually, remove all the files in pvs_online and
vgs_online, and run pvscan --cache -aay $dev for each device in your VG.
You should find that the final pvscan will activate the VG.

Dave

_______________________________________________
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-06-28 15:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-27 13:01 [linux-lvm] pvscan --cache -aay $device does not activate LV with multiple "legs" Tom Yan
2021-06-28 15:08 ` David Teigland [this message]
2021-06-28 16:47   ` Tom Yan
2021-06-28 17:25     ` Tom Yan
2021-06-28 17:52       ` 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=20210628150827.GA23977@redhat.com \
    --to=teigland@redhat.com \
    --cc=linux-lvm@redhat.com \
    --cc=tom.ty89@gmail.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).