All actions are performed before and during the installation of FreeBSD 9.0.
1. Connect two identical hard disk drives is desirable and boot from the installation disk with FreeBSD 9.0. Click “Shell”. Look how to define hard disk drives:
# Dmesg | grep da
da0 da1 and
2. Change the variable kernel kern.geom.debugflags:
# Sysctl kern.geom.debugflags = 16
Run GEOM, ie load modules /boot/kernel/geom_mirror.ko:
# Gmirror load
3. Create a mirror. Save the metadata on the first disk da0:
# Gmirror label -vb round-robin gm0 / dev / da0
Now we have a device / dev / mirror / gm0
If this is done the above command will display:
Metadata value stored on / dev / da0.
4. Now the “insert” in the mirror a second disc:
# Gmirror insert gm0 / dev / da1
Looking forward to synchronize the disks. After some time, the system will display a message that the disks are synchronized. Check the command:
# Gmirror status
Name Status Components
mirror / gm0 COMPLETE da0
At this stage, while all. Exit the Shell:
5. Install the system in the normal way when it comes to disk layout, do this:
Remove all automatically created layout, GPT also:
Create it yourself, by hand. It’s not as difficult as it seems really.
Move the cursor to the mirror / gm0, referred to as “C” or create, GPT. Then again create in the mirror / gm0. I marked up all the space on the disk for the primary partition, leave a couple of gigs in the paging file:
Next, add a swap file equal 2xrazmeru RAM:
6. retrofitted system in catfish end we are asked if we want to make the last changes to system files, agrees.
Adding automatic loading module GEOM in loader.conf:
# Echo ‘geom_mirror_load = “YES”‘> /boot/loader.conf
7. Check the file / etc / fstab:
# Ee / etc / fstab
# Device Mountpoint FStype Options Dump Pass #
/ Dev / mirror / gm0s1b none swap sw 0 0
/ Dev / mirror / gm0s1a / ufs rw 1 January
All sections must be of the form / dev / mirror / gm0p2
8. Reboot. After downloading enjoy life with raid 1.