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

Zdenek Kabelac zdenek.kabelac at gmail.com
Thu Sep 23 13:49:09 UTC 2021


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





More information about the linux-lvm mailing list