Subject: Re: RAIDFrame: Reconfiguring an array
To: None <netbsd-users@netbsd.org>
From: Mark Cullen <mark.r.cullen@gmail.com>
List: netbsd-users
Date: 06/11/2006 18:32:07
Frederick Bruckman wrote:
> In article <20060610190920.35138325C7@cs.usask.ca>,
> 	Greg Oster <oster@cs.usask.ca> writes:
> 
>>Mark Cullen writes:
>>
>>>Greg Oster wrote:
>>>
>>>>Mark Cullen writes:
>>>>
>>>>
>>>>>but the data on the two disks is still 
>>>>>different, that is, /dev/wd3a still has the old copy of the data. 
>>>>
>>>>
>>>>Um... after the 'raidctl -i raid0' completes, the data parts of wd1a 
>>>>and wd3a had better be *exactly* the same!
>>>
>>>They weren't the same afterwards! If I mounted just the disk that was 
>>>missing when I added the new data, after doing an -i, the data was *not* 
>>>there on that disk. I had to force a rebuild of the disk in order to get 
>>>the data on to it.
>>>
>>>However, I may know why? I took wd1 out, and put the new data on wd3. If 
>>>I issue a -i, does it use the first disk in the array config to rebuild 
>>>the parity? 
>>
>>Yes.  The first disk in a RAID 1 set is considered the 'master', and 
>>in the face of having 2 disks where it can't tell which is "more 
>>correct", the 'master' will be used as the difinitive source.
> 
> 
> Now, if Mark had just removed wd1, wrote some data to wd3,
> shutdown cleanly and added wd1 back, wd3 would become the
> master, right?  We hope?  It only happened the way it did
> because he used "raidctl -C"?
> 
> 
> Frederick
> 
> 

Ok, well I want to apologise! I said -c didn't seem to want to work, but 
I have tried it just now and it actually works fine, and labels the 
newly re-added disk as "failed" instead of "optimal", as with -C, which 
is what I would have expected to happen!

After adding the new disk, however, I cannot do an -i. I have to first 
do a -R and rebuild the disk, and then I can do an -i. Is this correct? 
This would mean that the 'master' would always be the first working drive?

Don't get me wrong, I am actually really quite impressed with it all! At 
first the configuration seemed quite difficult compared to a vinum 
configuration, but it's really not that bad at all once you've been 
through it, even just once.

Oh, and I tried adding a spare and reconstructing from that. It actually 
wasn't `raidctl -R absent raid0`, it was `raidctl -R component1 raid0`, 
but it did indeed work as you said, and the spare disk got transformed 
in to a, uhm, non-spare disk after a quick reboot. That, I like!


One last question (I think). Is it safe to use RAIDFrame on a UFS2 FS, 
with softdep enabled? The extend of testing I have done so far is 
copying the pkgsrc tree over to the array. Are there any good stress 
testers for filesystems? Would copying, moving, deleteing and changing 
permissions of multiple copies of the pkgsrc tree be a reasonably good 
stress test?

I've actually ordered a new disk, and I hope to switch over to NetBSD 
sometime next week if all goes well. Hopefully I won't run in to any 
strange issues :-)

Thanks all!