From: Phil Turmel <philip@turmel.org>
To: "Jérôme Poulin" <jeromepoulin@gmail.com>
Cc: linux-raid <linux-raid@vger.kernel.org>
Subject: Re: Rotating RAID 1
Date: Mon, 15 Aug 2011 16:19:41 -0400 [thread overview]
Message-ID: <4E497F5D.7000306@turmel.org> (raw)
In-Reply-To: <CALJXSJq6bDoWhSY3jQa8scpMo4QzHPzUvVPnHbox=xXYPm877w@mail.gmail.com>
Hi Jérôme,
On 08/15/2011 03:56 PM, Jérôme Poulin wrote:
> Then what is different about a standard RAID1, I removed sdb and
> replaced it with a brand new disk, copied the partition template from
> the other one and added the new disk using mdadm -a on both arrays, it
> synced and works, then swapping the other disk back only rebuilds
> according to the bitmap, however sometimes it appears to make a full
> rebuild which is alright. However once, after a day of modifications
> and weeks after setting-up this RAID, at least 100 GB, it took seconds
> to rebuild and days later it appeared to have encountered corruption,
> the kernel complained about bad extents and fsck found errors in one
> of the file I know it had modified that day.
This is a problem. MD only knows about two disk. You have three. When two disks are in place and sync'ed, the bitmaps will essentially stay cleared.
When you swap to the other disk, its bitmap is also clear, for the same reason. I'm sure mdadm notices the different event counts, but the clear bitmap would leave mdadm little or nothing to do to resync, as far as it knows. But lots of writes have happened in the meantime, and they won't get copied to the freshly inserted drive. Mdadm will read from both disks in parallel when there are parallel workloads, so one workload would get current data and the other would get stale data.
If you perform a "check" pass after swapping and resyncing, I bet it finds many mismatches. It definitely can't work as described.
I'm not sure, but this might work if you could temporarily set it up as a triple mirror, so each disk has a unique slot/role.
It would also work if you didn't use a bitmap, as a re-inserted drive would simply be overwritten completely.
> So the question is; Am I right to use md-raid to do this kind of
> stuff, rsync is too CPU heavy for what I need and I need to stay
> compatible with Windows thus choosing metadata 1.0.
How do you stay compatible with Windows? If you let Windows write to any of these disks, you've corrupted that disk with respect to its peers. Danger, Will Robinson!
HTH,
Phil
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-08-15 20:19 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-15 19:56 Rotating RAID 1 Jérôme Poulin
2011-08-15 20:19 ` Phil Turmel [this message]
2011-08-15 20:23 ` Jérôme Poulin
2011-08-15 20:21 ` Pavel Hofman
2011-08-15 20:25 ` Jérôme Poulin
2011-08-15 20:42 ` Pavel Hofman
2011-08-15 22:42 ` NeilBrown
2011-08-15 23:32 ` Jérôme Poulin
2011-08-15 23:55 ` NeilBrown
2011-08-16 6:34 ` Pavel Hofman
2011-09-09 22:28 ` Bill Davidsen
2011-09-11 19:21 ` Pavel Hofman
2011-09-12 14:20 ` Bill Davidsen
2011-08-23 3:45 ` Jérôme Poulin
2011-08-23 3:58 ` NeilBrown
2011-08-23 4:05 ` Jérôme Poulin
2011-08-24 2:28 ` Jérôme Poulin
2011-10-25 7:34 ` linbloke
2011-10-25 21:47 ` NeilBrown
2011-08-16 4:36 ` maurice
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=4E497F5D.7000306@turmel.org \
--to=philip@turmel.org \
--cc=jeromepoulin@gmail.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 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).