For my opinion, gmirror gives the better results than graid. It is well-confirured mainboard-independent solution.
I use gmirror at least for 12 years. It is a good cost-efficient solution.
There are many ways for moving an existing system to gmiror.
Handbook article not the best one.
My vision of moving system to gmirror:
Assume the FreeBSD, MBR, UFS. One of two 2TB disks is completely not used and clean.
It is not a step-by-step manual. You have to understand what are you doing.
0) Create and check backup of your data.
1) Create singledrive gmirror from the spare second disk.
gmirror label -F -b prefer name prov1
2) Load gmirror moule
gmirror load
3) Create MBR and install BootLoader
fdisk -vBI /dev/mirror/name
4) Create FreeBSD partitions and second boot-loader:
bsdlabel -w -B /dev/mirror/names1
bsdlabel /dev/mirror/names1 > mlabel
ee mlabel
Set the partitions and sizes
Code:
# size offset fstype [fsize bsize bps/cpg]
a: 2G 16 4.2BSD 0 0
b: 8G * swap
c: DO NOT TOUCH IT
d: 30G * 4.2BSD
e: 50G * 4.2BSD
f: 100G * 4.2BSD
g: * * 4.2BSD
Restore edited FreeBSD partitions:
bsdlabel -R /dev/mirror/names1 mlabel
5) Create the filesystems for every partition exept b and c:
newfs /dev/mirror/names1a
newfs -U /dev/mirror/names1d
newfs -U /dev/mirror/names1e
....
6) mount every new partition to /mnt/[a-g]
7) stop your daemons, copy every existing filesystems to new one on a mirror
cd / && pax -p eme -X -rw . /mnt/a/
cd /var && pax -p eme -X -rw . /mnt/d/
cd /usr && pax -p eme -X -rw . /mnt/e/
...
7) edit new fstab on
/mnt/a/etc/fstab, replacing old disk name by /dev/mirror/name
Enable gmirror module on a second disk. Enable gmirror module in mnt/a/boot/loader.conf or /mnt/a/etc/rc.conf
8) unmount all partitions /mnt/*
9) Shutdown the server, ask support to temporary remove 1st disk (if your server has disks with rack)
Try to boot from the second disk, as a single-drive-mirror.
Check
dmesg
and
mount
. Be sure that gmirror loaded and filesystems mounted from gmirror-disk.
If system boot correctly - shutdown the server, attach the first source disk,
Enter mainboard bios setup, configure boot from 2nd disk,
Boot OS from half-mirror,
doublecheck everything and add the first disk to the mirror
gmirror insert -p 20 name prov0
10) check how mirror is synchronizing
gmirror status
11) Add the line to the file
/etc/periodic.conf
Code:
daily_status_gmirror_enable="YES" # Check gmirror(8)
You can try to do it using virtualbox.
If you have limited time for using IP-KVM - then try to skip copying of the largest partition. Just boot from second disk and mount large partition from source disk. You may copy it later without console-access.
For speedup copying useful tool is rsync.
You can prepare a copy of your live system to the 'mirror' using
rsync -Havx --numeric-ids /usr/ /mnt/newusr/
, and when ready just stop your daemons, and sync the data finally using
rsync -Havx [-n] --delete --numeric-ids /usr/ /mnt/newusr/
.
Be careful with --delete option.
P.S.
For a long years ago was a method which creates a gmirror directly from a system disk, but nowadays you should not use it.
It started from commands like "sysctl kern.geom.debugflags=17, gmirror label name name-of-existing-system-disk"