Date: Fri, 25 Apr 2014 18:20:43 +0000 (UTC) From: Dru Lavigne <dru@FreeBSD.org> To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r44666 - head/en_US.ISO8859-1/books/handbook/geom Message-ID: <201404251820.s3PIKhdR067508@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dru Date: Fri Apr 25 18:20:43 2014 New Revision: 44666 URL: http://svnweb.freebsd.org/changeset/doc/44666 Log: White space fix only. Translators can ignore. Sponsored by: iXsystems Modified: head/en_US.ISO8859-1/books/handbook/geom/chapter.xml Modified: head/en_US.ISO8859-1/books/handbook/geom/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/geom/chapter.xml Fri Apr 25 17:52:12 2014 (r44665) +++ head/en_US.ISO8859-1/books/handbook/geom/chapter.xml Fri Apr 25 18:20:43 2014 (r44666) @@ -273,12 +273,12 @@ Done.</screen> replace the failed drive without user interruption.</para> <para>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.</para> + 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.</para> <para>Traditionally, the two drives in a mirror are identical in model and capacity, but &man.gmirror.8; does not require that. @@ -295,8 +295,8 @@ Done.</screen> </warning> <warning> - <para>While <command>dump</command> is used in these procedures to copy file - systems, it does not work on file systems with + <para>While <command>dump</command> is used in these procedures + to copy file systems, it does not work on file systems with soft updates journaling. See &man.tunefs.8; for information on detecting and disabling soft updates journaling.</para> </warning> @@ -307,19 +307,20 @@ Done.</screen> <para>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.</para> + leftover metadata: <acronym>GPT</acronym> partition tables and + old metadata from a previous mirror.</para> - <para><acronym>GPT</acronym> metadata can be erased with <command>gpart</command>. This - example erases both primary and backup <acronym>GPT</acronym> partition tables - from disk <filename>ada8</filename>:</para> + <para><acronym>GPT</acronym> metadata can be erased with + <command>gpart</command>. This example erases both primary + and backup <acronym>GPT</acronym> partition tables from disk + <filename>ada8</filename>:</para> <screen>&prompt.root; <userinput>gpart destroy -F ada8</userinput></screen> <para>A disk can be removed from an active mirror and the - metadata erased in one step using <command>gmirror</command>. Here, the example disk - <filename>ada8</filename> is removed from the active - mirror <filename>gm4</filename>:</para> + metadata erased in one step using <command>gmirror</command>. + Here, the example disk <filename>ada8</filename> is removed + from the active mirror <filename>gm4</filename>:</para> <screen>&prompt.root; <userinput>gmirror remove gm4 ada8</userinput></screen> @@ -329,12 +330,15 @@ Done.</screen> <screen>&prompt.root; <userinput>gmirror clear ada8</userinput></screen> - <para>When <command>gmirror</command> is used, one block of metadata is stored 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 - <command>gmirror</command> 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 <command>gmirror</command>.</para> + <para>When <command>gmirror</command> is used, one block of + metadata is stored 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 <command>gmirror</command> + 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 + <command>gmirror</command>.</para> </sect2> <sect2 xml:id="geom-mirror-two-new-disks"> @@ -342,15 +346,14 @@ Done.</screen> <para>In this example, &os; 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.</para> - - <para>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:</para> + <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.</para> + + <para>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:</para> <screen>&prompt.root; <userinput>gmirror load</userinput></screen> @@ -358,15 +361,16 @@ Done.</screen> <screen>&prompt.root; <userinput>gmirror label -v gm0 /dev/ada1 /dev/ada2</userinput></screen> - <para>In this example, <filename>gm0</filename> is a user-chosen device name - assigned to the new mirror. After the mirror has been - started, this device name will appear in + <para>In this example, <filename>gm0</filename> is a user-chosen + device name assigned to the new mirror. After the mirror has + been started, this device name will appear in <filename>/dev/mirror/</filename>.</para> - <para><acronym>MBR</acronym> and <application>bsdlabel</application> partition tables can now be created on - the mirror with <command>gpart</command>. This example uses a traditional - file system layout, with partitions for - <filename>/</filename>, swap, <filename>/var</filename>, + <para><acronym>MBR</acronym> and + <application>bsdlabel</application> partition tables can now + be created on the mirror with <command>gpart</command>. 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> file system and a swap partition will also work.</para> @@ -400,8 +404,9 @@ Done.</screen> 18874370 137426928 6 freebsd-ufs (65G) 156301298 1 - free - (512B)</screen> - <para>Make the mirror bootable by installing bootcode in the <acronym>MBR</acronym> - and bsdlabel and setting the active slice:</para> + <para>Make the mirror bootable by installing bootcode in the + <acronym>MBR</acronym> and bsdlabel and setting the active + slice:</para> <screen>&prompt.root; <userinput>gpart bootcode -b /boot/mbr mirror/gm0</userinput> &prompt.root; <userinput>gpart set -a active -i 1 mirror/gm0</userinput> @@ -415,9 +420,9 @@ Done.</screen> &prompt.root; <userinput>newfs -U /dev/mirror/gm0s1e</userinput> &prompt.root; <userinput>newfs -U /dev/mirror/gm0s1f</userinput></screen> - <para>File systems from the original - <filename>ada0</filename> disk can now be copied onto the - mirror with <command>dump</command> and <command>restore</command>.</para> + <para>File systems from the original <filename>ada0</filename> + disk can now be copied onto the mirror with + <command>dump</command> and <command>restore</command>.</para> <screen>&prompt.root; <userinput>mount /dev/mirror/gm0s1a /mnt</userinput> &prompt.root; <userinput>dump -C16 -b64 -0aL -f - / | (cd /mnt && restore -rf -)</userinput> @@ -428,8 +433,8 @@ Done.</screen> &prompt.root; <userinput>dump -C16 -b64 -0aL -f - /tmp | (cd /mnt/tmp && restore -rf -)</userinput> &prompt.root; <userinput>dump -C16 -b64 -0aL -f - /usr | (cd /mnt/usr && restore -rf -)</userinput></screen> - <para>Next, edit <filename>/mnt/etc/fstab</filename> to - point to the new mirror file systems:</para> + <para>Next, edit <filename>/mnt/etc/fstab</filename> to point to + the new mirror file systems:</para> <programlisting># Device Mountpoint FStype Options Dump Pass# /dev/mirror/gm0s1a / ufs rw 1 1 @@ -438,23 +443,23 @@ Done.</screen> /dev/mirror/gm0s1e /tmp ufs rw 2 2 /dev/mirror/gm0s1f /usr ufs rw 2 2</programlisting> - <para>If the <filename>geom_mirror.ko</filename> kernel module has not been built - into the kernel, <filename>/mnt/boot/loader.conf</filename> is - edited to load the module at boot:</para> + <para>If the <filename>geom_mirror.ko</filename> kernel module + has not been built into the kernel, + <filename>/mnt/boot/loader.conf</filename> is edited to load + the module at boot:</para> <programlisting>geom_mirror_load="YES"</programlisting> <para>Reboot the system to test the new mirror and verify that - all data has been copied. The <acronym>BIOS</acronym> will see the mirror as two - individual drives rather than a mirror. Because the drives - are identical, it does not matter which is selected to - boot.</para> - - <para>See <xref - linkend="gmirror-troubleshooting"/> - if there are problems booting. Powering down and - disconnecting the original <filename>ada0</filename> disk - will allow it to be kept as an offline backup.</para> + all data has been copied. The <acronym>BIOS</acronym> will + see the mirror as two individual drives rather than a mirror. + Because the drives are identical, it does not matter which is + selected to boot.</para> + + <para>See <xref linkend="gmirror-troubleshooting"/> if there are + problems booting. Powering down and disconnecting the + original <filename>ada0</filename> disk will allow it to be + kept as an offline backup.</para> <para>In use, the mirror will behave just like the original single drive.</para> @@ -465,16 +470,17 @@ Done.</screen> <para>In this example, &os; has already been installed on a single disk, <filename>ada0</filename>. A new disk, - <filename>ada1</filename>, has been connected to the - system. A one-disk mirror will be created on the new disk, - the existing system copied onto it, and then the old disk will - be inserted into the mirror. This slightly complex procedure - is required because <command>gmirror</command> needs to put a 512-byte - block of metadata at the end of each disk, and the existing - <filename>ada0</filename> has usually had all of its space - already allocated.</para> + <filename>ada1</filename>, has been connected to the system. + A one-disk mirror will be created on the new disk, the + existing system copied onto it, and then the old disk will be + inserted into the mirror. This slightly complex procedure is + required because <command>gmirror</command> needs to put a + 512-byte block of metadata at the end of each disk, and the + existing <filename>ada0</filename> has usually had all of its + space already allocated.</para> - <para>Load the <filename>geom_mirror.ko</filename> kernel module:</para> + <para>Load the <filename>geom_mirror.ko</filename> kernel + module:</para> <screen>&prompt.root; <userinput>gmirror load</userinput></screen> @@ -488,15 +494,16 @@ Done.</screen> <para>Create a mirror on the new disk. To make certain that the mirror capacity is not any larger than the original drive, - <command>gnop</command> is used to create a fake drive of the exact same - size. This drive does not store any data, but is used only to - limit the size of the mirror. When <command>gmirror</command> creates - the mirror, it will restrict the capacity to the size of + <command>gnop</command> is used to create a fake drive of the + exact same size. This drive does not store any data, but is + used only to limit the size of the mirror. When + <command>gmirror</command> creates the mirror, it will + restrict the capacity to the size of <filename>gzero.nop</filename>, even if the new drive (<filename>ada1</filename>) has more space. Note that the <replaceable>1000204821504</replaceable> in the second line - should be equal to <filename>ada0</filename>'s media size - as shown by <command>diskinfo</command> above.</para> + should be equal to <filename>ada0</filename>'s media size as + shown by <command>diskinfo</command> above.</para> <screen>&prompt.root; <userinput>geom zero load</userinput> &prompt.root; <userinput>gnop create -s 1000204821504 gzero</userinput> @@ -504,22 +511,22 @@ Done.</screen> &prompt.root; <userinput>gmirror forget gm0</userinput></screen> <para>Since <filename>gzero.nop</filename> does not store any - data, the mirror does not see it as connected. The mirror - is told to <quote>forget</quote> unconnected components, - removing references to <filename>gzero.nop</filename>. - The result is a mirror device containing only a single disk, + data, the mirror does not see it as connected. The mirror is + told to <quote>forget</quote> unconnected components, removing + references to <filename>gzero.nop</filename>. The result is a + mirror device containing only a single disk, <filename>ada1</filename>.</para> <para>After creating <filename>gm0</filename>, view the - partition table on <filename>ada0</filename>. This output is from a 1 TB drive. If there is some - unallocated space at the end of the drive, the contents may be - copied directly from <filename>ada0</filename> to the new - mirror.</para> + partition table on <filename>ada0</filename>. This output is + from a 1 TB drive. If there is some unallocated space at + the end of the drive, the contents may be copied directly from + <filename>ada0</filename> to the new mirror.</para> <para>However, if the output shows that all of the space on the disk is allocated, like in the following listing, there is no - space available for the 512-byte mirror metadata at - the end of the disk.</para> + space available for the 512-byte mirror metadata at the end of + the disk.</para> <screen>&prompt.root; <userinput>gpart show ada0</userinput> => 63 1953525105 ada0 MBR (931G) @@ -527,8 +534,8 @@ Done.</screen> <para>In this case, the partition table must be edited to reduce the capacity by one sector on - <filename>mirror/gm0</filename>. The procedure will - be explained later.</para> + <filename>mirror/gm0</filename>. The procedure will be + explained later.</para> <para>In either case, partition tables on the primary disk should be first copied using <command>gpart backup</command> @@ -589,9 +596,8 @@ BSD 8 <filename>gm0s1a</filename> for <filename>/</filename>, <filename>gm0s1d</filename> for <filename>/var</filename>, <filename>gm0s1e</filename> for <filename>/usr</filename>, - <filename>gm0s1f</filename> for - <filename>/data1</filename>, and - <filename>gm0s1g</filename> for + <filename>gm0s1f</filename> for <filename>/data1</filename>, + and <filename>gm0s1g</filename> for <filename>/data2</filename>.</para> <screen>&prompt.root; <userinput>gpart show mirror/gm0</userinput> @@ -612,8 +618,8 @@ BSD 8 <para>Both the slice and the last partition should have some free space at the end of each disk.</para> - <para>Create file systems on these new partitions. The - number of partitions will vary, matching the partitions on the + <para>Create file systems on these new partitions. The number + of partitions will vary, matching the partitions on the original disk, <filename>ada0</filename>.</para> <screen>&prompt.root; <userinput>newfs -U /dev/mirror/gm0s1a</userinput> @@ -622,16 +628,17 @@ BSD 8 &prompt.root; <userinput>newfs -U /dev/mirror/gm0s1f</userinput> &prompt.root; <userinput>newfs -U /dev/mirror/gm0s1g</userinput></screen> - <para>Make the mirror bootable by installing bootcode in the <acronym>MBR</acronym> - and bsdlabel and setting the active slice:</para> + <para>Make the mirror bootable by installing bootcode in the + <acronym>MBR</acronym> and bsdlabel and setting the active + slice:</para> <screen>&prompt.root; <userinput>gpart bootcode -b /boot/mbr mirror/gm0</userinput> &prompt.root; <userinput>gpart set -a active -i 1 mirror/gm0</userinput> &prompt.root; <userinput>gpart bootcode -b /boot/boot mirror/gm0s1</userinput></screen> - <para>Adjust <filename>/etc/fstab</filename> to use the - new partitions on the mirror. Back up this file first by - copying it to <filename>/etc/fstab.orig</filename>.</para> + <para>Adjust <filename>/etc/fstab</filename> to use the new + partitions on the mirror. Back up this file first by copying + it to <filename>/etc/fstab.orig</filename>.</para> <screen>&prompt.root; <userinput>cp /etc/fstab /etc/fstab.orig</userinput></screen> @@ -647,16 +654,17 @@ BSD 8 /dev/mirror/gm0s1f /data1 ufs rw 2 2 /dev/mirror/gm0s1g /data2 ufs rw 2 2</programlisting> - <para>If the <filename>geom_mirror.ko</filename> kernel module has not been built - into the kernel, edit <filename>/boot/loader.conf</filename> - to load it:</para> + <para>If the <filename>geom_mirror.ko</filename> kernel module + has not been built into the kernel, edit + <filename>/boot/loader.conf</filename> to load it:</para> <programlisting>geom_mirror_load="YES"</programlisting> <para>File systems from the original disk can now be copied onto - the mirror with <command>dump</command> and <command>restore</command>. Note that - it may take some time to create a snapshot for each file system - dumped with <command>dump -L</command>.</para> + the mirror with <command>dump</command> and + <command>restore</command>. Note that it may take some time + to create a snapshot for each file system dumped with + <command>dump -L</command>.</para> <screen>&prompt.root; <userinput>mount /dev/mirror/gm0s1a /mnt</userinput> &prompt.root; <userinput>dump -C16 -b64 -0aL -f - / | (cd /mnt && restore -rf -)</userinput> @@ -671,11 +679,10 @@ BSD 8 <para>Restart the system, booting from <filename>ada1</filename>. If everything is working, the - system will boot from <filename>mirror/gm0</filename>, - which now contains the same data as - <filename>ada0</filename> had previously. See - <xref linkend="gmirror-troubleshooting"/> - if there are problems booting.</para> + system will boot from <filename>mirror/gm0</filename>, which + now contains the same data as <filename>ada0</filename> had + previously. See <xref linkend="gmirror-troubleshooting"/> if + there are problems booting.</para> <para>At this point, the mirror still consists of only the single <filename>ada1</filename> disk.</para> @@ -691,18 +698,19 @@ BSD 8 <filename>mirror/gm0</filename> has the same contents as <filename>ada0</filename> before adding <filename>ada0</filename> to the mirror. If there is - something wrong with the contents copied by <command>dump</command> and - <command>restore</command>, revert <filename>/etc/fstab</filename> to - mount the file systems on <filename>ada0</filename>, - reboot, and try the whole procedure again.</para> + something wrong with the contents copied by + <command>dump</command> and <command>restore</command>, + revert <filename>/etc/fstab</filename> to mount the file + systems on <filename>ada0</filename>, reboot, and try the + whole procedure again.</para> </important> <screen>&prompt.root; <userinput>gmirror insert gm0 ada0</userinput> GEOM_MIRROR: Device gm0: rebuilding provider ada0</screen> <para>Synchronization between the two disks will start - immediately. Use <command>gmirror status</command> - to view the progress.</para> + immediately. Use <command>gmirror status</command> to view + the progress.</para> <screen>&prompt.root; <userinput>gmirror status</userinput> Name Status Components @@ -717,10 +725,10 @@ mirror/gm0 DEGRADED ada1 (ACTIVE) mirror/gm0 COMPLETE ada1 (ACTIVE) ada0 (ACTIVE)</screen> - <para>The mirror, <filename>mirror/gm0</filename>, now consists of - the two disks <filename>ada0</filename> and - <filename>ada1</filename>, and the contents are - automatically synchronized with each other. In use, + <para>The mirror, <filename>mirror/gm0</filename>, now consists + of the two disks <filename>ada0</filename> and + <filename>ada1</filename>, and the contents are automatically + synchronized with each other. In use, <filename>mirror/gm0</filename> will behave just like the original single drive.</para> </sect2> @@ -729,14 +737,14 @@ mirror/gm0 COMPLETE ada1 (ACTIVE) <title>Troubleshooting</title> <para>If the system no longer boots, <acronym>BIOS</acronym> - settings may have to be changed to boot from one - of the new mirrored drives. Either mirror drive can be - used for booting, as they contain identical data.</para> + settings may have to be changed to boot from one of the new + mirrored drives. Either mirror drive can be used for booting, + as they contain identical data.</para> - <para>If the boot stops with this message, something is - wrong with the mirror device:</para> + <para>If the boot stops with this message, something is wrong + with the mirror device:</para> - <screen>Mounting from ufs:/dev/mirror/gm0s1a failed with error 19. + <screen>Mounting from ufs:/dev/mirror/gm0s1a failed with error 19. Loader variables: vfs.root.mountfrom=ufs:/dev/mirror/gm0s1a @@ -758,38 +766,35 @@ Manual root filesystem specification: mountroot></screen> - <para>Forgetting to load the - <filename>geom_mirror.ko</filename> module in - <filename>/boot/loader.conf</filename> can cause this - problem. To fix it, boot from a &os; 9.0 or later - installation media and choose <literal>Shell</literal> at - the first prompt. Then load the mirror module and mount - the mirror device:</para> + <para>Forgetting to load the <filename>geom_mirror.ko</filename> + module in <filename>/boot/loader.conf</filename> can cause + this problem. To fix it, boot from a &os; 9.0 or later + installation media and choose <literal>Shell</literal> at the + first prompt. Then load the mirror module and mount the + mirror device:</para> - <screen>&prompt.root; <userinput>gmirror load</userinput> + <screen>&prompt.root; <userinput>gmirror load</userinput> &prompt.root; <userinput>mount /dev/mirror/gm0s1a /mnt</userinput></screen> - <para>Edit <filename>/mnt/boot/loader.conf</filename>, - adding a line to load the mirror module:</para> + <para>Edit <filename>/mnt/boot/loader.conf</filename>, adding a + line to load the mirror module:</para> - <programlisting>geom_mirror_load="YES"</programlisting> + <programlisting>geom_mirror_load="YES"</programlisting> - <para>Save the file and reboot.</para> + <para>Save the file and reboot.</para> - <para>Other problems that cause <errorname>error 19</errorname> - require more effort to fix. Although the system should boot from - <filename>ada0</filename>, another prompt to select a - shell will appear if <filename>/etc/fstab</filename> is - incorrect. Enter - <literal>ufs:/dev/ada0s1a</literal> at the boot loader - prompt and press <keycap>Enter</keycap>. Undo the - edits in - <filename>/etc/fstab</filename> then mount the file systems from - the original disk (<filename>ada0</filename>) instead - of the mirror. Reboot the system and try the procedure - again.</para> + <para>Other problems that cause <errorname>error 19</errorname> + require more effort to fix. Although the system should boot + from <filename>ada0</filename>, another prompt to select a + shell will appear if <filename>/etc/fstab</filename> is + incorrect. Enter <literal>ufs:/dev/ada0s1a</literal> at the + boot loader prompt and press <keycap>Enter</keycap>. Undo the + edits in <filename>/etc/fstab</filename> then mount the file + systems from the original disk (<filename>ada0</filename>) + instead of the mirror. Reboot the system and try the + procedure again.</para> - <screen>Enter full pathname of shell or RETURN for /bin/sh: + <screen>Enter full pathname of shell or RETURN for /bin/sh: &prompt.root; <userinput>cp /etc/fstab.orig /etc/fstab</userinput> &prompt.root; <userinput>reboot</userinput></screen> </sect2> @@ -799,9 +804,9 @@ mountroot></screen> <para>The benefit of disk mirroring is that an individual disk can fail without causing the mirror to lose any data. In the - above example, if <filename>ada0</filename> fails, the - mirror will continue to work, providing data from the - remaining working drive, <filename>ada1</filename>.</para> + above example, if <filename>ada0</filename> fails, the mirror + will continue to work, providing data from the remaining + working drive, <filename>ada1</filename>.</para> <para>To replace the failed drive, shut down the system and physically replace the failed drive with a new drive of equal @@ -819,8 +824,9 @@ mountroot></screen> <screen>&prompt.root; <userinput>gmirror forget gm0</userinput></screen> - <para>Any old metadata should be cleared from the replacement disk using the instructions in - <xref linkend="geom-mirror-metadata"/>. Then the disk, + <para>Any old metadata should be cleared from the replacement + disk using the instructions in <xref + linkend="geom-mirror-metadata"/>. Then the disk, <filename>ada4</filename> for this example, is inserted into the mirror:</para> @@ -895,31 +901,31 @@ mountroot></screen> In a <acronym>RAID</acronym>3 system, data is split up into a number of bytes that are written across all the drives in the array except for one disk which acts as a dedicated parity disk. - This means that disk reads from a - <acronym>RAID</acronym>3 implementation access all disks in - the array. Performance can be enhanced by using multiple disk - controllers. The <acronym>RAID</acronym>3 array provides a - fault tolerance of 1 drive, while providing a capacity of 1 - - 1/n times the total capacity of all drives in the array, where n - is the number of hard drives in the array. Such a configuration - is mostly suitable for storing data of larger sizes such as - multimedia files.</para> + This means that disk reads from a <acronym>RAID</acronym>3 + implementation access all disks in the array. Performance can + be enhanced by using multiple disk controllers. The + <acronym>RAID</acronym>3 array provides a fault tolerance of 1 + drive, while providing a capacity of 1 - 1/n times the total + capacity of all drives in the array, where n is the number of + hard drives in the array. Such a configuration is mostly + suitable for storing data of larger sizes such as multimedia + files.</para> <para>At least 3 physical hard drives are required to build a <acronym>RAID</acronym>3 array. Each disk must be of the same - size, since <acronym>I/O</acronym> requests are interleaved to read or write to - multiple disks in parallel. Also, due to the nature of - <acronym>RAID</acronym>3, the number of drives must be + size, since <acronym>I/O</acronym> requests are interleaved to + read or write to multiple disks in parallel. Also, due to the + nature of <acronym>RAID</acronym>3, the number of drives must be equal to 3, 5, 9, 17, and so on, or 2^n + 1.</para> - + <para>This section demonstrates how to create a software <acronym>RAID</acronym>3 on a &os; system.</para> - <note> - <para>While it is theoretically possible to boot from a - <acronym>RAID</acronym>3 array on &os;, that configuration - is uncommon and is not advised.</para> - </note> + <note> + <para>While it is theoretically possible to boot from a + <acronym>RAID</acronym>3 array on &os;, that configuration is + uncommon and is not advised.</para> + </note> <sect2> <title>Creating a Dedicated <acronym>RAID</acronym>3 @@ -927,14 +933,14 @@ mountroot></screen> <para>In &os;, support for <acronym>RAID</acronym>3 is implemented by the &man.graid3.8; <acronym>GEOM</acronym> - class. Creating a dedicated - <acronym>RAID</acronym>3 array on &os; requires the following - steps.</para> + class. Creating a dedicated <acronym>RAID</acronym>3 array on + &os; requires the following steps.</para> <procedure> <step> <para>First, load the <filename>geom_raid3.ko</filename> - kernel module by issuing one of the following commands:</para> + kernel module by issuing one of the following + commands:</para> <screen>&prompt.root; <userinput>graid3 load</userinput></screen> @@ -944,9 +950,9 @@ mountroot></screen> </step> <step> - <para>Ensure that a suitable mount point - exists. This command creates a new directory to use as - the mount point:</para> + <para>Ensure that a suitable mount point exists. This + command creates a new directory to use as the mount + point:</para> <screen>&prompt.root; <userinput>mkdir <replaceable>/multimedia</replaceable></userinput></screen> </step> @@ -955,15 +961,13 @@ mountroot></screen> <para>Determine the device names for the disks which will be added to the array, and create the new <acronym>RAID</acronym>3 device. The final device listed - will act as the dedicated parity disk. This - example uses three unpartitioned - <acronym>ATA</acronym> drives: - <filename><replaceable>ada1</replaceable></filename> - and - <filename><replaceable>ada2</replaceable></filename> - for data, and - <filename><replaceable>ada3</replaceable></filename> - for parity.</para> + will act as the dedicated parity disk. This example uses + three unpartitioned <acronym>ATA</acronym> drives: + <filename><replaceable>ada1</replaceable></filename> and + <filename><replaceable>ada2</replaceable></filename> for + data, and + <filename><replaceable>ada3</replaceable></filename> for + parity.</para> <screen>&prompt.root; <userinput>graid3 label -v gr0 /dev/ada1 /dev/ada2 /dev/ada3</userinput> Metadata value stored on /dev/ada1. @@ -973,9 +977,9 @@ Done.</screen> </step> <step> - <para>Partition the newly created - <filename>gr0</filename> device and put a <acronym>UFS</acronym> file - system on it:</para> + <para>Partition the newly created <filename>gr0</filename> + device and put a <acronym>UFS</acronym> file system on + it:</para> <screen>&prompt.root; <userinput>gpart create -s GPT /dev/raid3/gr0</userinput> &prompt.root; <userinput>gpart add -t freebsd-ufs /dev/raid3/gr0</userinput> @@ -992,8 +996,8 @@ Done.</screen> </step> </procedure> - <para>Additional configuration is needed to retain this - setup across system reboots.</para> + <para>Additional configuration is needed to retain this setup + across system reboots.</para> <procedure> <step> @@ -1009,8 +1013,8 @@ Done.</screen> <step> <para>The following volume information must be added to <filename>/etc/fstab</filename> in order to - automatically mount the array's file system during - the system boot process:</para> + automatically mount the array's file system during the + system boot process:</para> <programlisting>/dev/raid3/gr0p1 /multimedia ufs rw 2 2</programlisting> </step> @@ -1107,16 +1111,16 @@ raid/r0 OPTIMAL ada0 (ACTIVE (ACTIVE)) <para>The array device appears in <filename>/dev/raid/</filename>. The first array is called - <filename>r0</filename>. Additional arrays, if present, - will be <filename>r1</filename>, - <filename>r2</filename>, and so on.</para> + <filename>r0</filename>. Additional arrays, if present, will + be <filename>r1</filename>, <filename>r2</filename>, and so + on.</para> <para>The <acronym>BIOS</acronym> menu on some of these devices can create arrays with special characters in their names. To avoid problems with those special characters, arrays are given - simple numbered names like <filename>r0</filename>. To - show the actual labels, like <filename>gm0</filename> in - the example above, use &man.sysctl.8;:</para> + simple numbered names like <filename>r0</filename>. To show + the actual labels, like <filename>gm0</filename> in the + example above, use &man.sysctl.8;:</para> <screen>&prompt.root; <userinput>sysctl kern.geom.raid.name_format=1</userinput></screen> </sect2> @@ -1334,8 +1338,8 @@ raid/r0 OPTIMAL ada0 (ACTIVE (ACTIVE)) <para><acronym>GEOM</acronym> provides a simple mechanism for providing remote access to devices such as disks, - <acronym>CD</acronym>s, and file systems through the use - of the <acronym>GEOM</acronym> Gate network daemon, + <acronym>CD</acronym>s, and file systems through the use of the + <acronym>GEOM</acronym> Gate network daemon, <application>ggated</application>. The system with the device runs the server daemon which handles requests made by clients using <application>ggatec</application>. The devices should not @@ -1344,50 +1348,50 @@ raid/r0 OPTIMAL ada0 (ACTIVE (ACTIVE)) <para>Similar to <acronym>NFS</acronym>, which is discussed in <xref linkend="network-nfs"/>, <application>ggated</application> - is configured using an exports file. This file - specifies which systems are permitted to access the exported resources and - what level of access they are offered. For example, to give - the client <systemitem - class="ipaddress">192.168.1.5</systemitem> read and write - access to the fourth slice on the first <acronym>SCSI</acronym> - disk, create <filename>/etc/gg.exports</filename> with this - line:</para> + is configured using an exports file. This file specifies which + systems are permitted to access the exported resources and what + level of access they are offered. For example, to give the + client <systemitem class="ipaddress">192.168.1.5</systemitem> + read and write access to the fourth slice on the first + <acronym>SCSI</acronym> disk, create + <filename>/etc/gg.exports</filename> with this line:</para> <programlisting>192.168.1.5 RW /dev/da0s4d</programlisting> - <para>Before exporting the device, ensure it is not currently mounted. - Then, start <application>ggated</application>:</para> + <para>Before exporting the device, ensure it is not currently + mounted. Then, start <application>ggated</application>:</para> <screen>&prompt.root; <userinput>ggated</userinput></screen> - + <para>Several options are available for specifying an alternate listening port or changing the default location of the exports file. Refer to &man.ggated.8; for details.</para> - <para>To access the exported device on the client - machine, first use <command>ggatec</command> to specify the + <para>To access the exported device on the client machine, first + use <command>ggatec</command> to specify the <acronym>IP</acronym> address of the server and the device name - of the exported device. If successful, this command will display - a <literal>ggate</literal> device name to mount. Mount that - specified device name on a free mount point. This example + of the exported device. If successful, this command will + display a <literal>ggate</literal> device name to mount. Mount + that specified device name on a free mount point. This example connects to the <filename>/dev/da0s4d</filename> partition on <literal>192.168.1.1</literal>, then mounts - <filename>/dev/ggate0</filename> on <filename>/mnt</filename>:</para> + <filename>/dev/ggate0</filename> on + <filename>/mnt</filename>:</para> <screen>&prompt.root; <userinput>ggatec create -o rw 192.168.1.1 /dev/da0s4d</userinput> ggate0 &prompt.root; <userinput>mount /dev/ggate0 /mnt</userinput></screen> <para>The device on the server may now be accessed through - <filename>/mnt</filename> on the client. For more - details about <command>ggatec</command> and a few usage - examples, refer to &man.ggatec.8;.</para> + <filename>/mnt</filename> on the client. For more details about + <command>ggatec</command> and a few usage examples, refer to + &man.ggatec.8;.</para> <note> - <para>The mount will fail if the device is currently mounted - on either the server or any other client on the - network. If simultaneous access is needed to network - resources, use <acronym>NFS</acronym> instead.</para> + <para>The mount will fail if the device is currently mounted on + either the server or any other client on the network. If + simultaneous access is needed to network resources, use + <acronym>NFS</acronym> instead.</para> </note> <para>When the device is no longer needed, unmount it with
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404251820.s3PIKhdR067508>