[linux-lvm] [PATCH 1/1] pvscan: wait for udevd

heming.zhao at suse.com heming.zhao at suse.com
Wed Feb 17 01:49:31 UTC 2021


On 2/11/21 7:16 PM, Christian Hesse wrote:
> From: Christian Hesse <mail at eworm.de>
> 
> Running the scan before udevd finished startup may result in failure.
> This has been reported for Arch Linux [0] and proper ordering fixes
> the issue.
> 
> [0] https://bugs.archlinux.org/task/69611
> 
> Signed-off-by: Christian Hesse <mail at eworm.de>
> ---
>   scripts/lvm2-pvscan.service.in | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/scripts/lvm2-pvscan.service.in b/scripts/lvm2-pvscan.service.in
> index 09753e8c9..7b4ace551 100644
> --- a/scripts/lvm2-pvscan.service.in
> +++ b/scripts/lvm2-pvscan.service.in
> @@ -4,6 +4,7 @@ Documentation=man:pvscan(8)
>   DefaultDependencies=no
>   StartLimitIntervalSec=0
>   BindsTo=dev-block-%i.device
> +After=systemd-udevd.service
>   Before=shutdown.target
>   Conflicts=shutdown.target
>   
> 

I watched a similar issue with lvm2-monitor.service.
In a very old machine (i586), udevd cost too much time to finish, it triggered
lvm2-monitor timeout then reported:
> WARNING: Device /dev/sda not initialized in udev database even after waiting 10000000 microseconds.

One workable solution is to add "systemd-udev-settle.service" (obsoleted) or
"local-fs.target" in "After" of lvm2-monitor.service.

Regards,
Heming




More information about the linux-lvm mailing list