Whitespace only: Fix several whitespace issues in Handbook's 'geom' chapter
This commit is contained in:
parent
237405f64b
commit
f195ab2200
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=33302
1 changed files with 99 additions and 98 deletions
|
@ -30,7 +30,7 @@
|
|||
|
||||
<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>
|
||||
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.
|
||||
|
@ -50,12 +50,11 @@
|
|||
|
||||
<listitem>
|
||||
<para>How to use the base utilities to configure, maintain,
|
||||
and manipulate the various <acronym>RAID</acronym>
|
||||
levels.</para>
|
||||
and manipulate the various <acronym>RAID</acronym> levels.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>How to mirror, stripe, encrypt, and remotely connect disk
|
||||
<para>How to mirror, stripe, encrypt, and remotely connect disk
|
||||
devices through GEOM.</para>
|
||||
</listitem>
|
||||
|
||||
|
@ -93,19 +92,19 @@
|
|||
</sect1>
|
||||
|
||||
<sect1 id="GEOM-striping">
|
||||
<sect1info>
|
||||
<authorgroup>
|
||||
<author>
|
||||
<firstname>Tom</firstname>
|
||||
<surname>Rhodes</surname>
|
||||
<contrib>Written by </contrib>
|
||||
</author>
|
||||
<author>
|
||||
<firstname>Murray</firstname>
|
||||
<surname>Stokely</surname>
|
||||
</author>
|
||||
</authorgroup>
|
||||
</sect1info>
|
||||
<sect1info>
|
||||
<authorgroup>
|
||||
<author>
|
||||
<firstname>Tom</firstname>
|
||||
<surname>Rhodes</surname>
|
||||
<contrib>Written by </contrib>
|
||||
</author>
|
||||
<author>
|
||||
<firstname>Murray</firstname>
|
||||
<surname>Stokely</surname>
|
||||
</author>
|
||||
</authorgroup>
|
||||
</sect1info>
|
||||
|
||||
<title>RAID0 - Striping</title>
|
||||
|
||||
|
@ -134,90 +133,92 @@
|
|||
the same size, since I/O requests are interleaved to read or
|
||||
write to multiple disks in parallel.</para>
|
||||
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata fileref="geom/striping" align="center">
|
||||
</imageobject>
|
||||
<mediaobject>
|
||||
<imageobject>
|
||||
<imagedata fileref="geom/striping" align="center">
|
||||
</imageobject>
|
||||
|
||||
<textobject>
|
||||
<phrase>Disk Striping Illustration</phrase>
|
||||
</textobject>
|
||||
</mediaobject>
|
||||
<textobject>
|
||||
<phrase>Disk Striping Illustration</phrase>
|
||||
</textobject>
|
||||
</mediaobject>
|
||||
|
||||
<procedure>
|
||||
<title>Creating a stripe of unformatted ATA disks</title>
|
||||
|
||||
<step><para>Load the <filename>geom_stripe.ko</filename>
|
||||
module:</para>
|
||||
<step>
|
||||
<para>Load the <filename>geom_stripe.ko</filename>
|
||||
module:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>kldload geom_stripe</userinput></screen>
|
||||
</step>
|
||||
|
||||
<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>
|
||||
|
||||
<screen>&prompt.root; <userinput>mkdir /mnt</userinput></screen>
|
||||
<screen>&prompt.root; <userinput>kldload geom_stripe</userinput></screen>
|
||||
</step>
|
||||
|
||||
<step><para>Determine the device names for the disks which will
|
||||
be striped, and create the new stripe device. For example,
|
||||
to stripe two unused and unpartitioned <acronym>ATA</acronym> disks,
|
||||
for example <filename>/dev/ad2</filename> and
|
||||
<filename>/dev/ad3</filename>:</para>
|
||||
<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>
|
||||
|
||||
<screen>&prompt.root; <userinput>gstripe label -v st0 /dev/ad2 /dev/ad3</userinput>
|
||||
<screen>&prompt.root; <userinput>mkdir /mnt</userinput></screen>
|
||||
</step>
|
||||
|
||||
<step>
|
||||
<para>Determine the device names for the disks which will
|
||||
be striped, and create the new stripe device. For example,
|
||||
to stripe two unused and unpartitioned <acronym>ATA</acronym> disks,
|
||||
for example <filename>/dev/ad2</filename> and
|
||||
<filename>/dev/ad3</filename>:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>gstripe label -v st0 /dev/ad2 /dev/ad3</userinput>
|
||||
Metadata value stored on /dev/ad2.
|
||||
Metadata value stored on /dev/ad3.
|
||||
Done.</screen>
|
||||
|
||||
</step>
|
||||
|
||||
<step><para>Write a standard label, also known as a partition
|
||||
table, on the new volume and install the default
|
||||
bootstrap code:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>bsdlabel -wB /dev/stripe/st0</userinput></screen>
|
||||
<step>
|
||||
<para>Write a standard label, also known as a partition
|
||||
table, on the new volume and install the default
|
||||
bootstrap code:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>bsdlabel -wB /dev/stripe/st0</userinput></screen>
|
||||
</step>
|
||||
|
||||
<step><para>This process should have created two other devices
|
||||
in the <filename class="directory">/dev/stripe</filename>
|
||||
directory in addition to the <devicename>st0</devicename> device.
|
||||
Those include <devicename>st0a</devicename> and
|
||||
<devicename>st0c</devicename>. At this point a file system may be created
|
||||
on the <devicename>st0a</devicename> device with the
|
||||
<command>newfs</command> utility:</para>
|
||||
<step>
|
||||
<para>This process should have created two other devices
|
||||
in the <filename class="directory">/dev/stripe</filename>
|
||||
directory in addition to the <devicename>st0</devicename> device.
|
||||
Those include <devicename>st0a</devicename> and
|
||||
<devicename>st0c</devicename>. At this point a file system may be
|
||||
created on the <devicename>st0a</devicename> device with the
|
||||
<command>newfs</command> utility:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>newfs -U /dev/stripe/st0a</userinput></screen>
|
||||
<screen>&prompt.root; <userinput>newfs -U /dev/stripe/st0a</userinput></screen>
|
||||
|
||||
<para>Many numbers will glide across the screen, and after a few
|
||||
seconds, the process will be complete. The volume has been
|
||||
created and is ready to be mounted.</para>
|
||||
</step>
|
||||
</procedure>
|
||||
<para>Many numbers will glide across the screen, and after a few
|
||||
seconds, the process will be complete. The volume has been
|
||||
created and is ready to be mounted.</para>
|
||||
</step>
|
||||
</procedure>
|
||||
|
||||
<para>To manually mount the created disk stripe:</para>
|
||||
<para>To manually mount the created disk stripe:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>mount /dev/stripe/st0a /mnt</userinput></screen>
|
||||
<screen>&prompt.root; <userinput>mount /dev/stripe/st0a /mnt</userinput></screen>
|
||||
|
||||
<para>To mount this striped file system automatically during the boot
|
||||
process, place the volume information in
|
||||
<filename>/etc/fstab</filename> file. For this purpose, a permanent mount
|
||||
point, named <filename class="directory">stripe</filename>, is
|
||||
created:</para>
|
||||
<para>To mount this striped file system automatically during the boot
|
||||
process, place the volume information in
|
||||
<filename>/etc/fstab</filename> file. For this purpose, a permanent
|
||||
mount point, named <filename class="directory">stripe</filename>, is
|
||||
created:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>mkdir /stripe</userinput>
|
||||
<screen>&prompt.root; <userinput>mkdir /stripe</userinput>
|
||||
&prompt.root; <userinput>echo "/dev/stripe/st0a /stripe ufs rw 2 2" \</userinput>
|
||||
<userinput>>> /etc/fstab</userinput></screen>
|
||||
|
||||
<para>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>:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>echo 'geom_stripe_load="YES"' >> /boot/loader.conf</userinput></screen>
|
||||
<para>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>:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>echo 'geom_stripe_load="YES"' >> /boot/loader.conf</userinput></screen>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="GEOM-mirror">
|
||||
|
@ -237,8 +238,7 @@ Done.</screen>
|
|||
important aspect is that information on one disk or partition is
|
||||
being replicated. Later, that information could be more easily
|
||||
restored, backed up without causing service or access
|
||||
interruption, and even be physically stored in a data
|
||||
safe.</para>
|
||||
interruption, and even be physically stored in a data safe.</para>
|
||||
|
||||
<para>To begin, ensure the system has two disk drives of equal size,
|
||||
these exercises assume they are direct access (&man.da.4;)
|
||||
|
@ -291,20 +291,21 @@ Done.</screen>
|
|||
|
||||
<para>Edit the <filename>/etc/fstab</filename> file, replacing
|
||||
references to the old <devicename>da0</devicename> with the
|
||||
new device nodes of the <devicename>gm0</devicename> mirror device.</para>
|
||||
new device nodes of the <devicename>gm0</devicename> mirror
|
||||
device.</para>
|
||||
|
||||
<note>
|
||||
<para>If &man.vi.1; is your preferred editor, the following is
|
||||
an easy way to accomplish this task:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>vi /etc/fstab</userinput></screen>
|
||||
<screen>&prompt.root; <userinput>vi /etc/fstab</userinput></screen>
|
||||
|
||||
<para>In &man.vi.1; back up the current contents of
|
||||
<filename>fstab</filename> by typing
|
||||
<userinput>:w /etc/fstab.bak</userinput>. Then
|
||||
replace all old <devicename>da0</devicename> references
|
||||
with <devicename>gm0</devicename> by typing
|
||||
<userinput>:%s/da/mirror\/gm/g</userinput>.<para>
|
||||
<para>In &man.vi.1; back up the current contents of
|
||||
<filename>fstab</filename> by typing
|
||||
<userinput>:w /etc/fstab.bak</userinput>. Then
|
||||
replace all old <devicename>da0</devicename> references
|
||||
with <devicename>gm0</devicename> by typing
|
||||
<userinput>:%s/da/mirror\/gm/g</userinput>.<para>
|
||||
</note>
|
||||
|
||||
<para>The resulting <filename>fstab</filename> file should look
|
||||
|
@ -368,6 +369,7 @@ mirror/gm0 COMPLETE da0
|
|||
|
||||
<sect2>
|
||||
<title>Troubleshooting</title>
|
||||
|
||||
<sect3>
|
||||
<title>System refuses to boot</title>
|
||||
|
||||
|
@ -539,7 +541,7 @@ ggate0
|
|||
specific, and will be created in the <filename
|
||||
class="directory">/dev/label</filename> directory.</para>
|
||||
|
||||
<para>A temporary label will go away with the next reboot. These
|
||||
<para>A temporary label will go away with the next reboot. These
|
||||
labels will be created in the
|
||||
<filename class="directory">/dev/label</filename> directory and
|
||||
are perfect for experimentation. A temporary label can be
|
||||
|
@ -657,7 +659,7 @@ devfs on /dev (devfs, local)
|
|||
|
||||
<sect1 id="geom-gjournal">
|
||||
<title>UFS Journaling Through GEOM</title>
|
||||
|
||||
|
||||
<indexterm>
|
||||
<primary>GEOM</primary>
|
||||
</indexterm>
|
||||
|
@ -674,7 +676,7 @@ devfs on /dev (devfs, local)
|
|||
<para>What is journaling? Journaling capability stores a log of
|
||||
file system transactions, i.e.: changes that make up a complete
|
||||
disk write operation, before meta-data and file writes are
|
||||
committed to the disk proper. This transaction log can later
|
||||
committed to the disk proper. This transaction log can later
|
||||
be replayed to redo file system transactions, preventing file
|
||||
system inconsistencies.</para>
|
||||
|
||||
|
@ -682,9 +684,8 @@ devfs on /dev (devfs, local)
|
|||
loss and inconsistencies of the file system. Unlike Soft Updates
|
||||
which tracks and enforces meta-data updates and Snapshots which
|
||||
is an image of the file system, an actual log is stored in disk
|
||||
space specifically reserved for this task,
|
||||
and in some cases may be stored on another disk
|
||||
entirely.</para>
|
||||
space specifically reserved for this task, and in some cases may be
|
||||
stored on another disk entirely.</para>
|
||||
|
||||
<para>Unlike other file system journaling implementations, the
|
||||
<command>gjournal</command> method is block based and not
|
||||
|
@ -720,8 +721,8 @@ devfs on /dev (devfs, local)
|
|||
|
||||
<para>At this point, there should be a
|
||||
<devicename>/dev/da4</devicename> device node and a
|
||||
<devicename>/dev/da4.journal</devicename> device node. A
|
||||
file system may now be created on this device:</para>
|
||||
<devicename>/dev/da4.journal</devicename> 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>
|
||||
|
||||
|
@ -736,11 +737,12 @@ devfs on /dev (devfs, local)
|
|||
|
||||
<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>
|
||||
for each individual slice. For instance, if
|
||||
<devicename>ad4s1</devicename> and <devicename>ad4s2</devicename>
|
||||
are both slices, then <command>gjournal</command> will create
|
||||
<devicename>ad4s1.journal</devicename> and <devicename>ad4s2.journal</devicename>. In the case of the command
|
||||
being run twice, the result will be
|
||||
<quote>journals</quote>.</para>
|
||||
<devicename>ad4s1.journal</devicename> and
|
||||
<devicename>ad4s2.journal</devicename>. In the case of the command
|
||||
being run twice, the result will be <quote>journals</quote>.</para>
|
||||
</note>
|
||||
|
||||
<para>Under some circumstances, keeping the journal on another disk
|
||||
|
@ -751,8 +753,7 @@ devfs on /dev (devfs, local)
|
|||
before attempting to alter a file system. In most cases, the
|
||||
<command>gjournal</command> will fail if it is unable to create
|
||||
the actual journal but this does not protect against data loss
|
||||
incurred as a result of misusing
|
||||
<command>tunefs</command>.</para>
|
||||
incurred as a result of misusing <command>tunefs</command>.</para>
|
||||
|
||||
<para>It is also possible to journal the boot disk of a &os; system.
|
||||
Please refer to the article <ulink
|
||||
|
|
Loading…
Reference in a new issue