All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] pvscan --cache -aay $device does not activate LV with multiple "legs"
@ 2021-06-27 13:01 Tom Yan
  2021-06-28 15:08 ` David Teigland
  0 siblings, 1 reply; 5+ messages in thread
From: Tom Yan @ 2021-06-27 13:01 UTC (permalink / raw)
  To: linux-lvm

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/


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-06-28 17:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2021-06-28 16:47   ` Tom Yan
2021-06-28 17:25     ` Tom Yan
2021-06-28 17:52       ` Tom Yan

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.