diff options
Diffstat (limited to 'en_US.ISO8859-1/books/handbook/geom/chapter.xml')
-rw-r--r-- | en_US.ISO8859-1/books/handbook/geom/chapter.xml | 366 |
1 files changed, 161 insertions, 205 deletions
diff --git a/en_US.ISO8859-1/books/handbook/geom/chapter.xml b/en_US.ISO8859-1/books/handbook/geom/chapter.xml index b25ad6c2c1..66a00571e6 100644 --- a/en_US.ISO8859-1/books/handbook/geom/chapter.xml +++ b/en_US.ISO8859-1/books/handbook/geom/chapter.xml @@ -4,21 +4,16 @@ $FreeBSD$ --> - -<chapter id="geom"> - <chapterinfo> +<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" xml:id="geom"> + <info><title>GEOM: Modular Disk Transformation Framework</title> <authorgroup> - <author> - <firstname>Tom</firstname> - <surname>Rhodes</surname> - <contrib>Written by </contrib> - </author> + <author><personname><firstname>Tom</firstname><surname>Rhodes</surname></personname><contrib>Written by </contrib></author> </authorgroup> - </chapterinfo> + </info> - <title>GEOM: Modular Disk Transformation Framework</title> + - <sect1 id="geom-synopsis"> + <sect1 xml:id="geom-synopsis"> <title>Synopsis</title> <indexterm> @@ -30,8 +25,7 @@ </indexterm> <para>This chapter covers the use of disks under the GEOM - framework in &os;. This includes the major <acronym - role="Redundant Array of Inexpensive Disks">RAID</acronym> + framework in &os;. This includes the major <acronym role="Redundant Array of Inexpensive Disks">RAID</acronym> control utilities which use the framework for configuration. This chapter will not go into in depth discussion on how GEOM handles or controls I/O, the underlying subsystem, or code. @@ -70,45 +64,35 @@ <itemizedlist> <listitem> - <para>Understand how &os; treats <link - linkend="disks">disk devices</link>.</para> + <para>Understand how &os; treats <link linkend="disks">disk devices</link>.</para> </listitem> <listitem> - <para>Know how to configure and install a new <link - linkend="kernelconfig">&os; kernel</link>.</para> + <para>Know how to configure and install a new <link linkend="kernelconfig">&os; kernel</link>.</para> </listitem> </itemizedlist> </sect1> - <sect1 id="geom-intro"> + <sect1 xml:id="geom-intro"> <title>GEOM Introduction</title> <para>GEOM permits access and control to classes, such as Master Boot Records and <acronym>BSD</acronym> labels, through the use - of providers, or the special files in <filename - class="directory">/dev</filename>. By supporting various + of providers, or the special files in <filename>/dev</filename>. By supporting various software <acronym>RAID</acronym> configurations, GEOM transparently provides access to the operating system and operating system utilities.</para> </sect1> - <sect1 id="geom-striping"> - <sect1info> + <sect1 xml:id="geom-striping"> + <info><title>RAID0 - Striping</title> <authorgroup> - <author> - <firstname>Tom</firstname> - <surname>Rhodes</surname> - <contrib>Written by </contrib> - </author> - <author> - <firstname>Murray</firstname> - <surname>Stokely</surname> - </author> + <author><personname><firstname>Tom</firstname><surname>Rhodes</surname></personname><contrib>Written by </contrib></author> + <author><personname><firstname>Murray</firstname><surname>Stokely</surname></personname></author> </authorgroup> - </sect1info> + </info> - <title>RAID0 - Striping</title> + <indexterm> <primary>GEOM</primary> @@ -158,8 +142,7 @@ <step> <para>Ensure that a suitable mount point exists. If this volume will become a root partition, then temporarily use - another mount point such as <filename - class="directory">/mnt</filename>:</para> + another mount point such as <filename>/mnt</filename>:</para> <screen>&prompt.root; <userinput>mkdir /mnt</userinput></screen> </step> @@ -188,11 +171,11 @@ Done.</screen> <step> <para>This process should create two other devices in - <filename class="directory">/dev/stripe</filename> in - addition to <devicename>st0</devicename>. Those include - <devicename>st0a</devicename> and - <devicename>st0c</devicename>. At this point, a file system - may be created on <devicename>st0a</devicename> using + <filename>/dev/stripe</filename> in + addition to <filename>st0</filename>. Those include + <filename>st0a</filename> and + <filename>st0c</filename>. At this point, a file system + may be created on <filename>st0a</filename> using <command>newfs</command>:</para> <screen>&prompt.root; <userinput>newfs -U /dev/stripe/st0a</userinput></screen> @@ -210,8 +193,7 @@ Done.</screen> <para>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 - class="directory">stripe</filename>, is created:</para> + permanent mount point, named <filename>stripe</filename>, is created:</para> <screen>&prompt.root; <userinput>mkdir /stripe</userinput> &prompt.root; <userinput>echo "/dev/stripe/st0a /stripe ufs rw 2 2" \</userinput> @@ -224,7 +206,7 @@ Done.</screen> <screen>&prompt.root; <userinput>echo 'geom_stripe_load="YES"' >> /boot/loader.conf</userinput></screen> </sect1> - <sect1 id="geom-mirror"> + <sect1 xml:id="geom-mirror"> <title>RAID1 - Mirroring</title> <indexterm> @@ -276,7 +258,7 @@ Done.</screen> on detecting and disabling soft updates journaling.</para> </warning> - <sect2 id="geom-mirror-metadata"> + <sect2 xml:id="geom-mirror-metadata"> <title>Metadata Issues</title> <para>Many disk systems store metadata at the end of each disk. @@ -287,14 +269,14 @@ Done.</screen> <para>GPT metadata can be erased with &man.gpart.8;. This example erases both primary and backup GPT partition tables - from disk <devicename>ada8</devicename>:</para> + from disk <filename>ada8</filename>:</para> <screen>&prompt.root; <userinput>gpart destroy -F ada8</userinput></screen> <para>&man.gmirror.8; can remove a disk from an active mirror and erase the metadata in one step. Here, the example disk - <devicename>ada8</devicename> is removed from the active - mirror <devicename>gm4</devicename>:</para> + <filename>ada8</filename> is removed from the active + mirror <filename>gm4</filename>:</para> <screen>&prompt.root; <userinput>gmirror remove gm4 ada8</userinput></screen> @@ -312,13 +294,13 @@ Done.</screen> the disk and does not conflict with &man.gmirror.8;.</para> </sect2> - <sect2 id="geom-mirror-two-new-disks"> + <sect2 xml:id="geom-mirror-two-new-disks"> <title>Creating a Mirror with Two New Disks</title> <para>In this example, &os; has already been installed on a - single disk, <devicename>ada0</devicename>. Two new disks, - <devicename>ada1</devicename> and - <devicename>ada2</devicename>, have been connected to the + 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> @@ -333,7 +315,7 @@ Done.</screen> <screen>&prompt.root; <userinput>gmirror label -v gm0 /dev/ada1 /dev/ada2</userinput></screen> - <para><devicename>gm0</devicename> is a user-chosen device name + <para><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> @@ -349,12 +331,12 @@ Done.</screen> <para>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 - <devicename>ada0</devicename>.</para> + <filename>ada0</filename>.</para> <screen>&prompt.root; <userinput>gpart create -s MBR mirror/gm0</userinput> &prompt.root; <userinput>gpart add -t freebsd -a 4k mirror/gm0</userinput> &prompt.root; <userinput>gpart show mirror/gm0</userinput> -=> 63 156301423 mirror/gm0 MBR (74G) +=> 63 156301423 mirror/gm0 MBR (74G) 63 63 - free - (31k) 126 156301299 1 freebsd (74G) 156301425 61 - free - (30k)</screen> @@ -366,7 +348,7 @@ Done.</screen> &prompt.root; <userinput>gpart add -t freebsd-ufs -a 4k -s 1g mirror/gm0s1</userinput> &prompt.root; <userinput>gpart add -t freebsd-ufs -a 4k mirror/gm0s1</userinput> &prompt.root; <userinput>gpart show mirror/gm0s1</userinput> -=> 0 156301299 mirror/gm0s1 BSD (74G) +=> 0 156301299 mirror/gm0s1 BSD (74G) 0 2 - free - (1.0k) 2 4194304 1 freebsd-ufs (2.0G) 4194306 8388608 2 freebsd-swap (4.0G) @@ -391,7 +373,7 @@ Done.</screen> &prompt.root; <userinput>newfs -U /dev/mirror/gm0s1f</userinput></screen> <para>Filesystems from the original - <devicename>ada0</devicename> disk can now be copied onto the + <filename>ada0</filename> disk can now be copied onto the mirror with &man.dump.8; and &man.restore.8;.</para> <screen>&prompt.root; <userinput>mount /dev/mirror/gm0s1a /mnt</userinput> @@ -425,28 +407,27 @@ Done.</screen> are identical, it does not matter which is selected to boot.</para> - <para>See the <link - linkend="gmirror-troubleshooting">Troubleshooting</link> + <para>See the <link linkend="gmirror-troubleshooting">Troubleshooting</link> section if there are problems booting. Powering down and - disconnecting the original <devicename>ada0</devicename> disk + 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> </sect2> - <sect2 id="geom-mirror-existing-drive"> + <sect2 xml:id="geom-mirror-existing-drive"> <title>Creating a Mirror with an Existing Drive</title> <para>In this example, &os; has already been installed on a - single disk, <devicename>ada0</devicename>. A new disk, - <devicename>ada1</devicename>, has been connected to the + 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 &man.gmirror.8; needs to put a 512-byte block of metadata at the end of each disk, and the existing - <devicename>ada0</devicename> has usually had all of its space + <filename>ada0</filename> has usually had all of its space already allocated.</para> <para>Load the &man.gmirror.8; kernel module:</para> @@ -467,10 +448,10 @@ Done.</screen> size. This drive does not store any data, but is used only to limit the size of the mirror. When &man.gmirror.8; creates the mirror, it will restrict the capacity to the size of - <devicename>gzero.nop</devicename>, even if the new drive - (<devicename>ada1</devicename>) has more space. Note that the + <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 <devicename>ada0</devicename>'s media size + should be equal to <filename>ada0</filename>'s media size as shown by &man.diskinfo.8; above.</para> <screen>&prompt.root; <userinput>geom zero load</userinput> @@ -478,19 +459,19 @@ Done.</screen> &prompt.root; <userinput>gmirror label -v gm0 gzero.nop ada1</userinput> &prompt.root; <userinput>gmirror forget gm0</userinput></screen> - <para><devicename>gzero.nop</devicename> does not store any + <para><filename>gzero.nop</filename> does not store any data, so the mirror does not see it as connected. The mirror is told to <quote>forget</quote> unconnected components, - removing references to <devicename>gzero.nop</devicename>. + removing references to <filename>gzero.nop</filename>. The result is a mirror device containing only a single disk, - <devicename>ada1</devicename>.</para> + <filename>ada1</filename>.</para> - <para>After creating <devicename>gm0</devicename>, view the - partition table on <devicename>ada0</devicename>.</para> + <para>After creating <filename>gm0</filename>, view the + partition table on <filename>ada0</filename>.</para> <para>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 <devicename>ada0</devicename> to the new + copied directly from <filename>ada0</filename> to the new mirror.</para> <para>However, if the output shows that all of the space on the @@ -499,12 +480,12 @@ Done.</screen> the end of the disk.</para> <screen>&prompt.root; <userinput>gpart show ada0</userinput> -=> 63 1953525105 ada0 MBR (931G) +=> 63 1953525105 ada0 MBR (931G) 63 1953525105 1 freebsd [active] (931G)</screen> <para>In this case, the partition table must be edited to reduce the capacity by one sector on - <devicename>mirror/gm0</devicename>. The procedure will + <filename>mirror/gm0</filename>. The procedure will be explained later.</para> <para>In either case, partition tables on the primary disk @@ -557,28 +538,28 @@ BSD 8 disk, these two files can be used without modification.</para> <para>Now restore the partition table into - <devicename>mirror/gm0</devicename>:</para> + <filename>mirror/gm0</filename>:</para> <screen>&prompt.root; <userinput>gpart restore mirror/gm0 < table.ada0</userinput> &prompt.root; <userinput>gpart restore mirror/gm0s1 < table.ada0s1</userinput></screen> <para>Check the partition table with <command>gpart show</command>. This example has - <devicename>gm0s1a</devicename> for <filename>/</filename>, - <devicename>gm0s1d</devicename> for <filename>/var</filename>, - <devicename>gm0s1e</devicename> for <filename>/usr</filename>, - <devicename>gm0s1f</devicename> for + <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 - <devicename>gm0s1g</devicename> for + <filename>gm0s1g</filename> for <filename>/data2</filename>.</para> <screen>&prompt.root; <userinput>gpart show mirror/gm0</userinput> -=> 63 1953525104 mirror/gm0 MBR (931G) +=> 63 1953525104 mirror/gm0 MBR (931G) 63 1953525042 1 freebsd [active] (931G) 1953525105 62 - free - (31k) &prompt.root; <userinput>gpart show mirror/gm0s1</userinput> -=> 0 1953525042 mirror/gm0s1 BSD (931G) +=> 0 1953525042 mirror/gm0s1 BSD (931G) 0 2097152 1 freebsd-ufs (1.0G) 2097152 16777216 2 freebsd-swap (8.0G) 18874368 41943040 4 freebsd-ufs (20G) @@ -592,7 +573,7 @@ BSD 8 <para>Create filesystems on these new partitions. The number of partitions will vary, matching the partitions on the - original disk, <devicename>ada0</devicename>.</para> + original disk, <filename>ada0</filename>.</para> <screen>&prompt.root; <userinput>newfs -U /dev/mirror/gm0s1a</userinput> &prompt.root; <userinput>newfs -U /dev/mirror/gm0s1d</userinput> @@ -614,8 +595,8 @@ BSD 8 <screen>&prompt.root; <userinput>cp /etc/fstab /etc/fstab.orig</userinput></screen> <para>Edit <filename>/etc/fstab</filename>, replacing - <devicename>/dev/ada0</devicename> with - <devicename>mirror/gm0</devicename>.</para> + <filename>/dev/ada0</filename> with + <filename>mirror/gm0</filename>.</para> <programlisting># Device Mountpoint FStype Options Dump Pass# /dev/mirror/gm0s1a / ufs rw 1 1 @@ -648,30 +629,30 @@ BSD 8 &prompt.root; <userinput>dump -C16 -b64 -0aL -f - /data2 | (cd /mnt/data2 && restore -rf -)</userinput></screen> <para>Restart the system, booting from - <devicename>ada1</devicename>. If everything is working, the - system will boot from <devicename>mirror/gm0</devicename>, + <filename>ada1</filename>. If everything is working, the + system will boot from <filename>mirror/gm0</filename>, which now contains the same data as - <devicename>ada0</devicename> had previously. See the + <filename>ada0</filename> had previously. See the <link linkend="gmirror-troubleshooting">Troubleshooting</link> section if there are problems booting.</para> <para>At this point, the mirror still consists of only the - single <devicename>ada1</devicename> disk.</para> + single <filename>ada1</filename> disk.</para> - <para>After booting from <devicename>mirror/gm0</devicename> + <para>After booting from <filename>mirror/gm0</filename> successfully, the final step is inserting - <devicename>ada0</devicename> into the mirror.</para> + <filename>ada0</filename> into the mirror.</para> <important> - <para>When <devicename>ada0</devicename> is inserted into the + <para>When <filename>ada0</filename> is inserted into the mirror, its former contents will be overwritten by data on the mirror. Make certain that - <devicename>mirror/gm0</devicename> has the same contents as - <devicename>ada0</devicename> before adding - <devicename>ada0</devicename> to the mirror. If there is + <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 &man.dump.8; and &man.restore.8;, revert <filename>/etc/fstab</filename> to - mount the filesystems on <devicename>ada0</devicename>, + mount the filesystems on <filename>ada0</filename>, reboot, and try the whole procedure again.</para> </important> @@ -695,15 +676,15 @@ mirror/gm0 DEGRADED ada1 (ACTIVE) mirror/gm0 COMPLETE ada1 (ACTIVE) ada0 (ACTIVE)</screen> - <para><devicename>mirror/gm0</devicename> now consists of - the two disks <devicename>ada0</devicename> and - <devicename>ada1</devicename>, and the contents are + <para><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, - <devicename>mirror/gm0</devicename> will behave just like the + <filename>mirror/gm0</filename> will behave just like the original single drive.</para> </sect2> - <sect2 id="gmirror-troubleshooting"> + <sect2 xml:id="gmirror-troubleshooting"> <title>Troubleshooting</title> <sect3> @@ -767,12 +748,12 @@ mountroot></screen> require more effort to fix. Enter <literal>ufs:/dev/ada0s1a</literal> at the boot loader prompt. Although the system should boot from - <devicename>ada0</devicename>, another prompt to select a + <filename>ada0</filename>, another prompt to select a shell appears because <filename>/etc/fstab</filename> is incorrect. Press the Enter key at the prompt. Undo the modifications so far by reverting <filename>/etc/fstab</filename>, mounting filesystems from - the original disk (<devicename>ada0</devicename>) instead + the original disk (<filename>ada0</filename>) instead of the mirror. Reboot the system and try the procedure again.</para> @@ -788,9 +769,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 <devicename>ada0</devicename> fails, the + above example, if <filename>ada0</filename> fails, the mirror will continue to work, providing data from the - remaining working drive, <devicename>ada1</devicename>.</para> + 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 @@ -808,9 +789,8 @@ mountroot></screen> <screen>&prompt.root; <userinput>gmirror forget gm0</userinput></screen> - <para>Any old metadata should be <link - linkend="geom-mirror-metadata">cleared from the replacement - disk</link>. Then the disk, <devicename>ada4</devicename> + <para>Any old metadata should be <link linkend="geom-mirror-metadata">cleared from the replacement + disk</link>. Then the disk, <filename>ada4</filename> for this example, is inserted into the mirror:</para> <screen>&prompt.root; <userinput>gmirror insert gm0 /dev/ada4</userinput></screen> @@ -831,17 +811,13 @@ mountroot></screen> </sect2> </sect1> - <sect1 id="geom-graid"> - <sect1info> + <sect1 xml:id="geom-graid"> + <info><title>Software <acronym>RAID</acronym> Devices</title> <authorgroup> - <author> - <firstname>Warren</firstname> - <surname>Block</surname> - <contrib>Originally contributed by </contrib> - </author> + <author><personname><firstname>Warren</firstname><surname>Block</surname></personname><contrib>Originally contributed by </contrib></author> </authorgroup> - </sect1info> - <title>Software <acronym>RAID</acronym> Devices</title> + </info> + <indexterm> <primary>GEOM</primary> @@ -872,7 +848,7 @@ mountroot></screen> If needed, it can be loaded manually with <command>graid load</command>.</para> - <sect2 id="geom-graid-creating"> + <sect2 xml:id="geom-graid-creating"> <title>Creating an Array</title> <para>Software <acronym>RAID</acronym> devices often have a menu @@ -885,10 +861,10 @@ mountroot></screen> array. The motherboard used for this example has an Intel software <acronym>RAID</acronym> chipset, so the Intel metadata format is specified. The new array is given a label - of <devicename>gm0</devicename>, it is a mirror + of <filename>gm0</filename>, it is a mirror (<acronym>RAID1</acronym>), and uses drives - <devicename>ada0</devicename> and - <devicename>ada1</devicename>.</para> + <filename>ada0</filename> and + <filename>ada1</filename>.</para> <caution> <para>Some space on the drives will be overwritten when they @@ -917,21 +893,21 @@ raid/r0 OPTIMAL ada0 (ACTIVE (ACTIVE)) <para>The array device appears in <filename>/dev/raid/</filename>. The first array is called - <devicename>r0</devicename>. Additional arrays, if present, - will be <devicename>r1</devicename>, - <devicename>r2</devicename>, 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 <devicename>r0</devicename>. To - show the actual labels, like <devicename>gm0</devicename> in + 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> - <sect2 id="geom-graid-volumes"> + <sect2 xml:id="geom-graid-volumes"> <title>Multiple Volumes</title> <para>Some software <acronym>RAID</acronym> devices support @@ -948,16 +924,16 @@ raid/r0 OPTIMAL ada0 (ACTIVE (ACTIVE)) &prompt.root; <userinput>graid add -S 20G gm0 RAID0</userinput></screen> <para>Volumes appear as additional - <devicename>r<replaceable>X</replaceable></devicename> entries + <filename>rX</filename> entries in <filename>/dev/raid/</filename>. An array with two volumes - will show <devicename>r0</devicename> and - <devicename>r1</devicename>.</para> + will show <filename>r0</filename> and + <filename>r1</filename>.</para> <para>See &man.graid.8; for the number of volumes supported by different software <acronym>RAID</acronym> devices.</para> </sect2> - <sect2 id="geom-graid-converting"> + <sect2 xml:id="geom-graid-converting"> <title>Converting a Single Drive to a Mirror</title> <para>Under certain specific conditions, it is possible to @@ -1001,7 +977,7 @@ raid/r0 OPTIMAL ada0 (ACTIVE (ACTIVE)) degraded status until the copy is complete.</para> </sect2> - <sect2 id="geom-graid-inserting"> + <sect2 xml:id="geom-graid-inserting"> <title>Inserting New Drives into the Array</title> <para>Drives can be inserted into an array as replacements for @@ -1022,7 +998,7 @@ GEOM_RAID: Intel-a29ea104: Subdisk gm0:1-ada1 state changed from NEW to REBUILD. GEOM_RAID: Intel-a29ea104: Subdisk gm0:1-ada1 rebuild start at 0.</screen> </sect2> - <sect2 id="geom-graid-removing"> + <sect2 xml:id="geom-graid-removing"> <title>Removing Drives from the Array</title> <para>Individual drives can be permanently removed from a @@ -1034,7 +1010,7 @@ GEOM_RAID: Intel-a29ea104: Subdisk gm0:1-[unknown] state changed from ACTIVE to GEOM_RAID: Intel-a29ea104: Volume gm0 state changed from OPTIMAL to DEGRADED.</screen> </sect2> - <sect2 id="geom-graid-stopping"> + <sect2 xml:id="geom-graid-stopping"> <title>Stopping the Array</title> <para>An array can be stopped without removing metadata from the @@ -1044,7 +1020,7 @@ GEOM_RAID: Intel-a29ea104: Volume gm0 state changed from OPTIMAL to DEGRADED.</s <screen>&prompt.root; <userinput>graid stop raid/r0</userinput></screen> </sect2> - <sect2 id="geom-graid-status"> + <sect2 xml:id="geom-graid-status"> <title>Checking Array Status</title> <para>Array status can be checked at any time. After a drive @@ -1066,7 +1042,7 @@ raid/r0 DEGRADED ada0 (ACTIVE (ACTIVE)) Intel-e2d07d9a BROKEN ada6 (ACTIVE (ACTIVE))</screen> </sect2> - <sect2 id="geom-graid-deleting"> + <sect2 xml:id="geom-graid-deleting"> <title>Deleting Arrays</title> <para>Arrays are destroyed by deleting all of the volumes from @@ -1076,7 +1052,7 @@ Intel-e2d07d9a BROKEN ada6 (ACTIVE (ACTIVE))</screen> <screen>&prompt.root; <userinput>graid delete raid/r0</userinput></screen> </sect2> - <sect2 id="geom-graid-unexpected"> + <sect2 xml:id="geom-graid-unexpected"> <title>Deleting Unexpected Arrays</title> <para>Drives may unexpectedly contain &man.graid.8; metadata, @@ -1139,34 +1115,20 @@ raid/r0 OPTIMAL ada0 (ACTIVE (ACTIVE)) </sect2> </sect1> - <sect1 id="geom-raid3"> - <sect1info> + <sect1 xml:id="geom-raid3"> + <info><title><acronym>RAID</acronym>3 - Byte-level Striping with + Dedicated Parity</title> <authorgroup> - <author> - <firstname>Mark</firstname> - <surname>Gladman</surname> - <contrib>Written by </contrib> - </author> - <author> - <firstname>Daniel</firstname> - <surname>Gerzo</surname> - </author> + <author><personname><firstname>Mark</firstname><surname>Gladman</surname></personname><contrib>Written by </contrib></author> + <author><personname><firstname>Daniel</firstname><surname>Gerzo</surname></personname></author> </authorgroup> <authorgroup> - <author> - <firstname>Tom</firstname> - <surname>Rhodes</surname> - <contrib>Based on documentation by </contrib> - </author> - <author> - <firstname>Murray</firstname> - <surname>Stokely</surname> - </author> + <author><personname><firstname>Tom</firstname><surname>Rhodes</surname></personname><contrib>Based on documentation by </contrib></author> + <author><personname><firstname>Murray</firstname><surname>Stokely</surname></personname></author> </authorgroup> - </sect1info> + </info> - <title><acronym>RAID</acronym>3 - Byte-level Striping with - Dedicated Parity</title> + <indexterm> <primary>GEOM</primary> @@ -1230,7 +1192,7 @@ raid/r0 OPTIMAL ada0 (ACTIVE (ACTIVE)) <para>Create or ensure that a suitable mount point exists:</para> - <screen>&prompt.root; <userinput>mkdir <replaceable>/multimedia/</replaceable></userinput></screen> + <screen>&prompt.root; <userinput>mkdir /multimedia/</userinput></screen> </step> <step> @@ -1240,11 +1202,11 @@ raid/r0 OPTIMAL ada0 (ACTIVE (ACTIVE)) will act as the dedicated parity disk. This example uses three unpartitioned <acronym>ATA</acronym> drives: - <devicename><replaceable>ada1</replaceable></devicename> + <filename>ada1</filename> and - <devicename><replaceable>ada2</replaceable></devicename> + <filename>ada2</filename> for data, and - <devicename><replaceable>ada3</replaceable></devicename> + <filename>ada3</filename> for parity.</para> <screen>&prompt.root; <userinput>graid3 label -v gr0 /dev/ada1 /dev/ada2 /dev/ada3</userinput> @@ -1256,7 +1218,7 @@ Done.</screen> <step> <para>Partition the newly created - <devicename>gr0</devicename> device and put a UFS file + <filename>gr0</filename> device and put a UFS file system on it:</para> <screen>&prompt.root; <userinput>gpart create -s GPT /dev/raid3/gr0</userinput> @@ -1300,7 +1262,7 @@ Done.</screen> </sect2> </sect1> - <sect1 id="geom-ggate"> + <sect1 xml:id="geom-ggate"> <title>GEOM Gate Network Devices</title> <para>GEOM supports the remote use of devices, such as disks, @@ -1317,7 +1279,7 @@ Done.</screen> <programlisting>192.168.1.0/24 RW /dev/da0s4d</programlisting> <para>This allows all hosts inside the specified private network - access to the file system on the <devicename>da0s4d</devicename> + access to the file system on the <filename>da0s4d</filename> partition.</para> <para>To export this device, ensure it is not currently mounted, @@ -1332,8 +1294,7 @@ Done.</screen> ggate0 &prompt.root; <userinput>mount /dev/ggate0 /mnt</userinput></screen> - <para>The device may now be accessed through the <filename - class="directory">/mnt</filename> mount point.</para> + <para>The device may now be accessed through the <filename>/mnt</filename> mount point.</para> <note> <para>However, this will fail if the device is currently mounted @@ -1345,7 +1306,7 @@ ggate0 &man.umount.8;, similar to any other disk device.</para> </sect1> - <sect1 id="geom-glabel"> + <sect1 xml:id="geom-glabel"> <title>Labeling Disk Devices</title> <indexterm> @@ -1360,9 +1321,9 @@ ggate0 devices raises some issues. For instance, what if a new disk device is added via <acronym>USB</acronym>? It is likely that a flash device may be handed the device name of - <devicename>da0</devicename> and the original - <devicename>da0</devicename> shifted to - <devicename>da1</devicename>. This will cause issues mounting + <filename>da0</filename> and the original + <filename>da0</filename> shifted to + <filename>da1</filename>. This will cause issues mounting file systems if they are listed in <filename>/etc/fstab</filename> which may also prevent the system from booting.</para> @@ -1401,19 +1362,16 @@ ggate0 <para>Permanent labels can be a generic or a file system label. Permanent file system labels can be created with &man.tunefs.8; or &man.newfs.8;. These types of labels are - created in a sub-directory of <filename - class="directory">/dev</filename>, and will be named + created in a sub-directory of <filename>/dev</filename>, and will be named according to the file system type. For example, <acronym>UFS</acronym>2 file system labels will be created in - <filename class="directory">/dev/ufs</filename>. Generic + <filename>/dev/ufs</filename>. Generic permanent labels can be created with <command>glabel label</command>. These are not file system specific and - will be created in <filename - class="directory">/dev/label</filename>.</para> + will be created in <filename>/dev/label</filename>.</para> <para>Temporary labels are destroyed at the next reboot. These - labels are created in <filename - class="directory">/dev/label</filename> and are suited to + labels are created in <filename>/dev/label</filename> and are suited to experimentation. A temporary label can be created using <command>glabel create</command>.</para> @@ -1424,15 +1382,14 @@ ggate0 <acronym>UFS</acronym>2 file system without destroying any data, issue the following command:</para> - <screen>&prompt.root; <userinput>tunefs -L <replaceable>home</replaceable> <replaceable>/dev/da3</replaceable></userinput></screen> + <screen>&prompt.root; <userinput>tunefs -L home /dev/da3</userinput></screen> <warning> <para>If the file system is full, this may cause data corruption.</para> </warning> - <para>A label should now exist in <filename - class="directory">/dev/ufs</filename> which may be added + <para>A label should now exist in <filename>/dev/ufs</filename> which may be added to <filename>/etc/fstab</filename>:</para> <programlisting>/dev/ufs/home /home ufs rw 2 2</programlisting> @@ -1475,12 +1432,12 @@ ggate0 a different system. For this example, it is assumed that a single <acronym>ATA</acronym> disk is used, which is currently recognized by the system as - <devicename>ad0</devicename>. It is also assumed that the + <filename>ad0</filename>. It is also assumed that the standard &os; partition scheme is used, with - <filename class="directory">/</filename>, - <filename class="directory">/var</filename>, - <filename class="directory">/usr</filename> and - <filename class="directory">/tmp</filename>, as + <filename>/</filename>, + <filename>/var</filename>, + <filename>/usr</filename> and + <filename>/tmp</filename>, as well as a swap partition.</para> <para>Reboot the system, and at the &man.loader.8; prompt, @@ -1528,7 +1485,7 @@ devfs on /dev (devfs, local) supports a new label type for <acronym>UFS</acronym> file systems, based on the unique file system id, <literal>ufsid</literal>. These labels may be found in - <filename class="directory">/dev/ufsid</filename> and are + <filename>/dev/ufsid</filename> and are created automatically during system startup. It is possible to use <literal>ufsid</literal> labels to mount partitions using <filename>/etc/fstab</filename>. Use <command>glabel @@ -1540,10 +1497,10 @@ devfs on /dev (devfs, local) ufsid/486b6fc38d330916 N/A ad4s1d ufsid/486b6fc16926168e N/A ad4s1f</screen> - <para>In the above example, <devicename>ad4s1d</devicename> - represents <filename class="directory">/var</filename>, - while <devicename>ad4s1f</devicename> represents - <filename class="directory">/usr</filename>. + <para>In the above example, <filename>ad4s1d</filename> + represents <filename>/var</filename>, + while <filename>ad4s1f</filename> represents + <filename>/usr</filename>. Using the <literal>ufsid</literal> values shown, these partitions may now be mounted with the following entries in <filename>/etc/fstab</filename>:</para> @@ -1558,7 +1515,7 @@ ufsid/486b6fc16926168e N/A ad4s1f</screen> </sect2> </sect1> - <sect1 id="geom-gjournal"> + <sect1 xml:id="geom-gjournal"> <title>UFS Journaling Through GEOM</title> <indexterm> @@ -1612,15 +1569,15 @@ ufsid/486b6fc16926168e N/A ad4s1f</screen> <para>Creating a journal on a free file system may now be done using the following steps. In this example, - <devicename>da4</devicename> is a new <acronym>SCSI</acronym> + <filename>da4</filename> is a new <acronym>SCSI</acronym> disk:</para> <screen>&prompt.root; <userinput>gjournal load</userinput> &prompt.root; <userinput>gjournal label /dev/da4</userinput></screen> <para>At this point, there should be a - <devicename>/dev/da4</devicename> device node and a - <devicename>/dev/da4.journal</devicename> device node. + <filename>/dev/da4</filename> device node and a + <filename>/dev/da4.journal</filename> device node. A file system may now be created on this device:</para> <screen>&prompt.root; <userinput>newfs -O 2 -J /dev/da4.journal</userinput></screen> @@ -1631,16 +1588,16 @@ ufsid/486b6fc16926168e N/A ad4s1f</screen> <para><command>mount</command> the device at the desired point with:</para> - <screen>&prompt.root; <userinput>mount /dev/da4.journal <replaceable>/mnt</replaceable></userinput></screen> + <screen>&prompt.root; <userinput>mount /dev/da4.journal /mnt</userinput></screen> <note> <para>In the case of several slices, a journal will be created for each individual slice. For instance, if - <devicename>ad4s1</devicename> and - <devicename>ad4s2</devicename> are both slices, then + <filename>ad4s1</filename> and + <filename>ad4s2</filename> are both slices, then <command>gjournal</command> will create - <devicename>ad4s1.journal</devicename> and - <devicename>ad4s2.journal</devicename>.</para> + <filename>ad4s1.journal</filename> and + <filename>ad4s2.journal</filename>.</para> </note> <para>For better performance, the journal may be kept on another @@ -1655,9 +1612,8 @@ ufsid/486b6fc16926168e N/A ad4s1f</screen> <command>tunefs</command>.</para> <para>It is also possible to journal the boot disk of a &os; - system. Refer to the article <ulink - url="&url.articles.gjournal-desktop;">Implementing UFS - Journaling on a Desktop PC</ulink> for detailed + system. Refer to the article <link xlink:href="&url.articles.gjournal-desktop;">Implementing UFS + Journaling on a Desktop PC</link> for detailed instructions.</para> </sect1> </chapter> |