On Mon, 15 Aug 2011 22:42:06 +0200 Pavel Hofman [off-list ref]
wrote:
Dne 15.8.2011 22:25, Jérôme Poulin napsal(a):
quoted
On Mon, Aug 15, 2011 at 4:21 PM, Pavel Hofman [off-list ref] wrote:
quoted
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.
quoted
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