Linux-LVM Archive mirror
 help / color / mirror / Atom feed
From: Tom Yan <tom.ty89@gmail.com>
To: linux-lvm@redhat.com
Subject: [linux-lvm] pvscan --cache -aay $device does not activate LV with multiple "legs"
Date: Sun, 27 Jun 2021 21:01:43 +0800	[thread overview]
Message-ID: <CAGnHSE=HRk+x4tcVdPuZFtnBGai3dP5KC6wHpeX1adAXq_mftQ@mail.gmail.com> (raw)

Hi,

I notice that LV with multiple legs (i.e. type raid or similar) is not
auto activated after boot.

After finding out that the activation of LVs mainly relies on
lvm2-pvscan@.service (and the udev rules that make the PVs want their
own instances), wondering whether the issue is due to a race condition
or so, I run the command `pvscan --cache -aay $device` (where $device
is in the form of $major:$minor). It seems that it's simply because
the device-specific run of the command will not activate such LV(s)
anyway:

[tom@archlinux ~]$ sudo lvchange -an /dev/green/meh
[tom@archlinux ~]$ sudo lvs | grep meh
  meh      green rwi---r--- 512.00m
[tom@archlinux ~]$ sudo pvscan --cache -aay /dev/sda2
  pvscan[2064] PV /dev/sda2 online, VG green is complete.
  pvscan[2064] VG green skip autoactivation.
[tom@archlinux ~]$ sudo pvscan --cache -aay /dev/sdb
  pvscan[2066] PV /dev/sdb online, VG green is complete.
  pvscan[2066] VG green skip autoactivation.
[tom@archlinux ~]$ sudo lvs | grep meh
  meh      green rwi---r--- 512.00m

However, if I run the command without a device specified, such LV will
be activated:

[tom@archlinux ~]$ sudo pvscan --cache -aay
  pvscan[2071] PV /dev/sda2 online, VG green incomplete (need 1).
  pvscan[2071] PV /dev/sdb online, VG green is complete.
  pvscan[2071] VG green run autoactivation.
  5 logical volume(s) in volume group "green" now active
[tom@archlinux ~]$ sudo lvs | grep meh
  meh      green rwi-a-r--- 512.00m
100.00

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.

Regards,
Tom

_______________________________________________
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  9:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-27 13:01 Tom Yan [this message]
2021-06-28 15:08 ` [linux-lvm] pvscan --cache -aay $device does not activate LV with multiple "legs" David Teigland
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='CAGnHSE=HRk+x4tcVdPuZFtnBGai3dP5KC6wHpeX1adAXq_mftQ@mail.gmail.com' \
    --to=tom.ty89@gmail.com \
    --cc=linux-lvm@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 read-only IMAP folder(s) and NNTP newsgroup(s).