From: NeilBrown <neilb@suse.de>
To: "Jérôme Poulin" <jeromepoulin@gmail.com>
Cc: Pavel Hofman <pavel.hofman@ivitera.com>,
linux-raid <linux-raid@vger.kernel.org>
Subject: Re: Rotating RAID 1
Date: Tue, 16 Aug 2011 09:55:17 +1000 [thread overview]
Message-ID: <20110816095517.757afc07@notabene.brown> (raw)
In-Reply-To: <CALJXSJqVD9ibB9LAM7jU5aJFbyEssCuf2QMai+K=8xk6=pfRew@mail.gmail.com>
On Mon, 15 Aug 2011 19:32:04 -0400 Jérôme Poulin <jeromepoulin@gmail.com>
wrote:
> On Mon, Aug 15, 2011 at 6:42 PM, NeilBrown <neilb@suse.de> wrote:
> > So if there are 3 drives A, X, Y where A is permanent and X and Y are rotated
> > off-site, then I create two RAID1s like this:
> >
> >
> > mdadm -C /dev/md0 -l1 -n2 --bitmap=internal /dev/A /dev/X
> > mdadm -C /dev/md1 -l1 -n2 --bitmap=internal /dev/md0 /dev/Y
>
> That seems nice for 2 disks, but adding another one later would be a
> mess. Is there any way to play with slots number manually to make it
> appear as an always degraded RAID ? I can't plug all the disks at once
> because of the maximum of 2 ports.
Yes, add another one later would be difficult. But if you know up-front that
you will want three off-site devices it is easy.
You could
mdadm -C /dev/md0 -l1 -n2 -b internal /dev/A missing
mdadm -C /dev/md1 -l1 -n2 -b internal /dev/md0 missing
mdadm -C /dev/md2 -l1 -n2 -b internal /dev/md1 missing
mdadm -C /dev/md3 -l1 -n2 -b internal /dev/md2 missing
mkfs /dev/md3 ; mount ..
So you now have 4 "missing" devices. Each time you plug in a device that
hasn't been in an array before, explicitly add it to the array that you want
it to be a part of and let it recover.
When you plug in a device that was previously plugged in, just "mdadm
-I /dev/XX" and it will automatically be added and recover based on the
bitmap.
You can have as many or as few of the transient drives plugged in at any
time as you like.
There is a cost here of course. Every write potentially needs to update
every bitmap, so the more bitmaps, the more overhead in updating them. So
don't create more than you need.
Also, it doesn't have to be a linear stack. It could be a binary tree
though that might take a little more care to construct. Then when an
adjacent pair of leafs are both off-site, their bitmap would not need
updating.
NeilBrown
--
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 23:55 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
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 [this message]
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=20110816095517.757afc07@notabene.brown \
--to=neilb@suse.de \
--cc=jeromepoulin@gmail.com \
--cc=linux-raid@vger.kernel.org \
--cc=pavel.hofman@ivitera.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 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).