Mirror MBR?

Miroslav Lachman 000.fbsd at quip.cz
Wed Aug 16 12:52:00 UTC 2006


Danny Carroll wrote:

> Hello all.
> 
> I had a question about gmirror.  I am using Ralf S Engelschall's
> mirroring solution at http://people.freebsd.org/~rse/mirror/
> 
> I used solution one, since I am sure that I will never be using any
> different disks.  It's a pizzabox server, and I don't expect data growth
> so the current disks are fine.
> 
> 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:
> 
> dd if=/dev/zero of=/dev/ad0 bs=512 count=79
> 
> Does this mean that the MBR from the mirror gets put onto this first disk?
> 
> I ask because, I need to know what should happen when I need to replace
> a 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
> gmirror insert gm0 /dev/ad1
> 
> But does that guarantee me that if ad0 fails, then I still have a
> bootable system (assuming bios knows to boot of ad1).

I am using gmirror from this HowTo: 
http://www.onlamp.com/pub/a/bsd/2005/11/10/FreeBSD_Basics.html
After disk replacement (done today), I made just two commands:
gmirror forget gm0
gmirror insert -v gm0 ad6

First command is to "forget about old (not available) disk drive", the 
second adds new disk in to mirror gm0 and start autosynchronization 
(configure -a is default, so is not needed)

Gmirror can boot from any drive, I think MBR is on both drives.

Miroslav Lachman


More information about the freebsd-geom mailing list