Significant cleanup/rewrite of GEOM Striping section.

* This chapter claims to be about striping, but talks about
  disk concatenation in some paragraphs.  Remove all references to
  concatenation, add a brief paragraph explaining what striping is and
  why it provides superior I/O performance through parallel I/O to
  multiple disks simultaneously.

* Do not alternate between calling striping raid0 and raid1.
  Consistently refer to it as raid0, as raid1 is mirroring.

* Cleanup / reorganize the example set of commands for creating a
  stripe of two ATA disks.  Wrap it in a DocBook <procedure> tag with
  individual <steps> to provide a title for this procedure and make the
  numbered steps very clear to follow without confusing verbiage and
  side tangents adding confusion.

* Expand 'redundant array of inexpensive disks' in <acronym> tag for
  mouseover on first use of HTML output.

* Remove some poorly worded, confusing, and contradictory sentences
  and paragraphs.
This commit is contained in:
Murray Stokely 2005-08-06 14:28:09 +00:00
parent 8213454821
commit 9c57aa898b
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=25321

View file

@ -29,16 +29,16 @@
</indexterm> </indexterm>
<para>This chapter covers the use of disks under the new GEOM <para>This chapter covers the use of disks under the new GEOM
framework in &os;. This includes the major framework in &os;. This includes the major <acronym
<acronym>RAID</acronym> control utilities which use the role="Redundant Array of Inexpensive Disks">RAID</acronym>
framework for configuration. This chapter will not go control utilities which use the framework for configuration.
into in depth discussion on how GEOM handles or controls This chapter will not go into in depth discussion on how GEOM
I/O, the underlying subsystem, or code. This information handles or controls I/O, the underlying subsystem, or code.
is provided through the &man.geom.4; manual page and its various This information is provided through the &man.geom.4; manual
SEE ALSO references. This chapter is also not a definitive guide page and its various SEE ALSO references. This chapter is also
to <acronym>RAID</acronym> configurations. Only GEOM not a definitive guide to <acronym>RAID</acronym>
supported <acronym>RAID</acronym> classifications will be configurations. Only GEOM supported <acronym>RAID</acronym>
discussed.</para> classifications will be discussed.</para>
<para>After reading this chapter, you will know:</para> <para>After reading this chapter, you will know:</para>
@ -91,6 +91,20 @@
</sect1> </sect1>
<sect1 id="GEOM-striping"> <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>
<title>RAID0 - Striping</title> <title>RAID0 - Striping</title>
<indexterm> <indexterm>
@ -102,84 +116,103 @@
<para>Striping is a method used to combine several disk drives into <para>Striping is a method used to combine several disk drives into
a single volume. In many cases, this is done through the use of a single volume. In many cases, this is done through the use of
hardware controllers supporting all variants of disks, hardware controllers. The GEOM disk subsystem provides
<acronym>SCSI</acronym>, <acronym>SATA</acronym>, software support for <acronym>RAID</acronym>0, also known as
and <acronym>ATA</acronym>. The GEOM disk subsystem provides
software support for <acronym>RAID</acronym>1, also known as
disk striping.</para> disk striping.</para>
<para>Some cases have this volume, comprised of several disks, as a <para>In a <acronym>RAID</acronym>0 system, data are split up in
separate file system for backups, data storage for users; blocks that get written across all the drives in the array.
however, in other cases still, this volume may hold the root, or Instead of having to wait on the system to write 256k to one
<filename role="directory">/</filename> partition and the system disk, a <acronym>RAID</acronym>0 system can simultaneously write
will boot from it. Both will be described herein.</para> 64k to each of four different disks, offering superior I/O
performance. This performance can be enhanced further by using
multiple disk controllers.</para>
<para>To stripe several <acronym>ATA</acronym> disks, of the same <para>Each disk in a <acronym>RAID</acronym>0 stripe must be of
size of course, load the <filename>geom_stripe</filename> the same size, since I/O requests are interleaved to read or
module:</para> write to multiple disks in parallel.</para>
<procedure>
<title>Creating a stripe of unformatted ATA disks</title>
<step><para>Load the <filename>geom_stripe</filename>
module:</para>
<screen>&prompt.root; <userinput>kldload geom_stripe.ko</userinput></screen> <screen>&prompt.root; <userinput>kldload geom_stripe.ko</userinput></screen>
</step>
<para>The module should now be loaded and visible from the output of <step><para>Ensure that a suitable mount point exists. If this
<command>kldstat</command>. Now to combine the disks. Ensure volume will become a root partition, then temporarily use
that a mount point exists, if this volume will become a root another mount point such as <filename
partition then temporarily use role="directory">/mnt</filename>.</para>
<filename role="directory">/mnt</filename>. Otherwise, for the
purpose of our examples, this volume will reside at the
<filename role="directory">/home</filename> mount point. This
process may be complicated if users already exist on the system.
If so, assume the volume will reside on
<filename role="directory">/data</filename>.</para>
<para>Begin by selecting the disks which will be striped. Our <screen>&prompt.root; <userinput>mkdir /mnt</userinput></screen>
scenario has two unused, unpartitioned <acronym>ATA</acronym> </step>
disks: <filename>/dev/ad2</filename> and
<filename>/dev/ad3</filename>. The module has been loaded and
our disks selected, we will now create the stripe device:</para>
<screen>&prompt.root; <userinput>gstripe label -v st0 /dev/ad2 /dev/ad3</userinput></screen> <step><para>Determine the device names for the disks which will
be striped, and create the new stripe device. For example,
the following command could be used to stripe two unused,
unpartitioned <acronym>ATA</acronym> disks:
<filename>/dev/ad2</filename> and
<filename>/dev/ad3</filename>.</para>
<screen>&prompt.root; <userinput>gstripe label -v st0 /dev/ad2 /dev/ad3</userinput></screen>
<!--
<para>A message should be returned explaining that meta data has <para>A message should be returned explaining that meta data has
been stored on the devices. The file system must now be created been stored on the devices.
on the device. If this volume is to be used for system XXX: What message? Put it inside the screen output above.
initialization, the following command must be issued before the -->
file system is created:</para> </step>
<screen>&prompt.root; <userinput>fdisk -vBI /dev/stripe/st0</userinput></screen> <step><para>If this volume will be used as a root device for
booting the system, then the following command must be issued
before the file system is created:</para>
<para>Create a partition table on the new volume:</para> <screen>&prompt.root; <userinput>fdisk -vBI /dev/stripe/st0</userinput></screen>
</step>
<screen>&prompt.root; <userinput>bsdlabel -wB /dev/stripe/st0</userinput></screen> <step><para>A partition table must be created on the new volume
with the following command:</para>
<para>This process should have created two other devices in the <screen>&prompt.root; <userinput>bsdlabel -wB /dev/stripe/st0</userinput></screen>
<filename role="directory">/dev/stripe</filename> directory in
addition to the <filename>st0</filename> device. Those include
<filename>st0a</filename> and <filename>st0c</filename>. Next a
file system must be created on the device using
<command>newfs</command>:</para>
<screen>&prompt.root; <userinput>newfs -U /dev/stripe/st0a</userinput></screen> </step>
<para>Many numbers will glide across the screen, and after a few <step><para>This process should have created two other devices
seconds, the process will be complete. The volume has been in the <filename role="directory">/dev/stripe</filename>
created and is ready to be hung from its <command>mount</command> directory in addition to the <filename>st0</filename> device.
point:</para> Those include <filename>st0a</filename> and
<filename>st0c</filename>. A file system must now be created
on the <filename>st0a</filename> device using the following
<command>newfs</command> command:</para>
<screen>&prompt.root; <userinput>mount /dev/stripe/st0a /home</userinput></screen> <screen>&prompt.root; <userinput>newfs -U /dev/stripe/st0a</userinput></screen>
<para>Place the volume information in <para>Many numbers will glide across the screen, and after a few
<filename>/etc/fstab</filename> file:</para> seconds, the process will be complete. The volume has been
created and is ready to be mounted:</para>
</step>
</procedure>
<screen>&prompt.root; <userinput>echo "/dev/stripe/st0a /home ufs rw 2 2" \</userinput> <para>The following command can be used to manually mount a newly
created disk stripe.</para>
<screen>&prompt.root; <userinput>mount /dev/stripe/st0a /mnt</userinput></screen>
<para>To mount this striped filesystem automatically during the boot
process, place the volume information in
<filename>/etc/fstab</filename> file:</para>
<screen>&prompt.root; <userinput>echo "/dev/stripe/st0a /mnt ufs rw 2 2" \</userinput>
<userinput>&gt;&gt; /etc/fstab</userinput></screen> <userinput>&gt;&gt; /etc/fstab</userinput></screen>
<para>And load the module during system initialization:</para> <para>The geom 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"' &gt;&gt; /boot/loader.conf</userinput></screen> <screen>&prompt.root; <userinput>echo 'geom_stripe_load="YES"' &gt;&gt; /boot/loader.conf</userinput></screen>
<para>From here on, all users will have their data stored on the
striped volume comprised of the disks concatenated in the
beginning.</para>
</sect1> </sect1>
<sect1 id="GEOM-mirror"> <sect1 id="GEOM-mirror">