Creating a Raid 1 (gmirror, mirror) on FreeBSD 8.2

After installation the system reboots and will now tune “mirroring” drive through gmirror. Suppose freebsd installed on the hard drive da0.

1. Includes extra. debugging information:
# Sysctl kern.geom.debugflags = 17

Create a mirror. Save the metadata on the disk da0:
# Gmirror label -vb round-robin gm0 / dev / da0
Metadata value stored on / dev / da0.
Done.

This will result in the device / dev / mirror / gm0.

2. Load the kernel module geom_mirror:
# Gmirror load

To launch at startup, this module is loaded automatically add in loader.conf:
# Echo ‘geom_mirror_load = “YES”‘ >> /boot/loader.conf

3. Edit the file / etc / fstab. Roughly need to replace all da0 / mirror / gm0 *.
# Ee / etc / fstab
# Device Mountpoint FStype Options Dump Pass #
/ Dev / mirror / gm0s1a none swap sw 0 0
/ Dev / mirror / gm0s1b / ufs rw 1 January

4. Reboot:
# Reboot

5. After reboot, turn on the second drive in the mirror:
# Gmirror insert gm0 / dev / da1

Wait until the disks are synchronized, check the process of the team:
# Gmirror status
Name Status Components
mirror / gm0 COMPLETE da0