Newbie gmirror questions

Mike Clarke jmc-freebsd2 at
Sun Jan 17 16:39:44 UTC 2010

On Saturday 16 January 2010, Pieter de Goeje wrote:

> On Saturday 16 January 2010 00:34:52 Mike Clarke wrote:
> > I'm about to upgrade to more disk space and I'm tempted use this as
> > an opportunity to get two disks and implement gmirror. Before I go
> > ahead there's a few aspects of mirroring I'm not sure about and
> > would appreciate some advice.
> >
> > I'm using grub for multi booting. Does this introduce any problems
> > if I want to boot into Windows or Linux on one of the other
> > partitions?
> Gmirror stores the metadata at the last sector of each disk. So this
> shouldn't be a problem. But other operating systems might overwrite
> this data if you're not careful during the paritioning.

I'll make sure that the last stripe on the disk isn't used by 
any "alien" OS then.

Actually I was more concerned about what happens when I boot into 
another OS like Windows or Linux on one of the spare slices - I'm 
assuming that I have to apply gmirror to the whole disk rather than 
just selected slices?

My main reason for multibooting with grub is to have a spare slice where 
I can install a spare copy of FreeBSD. I find this very useful when I 
do any major upgrade (like trying out your suggestion of going to 
8-STABLE) because I can copy the current system onto the spare slice 
and use that to apply the upgrades, if I hit any major problems I can 
easily revert to booting the original slice until I figure out how to 
fix the problem. I'm assuming that using gmirror won't prevent me from 
doing this.

If I boot into an OS which isn't aware of gmirror, such as Windows, then 
I assume it will just run normally if I point grub to the appropriate 
slice on the primary drive. Next time I boot into FreeBSD then I expect 
gmirror will recognise that the second drive is out of sync with the 
primary and update it in the background. Perhaps this might hit 
performance for a while but on the other hand it provides me with a 
certain amount of "backup" if the Windows system trashes itself because 
I could try to restore it from the copy on the second drive before 
attempting to reboot FreeBSD. I assume the same logic would also apply 
to running Linux on one of the slices, although Linux has software 
mirror capability it appears to be totally different from gmirror so I 
expect it's a case of running that non-mirrored too. If this approach 
isn't wise then I expect I'll need to keep a spare non-mirrored disk 
for the other systems.

I don't expect to need to boot into Windows or Linux very often. Now 
that I've upgraded from FreeBSD 6.4 to 8.0 I'm able to make use of 
virtualbox for this sort of thing which is generally much more 
convenient but I'd like to keep the ability to run them natively should 
the need arise.

Mike Clarke

More information about the freebsd-questions mailing list