LDP/LDP/guide/docbook/EVMSUG/create-drivelinking.xml

308 lines
12 KiB
XML

<chapter id="evmscreatedrivelinking"><title>Creating drive links</title>
<para>This chapter discusses the EVMS drive linking feature, which is
implemented by the drive link plug-in, and tells how to create, expand, shrink,
and delete a drive link.</para>
<sect1 id="whatisdrivelinking"><title>What is drive linking?</title>
<para>Drive linking linearly concatenates objects, allowing you to
create larger storage objects and volumes from smaller individual pieces.
For example, say you need a 1 GB volume but do
not have contiguous space available of that length. Drive linking lets you
link two or more objects together to form the 1 GB volume.</para>
<para>
The types of objects that can be drive linked include disks, segments,
regions, and other feature objects.
</para>
<para>
Any resizing of an existing drive link, whether to grow it or shrink it,
must be coordinated with the appropriate file system operations.
EVMS handles these file system operations automatically.
</para>
<para>
Because drive linking is an EVMS-specific feature that contains EVMS metadata,
it is not backward compatible with other volume-management schemes.</para>
</sect1>
<sect1 id="howimp"><title>How drive linking is implemented</title>
<para>The drive link plug-in consumes storage objects, called link
objects, which produce a larger drive link object whose address space spans
the link objects.
The drive link plug-in knows how to assemble the link objects so as to
create the exact same address space every time.
The information required to do this is kept on each link child as persistent
drive-link metadata.
During discovery, the drive link plug-in inspects each known storage
object for this metadata.
The presence of this metadata identifies the storage object as a link object.
The information contained in the metadata is sufficient to:</para>
<itemizedlist>
<listitem>
<para>Identify the link object itself.</para>
</listitem>
<listitem>
<para>Identify the drive link storage object that the link object belongs to.
</para>
</listitem>
<listitem>
<para>Identify all link objects belonging to the drive link storage.
object</para>
</listitem>
<listitem>
<para>Establish the order in which to combine the child link objects.</para>
</listitem>
</itemizedlist>
<para>If any link objects are missing at the conclusion of the discovery
process, the drive link storage object contains gaps where the missing
link objects occur.
In such cases, the drive link plug-in attempts to fill in the gap with a
substitute link object and construct the drive link storage object in
read-only mode, which allows for recovery action.
The missing object might reside on removable storage that has been removed or
perhaps a lower layer plug-in failed to produce the missing object.
Whatever the reason, a read-only drive link storage object, together
logging errors, help you take the appropriate actions to recover the drive link.
</para>
</sect1>
<sect1><title>Creating a drive link</title>
<para>The drive link plug-in provides a list of acceptable objects from
which it can create a drive-link object.
When you create an EVMS storage object and then choose the drive
link plug-in, a list of acceptable objects is provided that you can choose
from.
The ordering of the drive link is implied by the order in which you pick
objects from the provided list.
After you provide a name for the new drive-link object, the identified
link objects are consumed and the new drive-link object is produced.
The name for the new object is the only option when creating a drive-link.
</para>
<para>Only the last object in a drive link
can be expanded, shrunk or removed. Additionally, a new object can be added to the
end of an existing drive link only if the file system (if one exists) permits.
Any resizing of a drive link, whether to grow it or shrink it, must be coordinated with the
appropriate file system operations. EVMS handles these file system operations
automatically.
</para>
</sect1>
<sect1 id="drivelinkex"><title>Example: create a drive link</title>
<para> This section shows how to create a drive link with EVMS:</para>
<blockquote><example><title>Create a drive link</title>
<para>Create a new drive link consisting of <filename>sde4</filename> and <filename>hdc2</filename>, and call it &quot;dl.&quot;</para></example></blockquote>
<sect2 id="guidrivelinking"><title>Using the EVMS GUI</title>
<para>To create the drive link using the GUI, follow these steps:
<orderedlist>
<listitem><para>Select
<menuchoice><guimenu>Actions</guimenu>
<guimenuitem>Create</guimenuitem>
<guimenuitem>Feature Object</guimenuitem></menuchoice>
to see a list of EVMS features.
</para></listitem>
<listitem><para>Select
<guimenuitem>Drive Linking Feature</guimenuitem>.
</para>
</listitem>
<listitem>
<para>Click <guibutton>Next</guibutton>.</para>
</listitem>
<listitem><para>Click the objects you want to compose the drive link:
sde4 and hdc2.</para></listitem>
<listitem><para>Click <guibutton>Next</guibutton>.</para>
</listitem>
<listitem><para>Type <filename>dl</filename> in the &quot;name&quot; field</para>
</listitem><listitem><para>Click
<guibutton>Create</guibutton>. </para>
<para>The last dialog window
presents the free space object you
selected as well as the available
configuration options for that
object.</para>
</listitem>
</orderedlist></para>
<para>Alternatively, you can perform some of the steps to create a drive link with the GUI
context sensitive menu:</para>
<orderedlist>
<listitem><para>From the <guimenuitem>Available Objects</guimenuitem> tab,
right click <filename>sde4</filename>.</para></listitem>
<listitem><para>Click <guimenuitem>Create Feature Object...</guimenuitem></para></listitem>
<listitem><para>Continue creating the drive link beginning with step 2 of the GUI
instructions. In step 4, <filename>sde4</filename> is selected for you. You can also
select <filename>hdc2</filename>.</para></listitem>
</orderedlist>
</sect2>
<!-- Ncurses-->
<sect2 id="ncursdrivelink"><title>Using Ncurses</title>
<para>To create the drive link, follow these steps:</para>
<orderedlist><listitem><para>Select <menuchoice><guimenu>Actions</guimenu><guimenuitem>Create</guimenuitem><guimenuitem>Feature Object</guimenuitem></menuchoice> to see a list of EVMS features.</para> </listitem>
<listitem><para>Select <guimenuitem>Drive Linking Feature</guimenuitem>.</para>
</listitem>
<listitem><para>Activate <guibutton>Next</guibutton>.</para></listitem>
<listitem><para>Use <keycap>spacebar</keycap>
to select the objects you want to compose the drive
link from: <filename>sde4</filename> and <filename>hdc2</filename>.</para></listitem>
<listitem><para>Activate <guibutton>Next</guibutton>.</para></listitem>
<listitem><para>Press
<keycap>spacebar</keycap> to edit the Name field.</para></listitem>
<listitem><para>Type <userinput>dl</userinput> at the "::" prompt.
Press <keycap>Enter</keycap>.</para></listitem>
<listitem><para>Activate <guibutton>Create</guibutton>.</para>
</listitem>
</orderedlist>
<para>Alternatively, you can perform some of the steps to create a drive link with the
context sensitive menu:</para>
<orderedlist>
<listitem><para>From the Available Objects view, press <keycap>Enter</keycap> on <filename>sde4</filename>.</para>
</listitem>
<listitem><para>Activate the <guimenuitem>Create Feature Object</guimenuitem> menu item.</para>
</listitem>
<listitem><para>Continue creating the drive link beginning with step 4 of the Ncurses
instructions. <filename>sde4</filename> will be pre-selected. You can also select <filename>hdc2</filename>.</para>
</listitem>
</orderedlist>
</sect2>
<!-- CLI-->
<sect2 id="drlinkseg"><title>Using the CLI</title>
<para>Use the
<command>create</command> command to create a drive link through the CLI. You pass the &quot;object&quot; keyword to the <command>create</command> command, followed by the plug-in and its options, and finally the objects.</para>
<para>To determine the options for the plug-in you are going to use, issue the following command:</para>
<programlisting>query: plugins, plugin=DriveLink, list options</programlisting>
<para>Now construct the <command>create</command> command, as follows:</para>
<programlisting>create: object, DriveLink={Name=dl}, sde4, hdc2</programlisting>
</sect2>
</sect1>
<sect1 id="expandpartitions">
<title>Expanding a drive link</title>
<para>
A drive link is an aggregating storage object that is built by combining a number of
storage objects into a larger resulting object. A drive link consumes link objects in order
to produce a larger storage object. The ordering of the link objects as well as the
number of sectors they each contribute is described by drive link metadata. The metadata
allows the drive link plug-in to recreate the drive link, spanning the link objects in a
consistent manner. Allowing any of these link objects to expand would corrupt the
size and ordering of link objects; the ordering of link objects is vital to the correct
operation of the drive link. However, expanding a drive link can be controlled by only
allowing sectors to be added at the end of the drive link storage object. This does not
disturb the ordering of link objects in any manner and, because sectors are only added
at the end of the drive link, existing sectors have the same address (logical sector
number) as before the expansion. Therefore, a drive link can be expanded by adding
additional sectors in two different ways:</para>
<itemizedlist>
<listitem>
<para>
By adding an additional storage object to the end of the drive link.
</para>
</listitem>
<listitem>
<para>
By expanding the last storage object in the drive link.
</para>
</listitem>
</itemizedlist>
<para>
If the expansion point is the drive link storage object, you can perform the
expansion by adding an additional storage object to the drive link. This is done
by choosing from a list of acceptable objects during the expand operation. Multiple objects
can be selected and added to the drive link.
</para>
<para>
If the expansion point is the last storage object in the drive link, then you expand the
drive link by interacting with the plug-in that produced the object. For example, if
the link was a segment, then the segment manager plug-in that produced the storage
object expands the link object. Afterwords, the drive link plug-in notices the size
difference and updates the drive link metadata to reflect the resize of the child object.</para>
<para>
There are no expand options.
</para>
</sect1>
<sect1 id="shrinkdrivelink"><title>Shrinking a drive link</title>
<para>
Shrinking a drive link has the same restrictions as expanding a drive link. A drive link
object can only be shrunk by removing sectors from the end of the drive link. This can
be done in the following ways:
<itemizedlist>
<listitem><para>By removing link objects from the end of the drive link.</para>
</listitem>
<listitem><para>By shrinking the last storage object in the drive link.</para>
</listitem>
</itemizedlist>
</para>
<para>
The drive link plug-in attempts to orchestrate the shrinking of a
drive-link storage object by only listing the last link object.
If you select this object, the drive link plug-in then lists the next-to-last
link object, and so forth, moving backward through the link
objects to satisfy the shrink command.
</para>
<para>If the shrink point is the last storage object in the drive link, then you shrink the
drive link by interacting with the plug-in that produced the object.</para>
<para>
There are no shrink options.
</para>
</sect1>
<sect1 id="deletedrivelink"><title>Deleting a drive link</title>
<para>
A drive link can be deleted as long as it is not currently a
compatibility volume, an EVMS volume, or consumed by another EVMS plug-in.
</para>
<para>
No options are available for deleting a drive link storage object.
</para>
</sect1>
</chapter>