All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@redhat.com>
To: John Stoffel <john@stoffel.org>
Cc: dm-devel@redhat.com, Drew Hastings <dhastings@crucialwebhost.com>
Subject: Re: Possible bug in mirror target
Date: Tue, 12 Feb 2019 16:02:11 +0100	[thread overview]
Message-ID: <84219415-de11-5b28-ec2f-68ee7e74c4b0@redhat.com> (raw)
In-Reply-To: <23648.40558.660430.523285@quad.stoffel.home>

Dne 10. 02. 19 v 22:58 John Stoffel napsal(a):
>>>>>> "Zdenek" == Zdenek Kabelac <zkabelac@redhat.com> writes:
> 
> Zdenek> Dne 05. 02. 19 v 1:47 Drew Hastings napsal(a):
>>> Hi,
>>>
>>> I'm assuming all user space code is expected to use the handle_errors feature,
>>> so this isn't that big of a deal. I'm also using 4.19.13, which I think is
>>> more recent than the latest update to dm-raid1.c
>>>
>>> That said, there may be a bug that causes the entire mirror to crash if there
>>> is an error on the first leg of the mirror, but not on the 2nd leg.
>>>
>>> Works fine if you do cause IO errors on the 2nd leg:
>>>
>>> root@kernel-dev:~# dmsetup create zerodev --table "0 1073741824 zero"
>>> root@kernel-dev:~# dmsetup create errordev --table "0 1073741824 error"
>>>
>>>
>>> root@kernel-dev:~# dmsetup create mirror-table --table "0 1073741824 mirror
>>> core 2 524288 nosync 2 /dev/mapper/zerodev 0 /dev/mapper/errordev 0 0"
> 
> Zdenek> There are 2 operational modes for old dm mirror target.
> Zdenek> One requires to handle errors externally. Please check i.e. the following
> Zdenek> guide for mirror target:
> 
> Zdenek> https://wiki.gentoo.org/wiki/Device-mapper
> 
> Zdenek> Lvm2 is using 'dmeventd' to service this error handling
> Zdenek> (i.e. dropping the mirror leg or allocating replacement one).
> 
> Is it time to remove the dm-mirror target then?  Or to deprecate it?
> Or to just silently replace it with something that does the right
> thing when errors happen?  I can't think of why *anyone* would want to
> use the dm-mirror target as it now seems to work.


Hi

The old dm mirror works differently then new dm raid - so if you have
an old one present/running (i.e. LVM mirrored volume) using this target - you 
need to have this target present to be able to access such volume.

You can (in lvm2) convert such mirror to use newer dm raid target - but
this requires some extra space (even though very small metadata volume) which 
is now required per each mirrored leg.

Both targets are still maintained and bugfixed.

There is also something about very high complexity of mdraid code and
relative simplicity of old mirror target.

As for comment about *anyone* - majority of users are consuming DM targets via 
lvm2 - there you get this transition automatically - when you ask to create 
mirrored  LV - lvm2 will use (if present in kernel)  newer md  raid variant. 
If anyone is using DM directly with 'dmsetup' command - it's assumed these are 
skilled users familiar with kernel doc (dmsetup is low-level admins tool). 
Lvm2 should be seen as 'friendly-face' of these DM targets - which otherwise 
do require pretty complex setup. If you do not want to use lvm2, the tool 
replacing lvm2 needs to reproduce this extra logic.

Regards

Zdenek

  reply	other threads:[~2019-02-12 15:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-05  0:47 Possible bug in mirror target Drew Hastings
2019-02-05 10:03 ` Zdenek Kabelac
2019-02-10 21:58   ` John Stoffel
2019-02-12 15:02     ` Zdenek Kabelac [this message]
2019-02-12 22:36       ` John Stoffel
2019-02-13 14:21         ` Zdenek Kabelac
2019-02-13 15:01           ` Bryn M. Reeves
2019-02-13 18:08             ` Zdenek Kabelac
2019-02-14 10:23               ` Bryn M. Reeves

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=84219415-de11-5b28-ec2f-68ee7e74c4b0@redhat.com \
    --to=zkabelac@redhat.com \
    --cc=dhastings@crucialwebhost.com \
    --cc=dm-devel@redhat.com \
    --cc=john@stoffel.org \
    /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.