LDP/LDP/guide/docbook/EVMSUG/plugintasks.xml

160 lines
5.6 KiB
XML

<chapter id="plugintasks"><title>Plug-in operations tasks</title>
<para>This chapter discusses plug-in operations tasks and shows how to complete a plug-in task with the EVMS GUI, Ncurses, and CLI interfaces.</para>
<sect1 id="aboutplugintasks"><title>What are plug-in tasks?</title>
<para>Plug-in tasks are functions that are available only within the context of a particular plug-in. These functions are not common to all plug-ins. For example, tasks to add spare disks to a RAID array make sense only in the context of the MD plug-in, and tasks to reset a snapshot make sense only in the context of the Snapshot plug-in.</para>
</sect1>
<sect1 id="pluginexample"><title>Example: complete a plug-in operations task</title>
<para> This section shows how to complete a plug-in operations task with the EVMS GUI, Ncurses, and CLI interfaces.</para>
<blockquote><example><title>Add a spare disk to a compatibility volume made from an MDRaid5 region</title>
<para>This example adds disk <filename>sde</filename> as a spare disk onto volume <filename>/dev/evms/md/md0</filename>, which is a compatibility volume that was created from an MDRaid5 region.</para></example></blockquote>
<sect2 id="plugingui"><title>Using the EVMS GUI</title>
<para>Follow these steps to add <filename>sde</filename> to <filename>/dev/evms/md/md0</filename> with the EVMS GUI:
<orderedlist>
<listitem><para>Select <menuchoice><guimenu>Other</guimenu>
<guimenuitem>Storage Object Tasks...</guimenuitem></menuchoice>
</para></listitem>
<listitem><para>Select <menuchoice><guimenu>md/md0</guimenu></menuchoice>.
</para></listitem>
<listitem><para>Click <guibutton>Next</guibutton>.
</para></listitem>
<listitem><para>Select <menuchoice><guimenu>Add spare object</guimenu></menuchoice>.
</para></listitem>
<listitem><para>Click <guibutton>Next</guibutton>.
</para></listitem>
<listitem><para>Select <menuchoice><guimenu>sde</guimenu></menuchoice>.</para></listitem>
<listitem><para>Click <guibutton>Add</guibutton>.
</para></listitem>
<listitem><para>The operation is completed when you save.</para></listitem>
</orderedlist>
</para><para>Alternatively, you could use context-sensitive menus to
complete the task, as follows:
<orderedlist>
<listitem><para>View the region <filename>md/md0</filename>. You can view the region either
by clicking on the small plus sign beside the volume name
(<filename>/dev/evms/md/md0</filename>) on the <menuchoice><guimenu>volumes tab</guimenu></menuchoice>,
or by selecting the <menuchoice><guimenu>regions tab</guimenu></menuchoice>.</para></listitem>
<listitem><para>Right click the region (<filename>md/md0</filename>). A list of acceptable
Actions and Navigational shortcuts displays. The last items on the
list are the tasks that are acceptable at this time.</para></listitem>
<listitem><para>Point to <menuchoice><guimenu>Add spare object</guimenu></menuchoice> and
left click.</para></listitem>
<listitem><para>Select <menuchoice><guimenu>sde</guimenu></menuchoice>.</para></listitem>
<listitem><para>Click <guibutton>Add</guibutton>.</para></listitem></orderedlist></para>
</sect2>
<!-- Ncurses-->
<sect2 id="plugintasksncurses"><title>Using Ncurses</title>
<para>Follow these steps to add <filename>sde</filename> to <filename>/dev/evms/md/md0</filename> with Ncurses:
<orderedlist>
<listitem><para>Select <menuchoice><guimenu>Other</guimenu>
<guimenuitem>Storage Object Tasks</guimenuitem></menuchoice>
</para></listitem>
<listitem><para>Select
<guimenuitem>md/md0</guimenuitem>.
</para></listitem>
<listitem><para>Activate <guibutton>Next</guibutton>.
</para></listitem>
<listitem><para>Select
<guimenuitem>Add spare object</guimenuitem>.
</para></listitem>
<listitem><para>Activate <guibutton>Next</guibutton>.
</para></listitem>
<listitem><para>Select
<guimenuitem>sde</guimenuitem>.
</para></listitem>
<listitem><para>Activate <guibutton>Add</guibutton>.
</para></listitem>
</orderedlist>
</para>
<para>Alternatively, you can use the context sensitive menu to complete the task:</para>
<orderedlist>
<listitem><para>From the Regions view, press <keycap>Enter</keycap> on <guimenuitem>md/md0</guimenuitem>.</para>
</listitem>
<listitem><para>Activate the <guimenuitem>Add spare object</guimenuitem> menu item.</para>
</listitem>
<listitem><para>Select <guimenuitem>sde</guimenuitem>.</para>
</listitem>
<listitem><para>Activate <guibutton>Add</guibutton>.</para>
</listitem>
</orderedlist>
</sect2>
<!-- CLI-->
<sect2 id="plugincli"><title>Using the CLI</title>
<para>With the EVMS CLI, all plug-in tasks must be
accomplished with the <command>task</command> command. Follow these steps
to add <filename>sde</filename> to <filename>/dev/evms/md/md0</filename>
with the CLI:
<orderedlist>
<listitem><para>The following query command with the list
options filter to determines
the acceptable tasks for a particular object and the name-value
pairs it supports. The command returns information about which
plug-in tasks are available at the current time and provides
the information necessary for you to complete the command.
</para>
<programlisting>query: objects, object=md/md0, list options</programlisting>
</listitem>
<listitem><para>The command takes the name of the task
(returned from the previous query), the object to operate on
(in this case, md/md0), any required options (none in this case)
and, if necessary, another object to be manipulated
(in our example, <filename>sde</filename>, which is the spare disk
we want to add):
<programlisting>task: addspare, md/md0, sde</programlisting>
The command is completed upon saving.</para>
</listitem>
</orderedlist></para>
</sect2>
</sect1>
</chapter>