All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@redhat.com>
To: Winston Wen <wentao@uniontech.com>, lvm-devel@lists.linux.dev
Subject: Re: lvm2-monitor.servcie block boot process due to bad storage device
Date: Tue, 23 Apr 2024 13:41:11 +0200	[thread overview]
Message-ID: <0df2eac5-c8ad-4e32-ac06-248b7edb8858@redhat.com> (raw)
In-Reply-To: <BA135FC1810D838F+20240423084101.40b9659c@winn-pc>

Dne 23. 04. 24 v 2:41 Winston Wen napsal(a):
> Hi,
>
> If a device's IO does not respond, it will block in the path of
> partition scanning. But at this point, it has already created the
> part0, like /dev/sda, in devtmpfs, but the mutex of the device has been
> held by the partition scanning code, so all processes attempting to
> open it will enter a wait.
>
> lvm scans and opens block devices under /dev/ during startup, so if
> there are any bad devices mentioned above, lvm2-monitor.server will be
> blocked, and because its type is oneshot, it will block the boot
> process, even if the poor device is not using lvm.
>
> May I ask if there is a way to avoid it? For example, can the
> type of this service be changed from oneshot to simple? Or is there
> any other better way?


Hi

We are aware of this weakness and we are thinking about the solution for this.

However - for booting -  you should not be actually monitoring things in ramdisk

(lvm.conf should use  monitoring=0)  - so the boot is monitore-less.


Once system is switch to rootfs - monitoring should be enabled with

vgchange --monitor y  (if enabled in /etc/lvm/lvm.conf)


But we need to rethink some caching strategy - as the code for plain lvm2 
command is now causing some troubles within dmeventd instance.


Regards

Zdenek


  reply	other threads:[~2024-04-23 11:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-23  0:41 lvm2-monitor.servcie block boot process due to bad storage device Winston Wen
2024-04-23 11:41 ` Zdenek Kabelac [this message]
2024-04-25 17:02 ` David Teigland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0df2eac5-c8ad-4e32-ac06-248b7edb8858@redhat.com \
    --to=zkabelac@redhat.com \
    --cc=lvm-devel@lists.linux.dev \
    --cc=wentao@uniontech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.