pvscan --cache -aay $device does not activate LV with multiple "legs"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/




[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux