Some GMirror questions.

Peter Clark clarkp at mtmary.edu
Fri Jun 4 17:39:41 UTC 2010


Hello All,

There are a number of gmirror resources available online but there are a 
few discrepancies. I thought someone here might be able to shed some 
light on them. Also, this is on FreeBSD 8.0 RELEASE.

Does creating the mirror need to be done from a Livefs CD (in Fixit 
mode) or can it be done directly from the OS? The Handbook makes no 
reference to things like:

# Install FreeBSD on to ad0.
# Reboot with the Install CD.
# Enter Fixit mode.
  chroot /dist
  mount -t devfs devfs /dev
  gmirror load
  gmirror label -v -b round-robin gm0 /dev/ad0
  mount /dev/mirror/gm0s1a /mnt
  echo geom_mirror_load="YES" >> /mnt/boot/loader.conf

It just indicates jumping right in with gmirror label from the OS (at 
least it seems to).


Also, these next 2 entries in /etc/rc.conf. The Handbook does not make 
any mention of them. The way the authors state their purpose it would 
seem as though that should be done in all cases of disk mirroring. Is 
that true?

# tell the system that the swap file will be on a mirror, not a raw drive.
  echo ’swapoff=”YES”‘ >> /mnt/etc/rc.conf

# need to do this to make dumping cores happy since it won’t use a 
gmirror’ed drive
dumpdev=”NO”


Lastly, I know at one point the 'load' algorithm had some performance 
problems and people were saying to only use 'round-robin'. It seems as 
though some code was committed back in Dec 2009 to fix it's this. Is 
there a practical rule of thumb to using 'load' vs 'round-robin'? Is 
this an accurate way to look at it?
"Round-robin because if you have two disks in a mirror, they’re both 
under the same 'load' constraints, and it is best to KISS."


Cheers,
Peter


More information about the freebsd-questions mailing list