Mirror MBR?

R. B. Riddick arne_woerner at yahoo.com
Wed Aug 16 12:50:57 UTC 2006


--- Danny Carroll <danny at dannysplace.net> wrote:
> My main question is about the MBR. I dont see anywhere in the doc where
> I should put a new boot record on the disk after doing:
>
If u mirror the whole disk (solution 1) the first sectors should be mirrored
like the others (but not the last, which contains disk specific meta data).

> dd if=/dev/zero of=/dev/ad0 bs=512 count=79
>
What is that good for? Doesn't gmirror synchronize automatically?

> Does this mean that the MBR from the mirror gets put onto this first disk?
>
During boot stages gmirror is not known. All boot programmes (BIOS, stage1,
stage2, stage3) use the data on the first sectors of the disk, slice and/or
partition) for booting... When the system mounts the root file system gmirror
is needed and used if proper configured (that would be: gmirror module loaded
before boot or compiled to kernel).

> I ask because, I need to know what should happen when I need to replace
> a disk.
>
If I were u, I would simulate all (or the imporant) scenarios:
E. g.:
1. One disk failed while power is off...
2. One disk is added while power is off...
3. One disk recovers after power on (e. g. after a power failure, which
corrupted the mirror)...

If you are really busy as a bee, you could try putting a geom_nop device into
the mirror and see, what happens if u suddenly configure the nop-disk to behave
like a really bad disk... :-)

> I know that after replacing the disk I should probably have to do
> something like this: (Assume ad0 is the new disk)
> 
> gmirror configure -a gm0
>
What is that good for? I run my geom_mirrors always in AUTO_SYNC mode... E. g.
in case of a power failure or so...

> But does that guarantee me that if ad0 fails, then I still have a
> bootable system (assuming bios knows to boot of ad1).
> 
Yes, it should. At least if the BIOS is smart enough to look for another disk
if the first one mentioned in BIOS configuration behaves like a dead disk...

I tested it on my box and I think, that it worked fine... <-- this was no sworn
testimony...

-Arne
---
Arne likes "Kentucky Fried Movie" (especially "A fistful of yen") :-)

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the freebsd-geom mailing list