From: NeilBrown <neilb@suse.de>
To: Joe Lawrence <joe.lawrence@stratus.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: LVM RAID1 syncing component
Date: Tue, 2 Dec 2014 08:41:11 +1100 [thread overview]
Message-ID: <20141202084111.6514ec79@notabene.brown> (raw)
In-Reply-To: <20141201161947.1d503df9@jlaw-desktop.mno.stratus.com>
[-- Attachment #1: Type: text/plain, Size: 1759 bytes --]
On Mon, 1 Dec 2014 16:19:47 -0500 Joe Lawrence <joe.lawrence@stratus.com>
wrote:
> On Thu, 27 Nov 2014 07:41:58 +1100
> NeilBrown <neilb@suse.de> wrote:
>
> > On Mon, 24 Nov 2014 23:07:32 -0500 Joe Lawrence <joe.lawrence@stratus.com>
> > wrote:
> >
> > > Does anyone know how its possible to determine which side of an LVM RAID 1
> > > is the stale partner during RAID resync?
> > >
> > > In ordinary MD RAID, I believe you can check
> > > /sys/block/md0/md/dev-XXX/state,
> >
> > Why do you believe that?
> >
> > During a resync (after an unclean shutdown) the devices are indistinguishable.
> > RAID1 reads all drives and if there is a difference it chooses one data block
> > to write to the others - always the one with the lowest index number.
> >
> > So with md or LVM it is the same: first "first" is "copied" to the "second".
>
> Hi Neil,
>
> Here's a quick example of my thought-process, where md2 is an in-sync
> RAID1 of sdq2 and sdr2 with an internal write bitmap:
>
> % mdadm --fail /dev/md3 /dev/sdr2
> % mdadm --remove /dev/md3 /dev/sdr2
You are referring to what I would call "recovery", not "resync"
(which is why I put "(after an unclean shutdown)" in my answer to make it
clear what circumstances I was talking about).
resync: fixing things after an unclean shutdown
recovery: restoring data after a device has been removed an another
(or possibly the same) added.
I think
dmsetup info
should provide the info you want.
One of the fields is a sequence of letters 'D', 'a', 'A'.
* Status characters:
* 'D' = Dead/Failed device
* 'a' = Alive but not in-sync
* 'A' = Alive and in-sync
Does that provide the information you wanted?
NeilBrown
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 811 bytes --]
next prev parent reply other threads:[~2014-12-01 21:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-25 4:07 LVM RAID1 syncing component Joe Lawrence
2014-11-26 5:42 ` Chris Murphy
2014-11-26 13:20 ` [linux-lvm] " Joe Lawrence
2014-11-26 13:20 ` Joe Lawrence
2014-11-27 12:52 ` [linux-lvm] " Heinz Mauelshagen
2014-11-26 20:41 ` NeilBrown
2014-11-29 15:26 ` Peter Grandi
2014-12-01 23:28 ` NeilBrown
2014-12-01 21:19 ` Joe Lawrence
2014-12-01 21:27 ` Joe Lawrence
2014-12-01 21:41 ` NeilBrown [this message]
2014-12-02 19:05 ` Joe Lawrence
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=20141202084111.6514ec79@notabene.brown \
--to=neilb@suse.de \
--cc=joe.lawrence@stratus.com \
--cc=linux-raid@vger.kernel.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.