Bobby Johnson wrote: > A few questions in regards to the discussion between Robert Haarman and > mickey around Nov 24 on ccd mirroring. The conclusion is don't use c > for a usable partition in a ccd device.
If "conclusion" is the right word in a discussion between someone who didn't understand the process and someone who wrote a large chunk of the driver in question, sure. Reality can be discussed, but discussion doesn't change reality. > This sounds fine until I try to recover from a disk failure. When I use > the c partition in a ccd mirror device I can unconfigure the ccd and > mount each half of the mirror seperately. So if a hard disk were to > fail I could edit my fstab and the server could be back up quickly. > With any other partition scheme this seems impossible, and would require > a dd before the filesystem could be mounted. Your statement is blatantly wrong. It is most certainly NOT impossible, and it is very easy to do if you do things right. You don't even have to edit anything...you could pull a disk out and not edit anything and have the system come back up on one disk...If you do it right. :) (hint: you can do a CCD of just one disk). (hint 2: you can't use the same partition twice, it will generate an error). (hint 3: Errors can be your friend, they are not always to be avoided) > Mickey's reasoning behind not using c is that the real disk's label will > get trashed. No, Mickey's reasoning behind not using the 'c' partition is that YOU DON'T DO THAT. BY DEFINITION. He's a developer. He gets to make definitions. > I don't see how this is possible if the real disks are > setup properly. Your lack of understanding doesn't change the reality. > My real disks are setup with a small unused a > partition, with d and e setup for the ccd mirrors. c is then used > inside each ccd for the main filesystem. Then you are a fool. 'c' is the entire disk, be it physical or logical. By definition. It is not for "general use". Again, by definition. Use it any other way, you are playing a stupid game. The fact that you do not lose this game at /any particular instant/ does not mean you won the game. If you sit me down in front of a chess master and I'm not defeated after three moves, I do NOT get to say, "I know what I am doing! I am right! I know how to play this game! Follow my advice!". Even if there were no technical reason not to (mis)use things as you propose, the developers have said, "DON'T DO THIS". If you violate the rules and get away with it today and developers make a change which clobbers your disk tomorrow, we will laugh at you. This is not that difficult. ccd(4) makes a virtual disk out of a physical partition of an existing system. That virtual disk has to have a disklabel. That virtual disk's disklabel is JUST LIKE ANY OTHER disklabel, 'c' is the entire (virtual) disk! You don't get to use 'c' on a physical disk for a file system, you don't get to use it on a logical disk for a file system. Period. One big hint: The "initial" disklabel ccd(4) provides a virtual disk is "wrong". Hit "D" while in the command mode of disklabel to reset it to "default", now things will look a lot more familiar, and perhaps a bit less likely to cause you to argue in favor of doing things wrong. Let me tell you point blank: It is not difficult to properly set up a ccd(4) mirroring system which can be rebooted off EITHER drive without making a single configuration change (don't think of trying to re-attach the mirrors without rebuilding first, however). I've done it, I have tested it, I have shown my process to the person who wrote much of the driver in question and he has said I did it right. I did this by reading the man pages and a lot experimenting and figuring out what was REALLY going on, not just punching a certain sequence of characters someone else told me and hoping magic happened. Doing things wrong buys you nothing. Nick.

