From: Mario 'BitKoenig' Holbe <Mario.Holbe@TU-Ilmenau.DE>
To: linux-raid@vger.kernel.org
Subject: Re: direction criterium for synchronisation raid1
Date: Tue, 16 Oct 2007 13:33:27 +0200 [thread overview]
Message-ID: <ff27i7$jah$1@ger.gmane.org> (raw)
In-Reply-To: 47148439.2020706@mail.informatik.uni-essen.de
Christina Braun <braun@mail.informatik.uni-essen.de> wrote:
> which is in raid1 the criterion for the direction of synchronisation? In
The event counter :)
> How can I tell the system which mirrored partition is now the
> data-source without
> making the raid1 new or zero the superblock? Is the destination in
Usually you don't need to do this. md manages a per-mirror event counter
which always gets increased when relevant events occur like assembling
or stopping an array, adding or removing mirrors etc.
Due to this, whenever you remove a mirror off an raid1, the event
counter of the remaining mirrors gets increased. When you shut down your
machine, plug a disk off and turn the machine on again, once the raid
gets assembled, the event counter of the remaining mirrors gets
increased.
Thus, as long as you access those devices through md only (and don't
mount the device of one of the mirrors as plain filesystem, for
example), the remaining mirrors will always be newer than removed ones
and thus md knows the sync-direction (when they are equally "old", they
are in sync per definition).
There are some exceptions to this:
1. When you like to use the older mirror as source of synchronization,
you have to take care and better zero the superblock of the newer one
before (make sure your raid device did not get assembled, probably based
on the wrong mirror).
2. When you plug a foreign mirror into the system which - however -
refers to the same raid-device (especially having the same UUID etc.)
as your own mirrors but has a bigger event counter, you have to take
care a lot :) This should usually not happen accidentially, as long as
you avoid to assign UUIDs to new raids manually.
> every case the device
> in mdadm manage after the add ? Can I see the source or destination by a
> info like mdstat or superblock?
Have a look at mdadm -E. This shows you the superblocks of single
mirrors and within them their respective event counters.
regards
Mario
--
A promise to a woman is just a lie that hasn't happened yet.
-- Mr. Floppy
next prev parent reply other threads:[~2007-10-16 11:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-16 9:28 direction criterium for synchronisation raid1 Christina Braun
2007-10-16 11:33 ` Mario 'BitKoenig' Holbe [this message]
2007-10-16 13:32 ` Christina Braun
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='ff27i7$jah$1@ger.gmane.org' \
--to=mario.holbe@tu-ilmenau.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).