Source string Read only

(itstool) path: sect2/para
262/2620
Context English State
<prompt>#</prompt> <userinput>mount /dev/stripe/st0a /mnt</userinput>
To mount this striped file system automatically during the boot process, place the volume information in <filename>/etc/fstab</filename>. In this example, a permanent mount point, named <filename>stripe</filename>, is created:
<prompt>#</prompt> <userinput>mkdir /stripe</userinput>
<prompt>#</prompt> <userinput>echo "/dev/stripe/st0a /stripe ufs rw 2 2" \</userinput>
<userinput>&gt;&gt; /etc/fstab</userinput>
The <filename>geom_stripe.ko</filename> module must also be automatically loaded during system initialization, by adding a line to <filename>/boot/loader.conf</filename>:
<prompt>#</prompt> <userinput>echo 'geom_stripe_load="YES"' &gt;&gt; /boot/loader.conf</userinput>
RAID1 - Mirroring
<primary>Disk Mirroring</primary>
<primary>RAID1</primary>
<acronym>RAID1</acronym>, or <emphasis>mirroring</emphasis>, is the technique of writing the same data to more than one disk drive. Mirrors are usually used to guard against data loss due to drive failure. Each drive in a mirror contains an identical copy of the data. When an individual drive fails, the mirror continues to work, providing data from the drives that are still functioning. The computer keeps running, and the administrator has time to replace the failed drive without user interruption.
Two common situations are illustrated in these examples. The first creates a mirror out of two new drives and uses it as a replacement for an existing single drive. The second example creates a mirror on a single new drive, copies the old drive's data to it, then inserts the old drive into the mirror. While this procedure is slightly more complicated, it only requires one new drive.
Traditionally, the two drives in a mirror are identical in model and capacity, but <citerefentry><refentrytitle>gmirror</refentrytitle><manvolnum>8</manvolnum></citerefentry> does not require that. Mirrors created with dissimilar drives will have a capacity equal to that of the smallest drive in the mirror. Extra space on larger drives will be unused. Drives inserted into the mirror later must have at least as much capacity as the smallest drive already in the mirror.
The mirroring procedures shown here are non-destructive, but as with any major disk operation, make a full backup first.
While <citerefentry><refentrytitle>dump</refentrytitle><manvolnum>8</manvolnum></citerefentry> is used in these procedures to copy file systems, it does not work on file systems with soft updates journaling. See <citerefentry><refentrytitle>tunefs</refentrytitle><manvolnum>8</manvolnum></citerefentry> for information on detecting and disabling soft updates journaling.
Metadata Issues
Many disk systems store metadata at the end of each disk. Old metadata should be erased before reusing the disk for a mirror. Most problems are caused by two particular types of leftover metadata: <acronym>GPT</acronym> partition tables and old metadata from a previous mirror.
<acronym>GPT</acronym> metadata can be erased with <citerefentry><refentrytitle>gpart</refentrytitle><manvolnum>8</manvolnum></citerefentry>. This example erases both primary and backup <acronym>GPT</acronym> partition tables from disk <filename>ada8</filename>:
<prompt>#</prompt> <userinput>gpart destroy -F ada8</userinput>
A disk can be removed from an active mirror and the metadata erased in one step using <citerefentry><refentrytitle>gmirror</refentrytitle><manvolnum>8</manvolnum></citerefentry>. Here, the example disk <filename>ada8</filename> is removed from the active mirror <filename>gm4</filename>:
<prompt>#</prompt> <userinput>gmirror remove gm4 ada8</userinput>
If the mirror is not running, but old mirror metadata is still on the disk, use <command>gmirror clear</command> to remove it:
<prompt>#</prompt> <userinput>gmirror clear ada8</userinput>
<citerefentry><refentrytitle>gmirror</refentrytitle><manvolnum>8</manvolnum></citerefentry> stores one block of metadata at the end of the disk. Because <acronym>GPT</acronym> partition schemes also store metadata at the end of the disk, mirroring entire <acronym>GPT</acronym> disks with <citerefentry><refentrytitle>gmirror</refentrytitle><manvolnum>8</manvolnum></citerefentry> is not recommended. <acronym>MBR</acronym> partitioning is used here because it only stores a partition table at the start of the disk and does not conflict with the mirror metadata.
Creating a Mirror with Two New Disks
In this example, FreeBSD has already been installed on a single disk, <filename>ada0</filename>. Two new disks, <filename>ada1</filename> and <filename>ada2</filename>, have been connected to the system. A new mirror will be created on these two disks and used to replace the old single disk.
The <filename>geom_mirror.ko</filename> kernel module must either be built into the kernel or loaded at boot- or run-time. Manually load the kernel module now:
<prompt>#</prompt> <userinput>gmirror load</userinput>
Create the mirror with the two new drives:
<prompt>#</prompt> <userinput>gmirror label -v gm0 /dev/ada1 /dev/ada2</userinput>
<filename>gm0</filename> is a user-chosen device name assigned to the new mirror. After the mirror has been started, this device name appears in <filename>/dev/mirror/</filename>.
<acronym>MBR</acronym> and <application>bsdlabel</application> partition tables can now be created on the mirror with <citerefentry><refentrytitle>gpart</refentrytitle><manvolnum>8</manvolnum></citerefentry>. This example uses a traditional file system layout, with partitions for <filename>/</filename>, swap, <filename>/var</filename>, <filename>/tmp</filename>, and <filename>/usr</filename>. A single <filename>/</filename> and a swap partition will also work.
Partitions on the mirror do not have to be the same size as those on the existing disk, but they must be large enough to hold all the data already present on <filename>ada0</filename>.

Loading…

No matching activity found.

Browse all component changes

Things to check

Multiple failing checks

The translations in several languages have failing checks

Reset

Glossary

English English
No related strings found in the glossary.

Source information

Source string comment
(itstool) path: sect2/para
Flags
read-only
Source string location
book.translate.xml:36119
String age
a year ago
Source string age
a year ago
Translation file
books/handbook.pot, string 6011