All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Rockai <prockai@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH] Use lvconvert --repair as a dmeventd mirror failure handler
Date: Thu, 21 May 2009 11:15:27 +0200	[thread overview]
Message-ID: <87my96q0k0.fsf@mornfall.net> (raw)
In-Reply-To: <64033B0F-38A8-4E13-BDD6-DAFEA17C4C51@redhat.com> (Jonathan Brassow's message of "Wed, 20 May 2009 16:31:37 -0500")

Jonathan Brassow <jbrassow@redhat.com> writes:
> Wait, what?  Are you saying that with this change, it /will/ find space for a
> new mirror leg?  It doesn't do that now.  I also don't  think lvrepair is the
> right place to have the allocation take place.   'lvrepair' should do exactly
> that - repair.  From there, you could do  an lvconvert.  The mirror DSO should
> do the 'lvconvert' portion based  on user set policy found in /etc/lvm/lvm.conf
> -- see  'mirror_log_fault_policy' and 'mirror device_fault_policy'.
>
> Am I missing something?

Yes, the current policy is completely bogus. It will kill LVs that are
completely unrelated to the mirror in question (if they happen to have any
extents allocated in any currently missing PV, which may be even unrelated to
the one that caused the mirror failure). Moreover, I don't know what you mean
with "lvrepair" since there's no such thing. And lvconvert --repair does
exactly repair, by either removing (no parallel space available) or replacing
(free parallel space available) missing devices.

The mirror_log_fault_policy and device_fault_policy is all cool, but it's not
implemented (even the fact it's in lvm.conf while there's no code to handle the
options is quite silly). So I expect that an --auto switch will need to be
added to lvconvert --repair, that will honour those two configuration options.

Please also note that this could have been fixed months ago (the patches have
been in review since last July at least -- see eg. message-id
<87tze8244p.fsf@eriador.mornfall.net>). Please next time, if you know all along
that a policy change is not acceptable, take a few minutes and reply to the
proposed patch. Thanks!

(Just as a rationale, I did not implement the current lvm.conf options simply
because it has been suggested, that a much more complex configuration using
tags is planned. It just seemed redundant to implement options that would
become deprecated in the next release. Unfortunately, no-one has pointed out
that they need to be, or why.)

As for doing things directly in the mirror DSO (as compared to lvconvert
--repair), it would get much more complicated, implementation-wise. It would
also lead to lots of code duplication (and the theoretical advantage of having
the code separated is dubious, too).

Yours,
   Petr.

-- 
Peter Rockai | me()mornfall!net | prockai()redhat!com
 http://blog.mornfall.net | http://web.mornfall.net

"In My Egotistical Opinion, most people's C programs should be
 indented six feet downward and covered with dirt."
     -- Blair P. Houghton on the subject of C program indentation



  reply	other threads:[~2009-05-21  9:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-19  6:01 [PATCH] Use lvconvert --repair as a dmeventd mirror failure handler Petr Rockai
2009-05-19  7:53 ` Milan Broz
2009-05-20 21:31 ` Jonathan Brassow
2009-05-21  9:15   ` Petr Rockai [this message]
2009-05-21 13:26     ` Jonathan Brassow

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=87my96q0k0.fsf@mornfall.net \
    --to=prockai@redhat.com \
    --cc=lvm-devel@redhat.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.