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:
parent
8213454821
commit
9c57aa898b
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=25321
1 changed files with 98 additions and 65 deletions
|
@ -29,16 +29,16 @@
|
|||
</indexterm>
|
||||
|
||||
<para>This chapter covers the use of disks under the new GEOM
|
||||
framework in &os;. This includes the major
|
||||
<acronym>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. This information
|
||||
is provided through the &man.geom.4; manual page and its various
|
||||
SEE ALSO references. This chapter is also not a definitive guide
|
||||
to <acronym>RAID</acronym> configurations. Only GEOM
|
||||
supported <acronym>RAID</acronym> classifications will be
|
||||
discussed.</para>
|
||||
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.
|
||||
This information is provided through the &man.geom.4; manual
|
||||
page and its various SEE ALSO references. This chapter is also
|
||||
not a definitive guide to <acronym>RAID</acronym>
|
||||
configurations. Only GEOM supported <acronym>RAID</acronym>
|
||||
classifications will be discussed.</para>
|
||||
|
||||
<para>After reading this chapter, you will know:</para>
|
||||
|
||||
|
@ -91,6 +91,20 @@
|
|||
</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>
|
||||
|
||||
<title>RAID0 - Striping</title>
|
||||
|
||||
<indexterm>
|
||||
|
@ -102,84 +116,103 @@
|
|||
|
||||
<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
|
||||
hardware controllers supporting all variants of disks,
|
||||
<acronym>SCSI</acronym>, <acronym>SATA</acronym>,
|
||||
and <acronym>ATA</acronym>. The GEOM disk subsystem provides
|
||||
software support for <acronym>RAID</acronym>1, also known as
|
||||
hardware controllers. The GEOM disk subsystem provides
|
||||
software support for <acronym>RAID</acronym>0, also known as
|
||||
disk striping.</para>
|
||||
|
||||
<para>Some cases have this volume, comprised of several disks, as a
|
||||
separate file system for backups, data storage for users;
|
||||
however, in other cases still, this volume may hold the root, or
|
||||
<filename role="directory">/</filename> partition and the system
|
||||
will boot from it. Both will be described herein.</para>
|
||||
<para>In a <acronym>RAID</acronym>0 system, data are split up in
|
||||
blocks that get written across all the drives in the array.
|
||||
Instead of having to wait on the system to write 256k to one
|
||||
disk, a <acronym>RAID</acronym>0 system can simultaneously write
|
||||
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
|
||||
size of course, load the <filename>geom_stripe</filename>
|
||||
module:</para>
|
||||
<para>Each disk in a <acronym>RAID</acronym>0 stripe must be of
|
||||
the same size, since I/O requests are interleaved to read or
|
||||
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>
|
||||
</step>
|
||||
|
||||
<para>The module should now be loaded and visible from the output of
|
||||
<command>kldstat</command>. Now to combine the disks. Ensure
|
||||
that a mount point exists, if this volume will become a root
|
||||
partition then temporarily use
|
||||
<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>
|
||||
<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
|
||||
role="directory">/mnt</filename>.</para>
|
||||
|
||||
<para>Begin by selecting the disks which will be striped. Our
|
||||
scenario has two unused, unpartitioned <acronym>ATA</acronym>
|
||||
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>mkdir /mnt</userinput></screen>
|
||||
</step>
|
||||
|
||||
<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
|
||||
been stored on the devices. The file system must now be created
|
||||
on the device. If this volume is to be used for system
|
||||
initialization, the following command must be issued before the
|
||||
file system is created:</para>
|
||||
been stored on the devices.
|
||||
XXX: What message? Put it inside the screen output above.
|
||||
-->
|
||||
</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
|
||||
<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>bsdlabel -wB /dev/stripe/st0</userinput></screen>
|
||||
|
||||
<screen>&prompt.root; <userinput>newfs -U /dev/stripe/st0a</userinput></screen>
|
||||
</step>
|
||||
|
||||
<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 hung from its <command>mount</command>
|
||||
point:</para>
|
||||
<step><para>This process should have created two other devices
|
||||
in the <filename role="directory">/dev/stripe</filename>
|
||||
directory in addition to the <filename>st0</filename> device.
|
||||
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
|
||||
<filename>/etc/fstab</filename> file:</para>
|
||||
<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>
|
||||
|
||||
<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>>> /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"' >> /boot/loader.conf</userinput></screen>
|
||||
<screen>&prompt.root; <userinput>echo 'geom_stripe_load="YES"' >> /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 id="GEOM-mirror">
|
||||
|
|
Loading…
Reference in a new issue