Re: [linux-lvm] " Failed to find physical volume

2021-09-23 Thread Roger Heflin
If you have lvmetad running and in use then the lvm commands ask it
what the system has on it.

I have seen on random boots fairly separated systems (rhel7 versions,
and many years newer fedora systems) at random fail to find one or
more pv.s

I have disabled it at home, and in my day job we have also disabled
(across 20k+ systems) as we confirmed it had inconsistency issues
several times on a variety of our newest installs.

Stopping lvmetad and/or restarting it would generally fix it.But
it was a source of enough random issues(often failure to mount on a
boot, so often issues that resulted in page-outs to debug)  and did
not speed things up much enough to be worth it even on devices with
>2000 SAN volumes.

On Thu, Sep 23, 2021 at 8:52 AM Zdenek Kabelac  wrote:
>
> Dne 22. 09. 21 v 18:48 alessandro macuz napsal(a):
> > fdisk correctly identifies the extended partition as 8e.
> > I wonder which kind of data lvmdiskscan and pvs use in order to list LVM
> > physical volumes.
> > Does PVS check some specific metadata within the partition without just
> > relying on the type of partition displayed by fdisk?
> >
> >
>
> Hi
>
> Yes - PVs do have header signature keeping information about PV attributes
> and also has the storage area to keep lvm2 metadata.
>
> Partition flags known to fdisk are irrelevant.
>
>
> Regards
>
> Zdenek
>
> ___
> 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/
>

___
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/



Re: [linux-lvm] " Failed to find physical volume

2021-09-23 Thread Zdenek Kabelac

Dne 22. 09. 21 v 18:48 alessandro macuz napsal(a):

fdisk correctly identifies the extended partition as 8e.
I wonder which kind of data lvmdiskscan and pvs use in order to list LVM 
physical volumes.
Does PVS check some specific metadata within the partition without just 
relying on the type of partition displayed by fdisk?





Hi

Yes - PVs do have header signature keeping information about PV attributes
and also has the storage area to keep lvm2 metadata.

Partition flags known to fdisk are irrelevant.


Regards

Zdenek

___
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/



Re: [linux-lvm] vgchange -a n --sysinit hangs without udevd

2021-09-23 Thread Zdenek Kabelac

Dne 22. 09. 21 v 9:19 Arkadiusz Miśkiewicz napsal(a):


Hello.

Linux 5.10.67, glibc 2.34, lvm 2.03.13, udevd 246, simple init script
run on shutdown which does

vgchange -a n --sysinit

no other processes are running (just init, my script and vgchange),
vgstorage is vg on md raid 10 on 4 hdd disks.

it hangs with

+ /sbin/vgchange -a n --sysinit --verbose --debug
   Failed to find sysfs mount point
   No proc filesystem found: skipping sysfs filter
   No proc filesystem found: skipping multipath filter
   File locking initialisation failed.
   Deactivating logical volume vgstorage/lvhome.
   Removing vgstorage-lvhome (253:0)
   Deactivated 1 logical volumes in volume group vgstorage.

Note that running
vgchange -a n --sysinit --verbose --debug
on fully running system just works fine:

# vgchange -a n --sysinit --verbose --debug
   Deactivating logical volume vgstorage/lvhome.
   Removing vgstorage-lvhome (253:0)
   Deactivated 1 logical volumes in volume group vgstorage.
   0 logical volume(s) in volume group "vgstorage" now active
#


so I've restarted udevd just before vgchange call in my script and it
works.

Other test:

fully running system
# udevd --version
246
# killall udevd
# vgchange -a n --sysinit --verbose --debug
   Deactivating logical volume vgstorage/lvhome.
   Removing vgstorage-lvhome (253:0)
   Deactivated 1 logical volumes in volume group vgstorage.
and hangs


Why is udevd needed for vgchange there? It wasn't needed to deactivate
vg before AFAIK.


strace


Hi

It does look like the initial detection of running udev within lvm2 code is 
doing something wrong.


It should recognize there is no udev running and behave like if  --noudevsync 
would be given.


I'll check what has changed.


Regards

Zdenek


___
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/

Re: [linux-lvm] " Failed to find physical volume

2021-09-23 Thread alessandro macuz
fdisk correctly identifies the extended partition as 8e.
I wonder which kind of data lvmdiskscan and pvs use in order to list LVM
physical volumes.
Does PVS check some specific metadata within the partition without just
relying on the type of partition displayed by fdisk?

Alex

Le mer. 22 sept. 2021 à 01:36, alessandro macuz 
a écrit :

> Hi all,
>
> I sought the web for the error " Failed to find physical volume
> "/dev/zd96p5"." but the closest discussion in the LVM archives I found
> was one of mine back in 2014
>
> https://listman.redhat.com/archives/linux-lvm/2014-June/msg00016.html
>
> This time though it seems pvs fails to find the physical volume when
> lvmdiskscan does recognize it. Do I have to really upgrade lvm2 or is there
> another way to have pvs recognize the volume?
>
> root@server:/etc# lvm version
>   LVM version: 2.02.133(2) (2015-10-30)
>   Library version: 1.02.110 (2015-10-30)
>   Driver version:  4.34.0
> root@ server :/etc# lvmdiskscan -l
>   WARNING: only considering LVM devices
>   /dev/sda5 [  74.05 GiB] LVM physical volume
>   /dev/zd304p3  [  19.00 GiB] LVM physical volume
>   /dev/zd96p5   [1023.52 GiB] LVM physical volume
> *  /dev/zd112p5  [1023.52 GiB] LVM physical volume*
>   0 LVM physical volume whole disks
>   4 LVM physical volumes
> root@ server :/etc# pvs -a /dev/zd96p5
>   Failed to find physical volume "/dev/zd96p5".
>
> Thanks, Alex.
>
___
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/

[linux-lvm] " Failed to find physical volume

2021-09-23 Thread alessandro macuz
Hi all,

I sought the web for the error " Failed to find physical volume
"/dev/zd96p5"." but the closest discussion in the LVM archives I found was
one of mine back in 2014

https://listman.redhat.com/archives/linux-lvm/2014-June/msg00016.html

This time though it seems pvs fails to find the physical volume when
lvmdiskscan does recognize it. Do I have to really upgrade lvm2 or is there
another way to have pvs recognize the volume?

root@server:/etc# lvm version
  LVM version: 2.02.133(2) (2015-10-30)
  Library version: 1.02.110 (2015-10-30)
  Driver version:  4.34.0
root@ server :/etc# lvmdiskscan -l
  WARNING: only considering LVM devices
  /dev/sda5 [  74.05 GiB] LVM physical volume
  /dev/zd304p3  [  19.00 GiB] LVM physical volume
  /dev/zd96p5   [1023.52 GiB] LVM physical volume
*  /dev/zd112p5  [1023.52 GiB] LVM physical volume*
  0 LVM physical volume whole disks
  4 LVM physical volumes
root@ server :/etc# pvs -a /dev/zd96p5
  Failed to find physical volume "/dev/zd96p5".

Thanks, Alex.
___
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/