>  http://inglorion.net/documents/tutorials/ccd/
> 
> I have a few questions/comments about the above and about ccd
> in OpenBSD in general.
> 
> 1) You talk about "RAID only works with whole disks"?  I'm curious 
> which RAID implementation you're referring to... it seems like you 
> might be talking about RAIDframe, but it works with partitions 
> instead of disks too.  (In fact, it only cares about parititions.)

I might be wrong. I've only ever seen RAID used on whole disks. I'll 
look into RAIDframe; if that supports using partitions as components, 
I'll change the HOWTO. Thanks for pointing this out.

> 2) How does ccd keep track of the mirror getting out-of-sync?  (i.e. 
> if the system happens to fall over at the exact instant where a write 
> hits one of the disks, but not the other?)  I know how this is done in 
> RAIDframe, but I don't see a similar mechanism in ccd, and lacking 
> that mechanism would be Very Dangerous.  (if that data is never 
> overwritten, and a disk fails, you might be left with the disk with 
> correct data, or the one without correct data.  You flip the coin.)

AFAIK, ccd doesn't have any mechanisms for that. If one disk fails, all 
you can do is reconfigure the ccd device to use only the remaining 
disks, dump the filesystem, replace the failed disk, set up your old ccd 
configuration, newfs, and restore. This is all manual. To me, that's 
acceptible, because I don't expect my disks to fail more than once a 
year, and I don't mind spending an hour per year rebuilding filesystems.

> 3) The code appears to only ever do reads from the first partition
> in 'old_io'-mode (the current default). That is fine if only the 
> mirror fails, I suppose.  I havn't dug deep enough into ccd.c to 
> determine what's really going on in !old_io mode, but it looks like
> it reads from both parts of the mirror? (whether it needs to or not) 
> There doesn't appear to be any mechanism here to say "this write failed"
> and then to note that the data on a particular block is now invalid.  

I don't know any implementation details; I haven't actually looked at 
the code. To me, it's enough that I have a second copy of my data.

> 4) Nothing is mentioned about how to "recover" from a disk failure.  
> This is perhaps the most important part of any mirroring setup!! 

See my answer to point 2.

> I think I saw mention of 'dd' in another post -- if that is indeed 
> the mechanism, then, at a minimum, care must be taking to make sure 
> the filesystem is not being written while the 'dd' is being done!!

You do the recovery offline.

> I believe there are some very good reasons to be using the mirroring 
> in RAIDframe, and to not be even thinking of using the 
> so-called-"mirroring" support in ccd -- to me using ccd for 
> "mirroring" is just asking for trouble.

It depends on what you need, I guess. If you want availability and 
automatic recovery, ccd is simply not an option. If all you want is to 
have your data mirrored, then ccd seems to do just fine. I'm in the 
latter category - for now anyway.

> But that's just my $0.02, and yes, I'll admit to being biased towards 
> RAIDframe.  At the same time, however, I don't want to see to see people
> get badly burned by something that is advertised as a "solution" when
> it really isn't (and when other real solutions do exist -- RAIDframe 
> only adds 150K to SomeOtherBSD's kernel these days).

I think I should add a few more warnings to my HOWTO, just to make sure 
people aren't expecting ccd to things it simply doesn't do.

> Thanks for your time.

Thanks for yours. You've made some very insightful comments.

Regards,

Bob

---
I can't remember the last time I forgot something.

Reply via email to