From: NeilBrown <neilb@suse.de>
To: Pavel Hofman <pavel.hofman@ivitera.com>
Cc: "Jérôme Poulin" <jeromepoulin@gmail.com>,
linux-raid <linux-raid@vger.kernel.org>
Subject: Re: Rotating RAID 1
Date: Tue, 16 Aug 2011 08:42:51 +1000 [thread overview]
Message-ID: <20110816084251.2d8e7831@notabene.brown> (raw)
In-Reply-To: <4E49849E.4030604@ivitera.com>
On Mon, 15 Aug 2011 22:42:06 +0200 Pavel Hofman <pavel.hofman@ivitera.com>
wrote:
>
> Dne 15.8.2011 22:25, Jérôme Poulin napsal(a):
> > On Mon, Aug 15, 2011 at 4:21 PM, Pavel Hofman <pavel.hofman@ivitera.com> wrote:
> >> Does your scenario involve using two "external" drives, being swapped
> >> each time?
> >
> > Yes, exactly, 3 or more drive, one stays in place, and the others get
> > rotated off-site.
> >
> >> I am using such setup, but in order to gain the bitmap
> >> performance effects, I have to run two mirrored RAID1s, i.e. two
> >> bitmaps, each for its corresponding external disk. This setup has been
> >> working OK for a few years now.
> >
> > Did you script something that stops the RAID and re-assemble it? The
> > RAID must stay mounted in my case as there is live data (incremential
> > backups, so even if the last file is incomplete it is not a problem.)
>
> I am working on wiki description of our backup solution. The priorities
> got re-organized recently, looks like I should finish it soon :-)
>
> Yes, I have a script automatically re-assembling the array corresponding
> to the added drive and starting synchronization. There is another script
> checking synchronization status, run periodically from cron. When the
> arrays are synced, it waits until the currently running backup job
> finishes, shuts down the backup software (backuppc), unmounts the
> filesystem to flush, removes the external drives from the array (we run
> several external drives in raid0), does a few basic checks on the
> external copy (mounting read-only, reading a directory) and puts the
> external drives to sleep (hdparm -Y) for storing them outside of company
> premises.
>
> Give me a few days, I will finish the wiki page and send you a link.
>
I'm not sure from you description whether the following describes exactly
what you are doing or not, but this is how I would do it.
As you say, you need two bitmaps.
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
mkfs /dev/md1; mount /dev/md1 ...
Then you can remove either or both of X and Y and which each is re-added it
will recover just the blocks that it needs. X from the bitmap of md0, Y from
the bitmap of md1.
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 22:42 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 [this message]
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=20110816084251.2d8e7831@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).