Subject: Re: RAIDframe as a backup technique
To: Amitai Schlair <schmonz@schmonz.com>
From: Greg Oster <oster@cs.usask.ca>
List: netbsd-users
Date: 02/15/2004 15:14:12
Amitai Schlair writes:
> How's that for a titillating subject? Don't worry, I know RAID doesn't 
> obviate the need for backups. I'm interested in getting RAIDframe to do 
> the work of making backups for me.
> 
> My home fileserver running 1.6.2 has root and swap on RAID1, configured 
> according to <URL:http://users.piuha.net/martti/bsd/raid/>. The two 
> ordinary IDE drives are in sleds on the front of the machine that are 
> designed to be easy to insert and remove. (Not hot-swap, of course, but 
> I don't need that.)
> 
> Conveniently, I have a third drive of equal capacity which is just 
> sitting around. I'm thinking it'd be clever to regularly pull one of the 
> RAID1 drives, call that my "backup", slide in the spare, and reconstruct 
> the RAID set.
> 
> It appeals to me that the task at which I'd get lots of practice would 
> be "RAID reconstruction" rather than "making backups". Making backups 
> isn't particularly interesting, whereas reconstructing a RAID set every 
> couple weeks will leave me somewhat comfortable with most of the 
> procedure I'll need to follow when a disk inevitably dies.
> 
> Is this as good an idea as it seemed when it popped into my head? 

Since you're taking down the machine to do it, I'd think it would 
work quite well... (the filesystems will be quiescent, the RAID sets 
in sync, etc.)

> When I 
> swap in a drive that was part of the RAID set two weeks ago, how can I 
> be sure that RAIDframe will reconstruct _onto_ it, not _from_ it? 

The "old" component will have correct component numbers, correct ID's, 
and correct "everything but the modification counter".  In that case, 
RAIDframe will identify the old component as being part of the set, 
but will realize that there is a component out of sync (due to it's 
modification counter being lower) and will mark that old component as 
"failed".  You can just then use "raidctl -R" to rebuild the 
old-component in place (and re-sync to the good component).

> Anything else I should be worried about?

Only making sure that necessary boot-bits also get "mirrored".
That, and there may be an issue if/when the mod-counters ever wrap, 
and the new&correct mod-counter will be less than the old one.  
You'll need to do a couple of billion configures/unconfigures before 
you hit that tho :)

Later...

Greg Oster