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] vgchange -a n --sysinit hangs without udevd

2021-09-22 Thread Arkadiusz Miśkiewicz
W dniu 22.09.2021 o 09:19, Arkadiusz Miśkiewicz pisze:

> 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.


vgchange -a n --sysinit --noudevsync

also works but I wonder what has changed, so that this option is needed now?

-- 
Arkadiusz Miśkiewicz, arekm / ( maven.pl | pld-linux.org )

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