[BACK]Return to admintools.sgml CVS log [TXT][DIR] Up to [Development] / failsafe / FailSafe-books / LnxFailSafe_AG

File: [Development] / failsafe / FailSafe-books / LnxFailSafe_AG / admintools.sgml (download)

Revision 1.1, Wed Nov 29 21:58:28 2000 UTC (16 years, 10 months ago) by vasa
Branch: MAIN
CVS Tags: HEAD

New documentation files for the Admin Guide.

<!-- Fragment document type declaration subset:
ArborText, Inc., 1988-1997, v.4001
<!DOCTYPE SET PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
<!ENTITY ha.cluster.messages SYSTEM "figures/ha.cluster.messages.eps" NDATA eps>
<!ENTITY machine.not.in.ha.cluster SYSTEM "figures/machine.not.in.ha.cluster.eps" NDATA eps>
<!ENTITY ha.cluster.config.info.flow SYSTEM "figures/ha.cluster.config.info.flow.eps" NDATA eps>
<!ENTITY software.layers SYSTEM "figures/software.layers.eps" NDATA eps>
<!ENTITY n1n4 SYSTEM "figures/n1n4.eps" NDATA eps>
<!ENTITY example.sgml SYSTEM "example.sgml">
<!ENTITY appupgrade.sgml SYSTEM "appupgrade.sgml">
<!ENTITY a1-1.failsafe.components SYSTEM "figures/a1-1.failsafe.components.eps" NDATA eps>
<!ENTITY a1-6.disk.storage.takeover SYSTEM "figures/a1-6.disk.storage.takeover.eps" NDATA eps>
<!ENTITY a2-3.non.shared.disk.config SYSTEM "figures/a2-3.non.shared.disk.config.eps" NDATA eps>
<!ENTITY a2-4.shared.disk.config SYSTEM "figures/a2-4.shared.disk.config.eps" NDATA eps>
<!ENTITY a2-5.shred.disk.2active.cnfig SYSTEM "figures/a2-5.shred.disk.2active.cnfig.eps" NDATA eps>
<!ENTITY a2-1.examp.interface.config SYSTEM "figures/a2-1.examp.interface.config.eps" NDATA eps>
<!ENTITY intro.sgml SYSTEM "intro.sgml">
<!ENTITY overview.sgml SYSTEM "overview.sgml">
<!ENTITY planning.sgml SYSTEM "planning.sgml">
<!ENTITY nodeconfig.sgml SYSTEM "nodeconfig.sgml">
<!ENTITY config.sgml SYSTEM "config.sgml">
<!ENTITY operate.sgml SYSTEM "operate.sgml">
<!ENTITY diag.sgml SYSTEM "diag.sgml">
<!ENTITY recover.sgml SYSTEM "recover.sgml">
<!ENTITY clustproc.sgml SYSTEM "clustproc.sgml">
<!ENTITY appfiles.sgml SYSTEM "appfiles.sgml">
<!ENTITY gloss.sgml SYSTEM "gloss.sgml">
<!ENTITY preface.sgml SYSTEM "preface.sgml">
<!ENTITY index.sgml SYSTEM "index.sgml">
]>
-->
<chapter id="LE73346-PARENT">
<title id="LE73346-TITLE">Linux FailSafe Administration Tools</title>
<para>This chapter describes Linux FailSafe administration tools and their
operation. The major sections in this chapter are as follows:</para>
<itemizedlist>
<listitem><para><xref linkend="LE74378-PARENT"></para>
</listitem>
<listitem><para><xref linkend="fs-guioverview"></para>
</listitem>
<listitem><para><xref linkend="LE15969-PARENT"></para>
</listitem>
</itemizedlist>
<sect1 id="LE74378-PARENT">
<title id="LE74378-TITLE">The Linux FailSafe Cluster Manager Tools</title>
<para><indexterm id="ITadmintools-0"><primary>Cluster Manager GUI</primary>
<secondary><emphasis>See</emphasis>  Linux FailSafe Cluster Manager GUI</secondary>
</indexterm> <indexterm id="ITadmintools-1"><primary>GUI</primary><secondary><emphasis>
See</emphasis>  Linux FailSafe Cluster Manager GUI</secondary></indexterm>You
can perform the Linux FailSafe administrative tasks using either of the following
tools:</para>
<itemizedlist>
<listitem><para>The Linux FailSafe Cluster Manager Graphical User Interface
(GUI)</para>
</listitem>
<listitem><para>The Linux FailSafe Cluster Manager Command Line Interface
(CLI)</para>
</listitem>
</itemizedlist>
<para>Although these tools use the same underlying software to configure and
monitor a Linux FailSafe system, the GUI provides the following additional
features, which are particularly important in a production system:</para>
<itemizedlist>
<listitem><para>Online help is provided with the <interface class="BUTTON">
Help</interface> button. You can also click any blue text to get more information
about that concept or input field.</para>
</listitem>
<listitem><para>The cluster state is shown visually for instant recognition
of status, problems, and failovers.</para>
</listitem>
<listitem><para>The state is updated dynamically for continuous system monitoring.
</para>
</listitem>
<listitem><para>All inputs are checked for correct syntax before attempting
to change the cluster database information.In every task, the cluster configuration
will not update until you click <interface class="BUTTON">OK</interface>.
</para>
</listitem>
<listitem><para>Tasks and tasksets take you step-by-step through configuration
and management operations, making actual changes to the cluster database as
the you perform a task.</para>
</listitem>
<listitem><para>The graphical tools can be run securely and remotely on any
computer that has a Java virtual machine, including Windows&reg; computers
and laptops.</para>
</listitem>
</itemizedlist>
<para>The Linux FailSafe Cluster Manager CLI, on the other hand, is more limited
in its functions. It enables you to configure and administer a Linux FailSafe
system using a command-line interface only on a Linux system. It provides
a minimum of help or formatted output and does not provide dynamic status
except when queried. An experienced Linux FailSafe administrator may find
the Cluster Manager CLI to be convenient when performing basic Linux FailSafe
configuration tasks, isolated single tasks in a production environment, or
when running scripts to automate some cluster administration tasks.</para>
</sect1>
<sect1 id="fs-guioverview" role="fs-guioverview">
<title id="LE16720-TITLE">Using the Linux FailSafe Cluster Manager GUI</title>
<para><indexterm id="ITadmintools-2"><primary>Linux FailSafe Cluster Manager
GUI</primary><secondary><emphasis>See</emphasis>  Linux FailSafe Cluster Manager
GUI</secondary></indexterm> <indexterm id="ITadmintools-3"><primary>Linux
FailSafe Cluster Manager GUI</primary><secondary>overview</secondary></indexterm>The
Linux FailSafe Cluster Manager GUI lets you configure, administer, and monitor
a cluster using a graphical user interface.To ensure that the required privileges
are available for performing all of the tasks, you should log in to the GUI
as <filename>root</filename>. However, some or all privileges can be granted
to any user by the system administrator using the Privilege Manager, part
of the Linux Interactive Desktop System Administration (<command>sysadmdesktop
</command>) product. For more information, see the <citetitle>Personal System
Administration Guide</citetitle>.</para>
<para>The Cluster Manager GUI consists of the FailSafe Cluster View and the
FailSafe Manager and its tasks and tasksets.These interfaces are described
in the following sections.</para>
<sect2 id="fs-clusterviewoverview" role="fs-clusterviewoverview">
<title>The FailSafe Cluster View</title>
<para>The FailSafe Cluster View window provides the following capabilities:
</para>
<itemizedlist>
<listitem><para>Shows the relationships among the cluster items (nodes, resources
groups, etc.)</para>
</listitem>
<listitem><para>Gives access to every item's configuration and status details
</para>
</listitem>
<listitem><para>Shows health of the cluster</para>
</listitem>
<listitem><para>Gives access to the FailSafe Manager and to the SYSLOG</para>
</listitem>
<listitem><para>Gives access to Help information</para>
</listitem>
</itemizedlist>
<para>From the FailSafe Cluster View, the user can click on any item to display
key information about it. The items that can be viewed in this way are the
following:</para>
<itemizedlist>
<listitem><para>Clusters</para>
</listitem>
<listitem><para>Cluster Nodes</para>
</listitem>
<listitem><para>Resource Types</para>
</listitem>
<listitem><para>Resources</para>
</listitem>
<listitem><para>Resource Groups</para>
</listitem>
<listitem><para>Failover Policies</para>
</listitem>
</itemizedlist>
</sect2>
<sect2 id="fs-taskmanoverview" role="fs-taskmanoverview">
<title>The FailSafe Manager</title>
<para><indexterm id="ITadmintools-4"><primary>FailSafe Manager</primary><secondary>
overview</secondary></indexterm>The FailSafe Manager provides access to the
tasks that help you set up and administer your highly available cluster. The
FailSafe Manager also provides access to the FailSafe Guided Configuration
tasksets.</para>
<itemizedlist>
<listitem><para>Tasksets consist of a group of tasks collected together to
accomplish a larger goal. For example, &ldquo;Set Up a New Cluster&rdquo;
steps you through the process for creating a new cluster and allows you to
launch the necessary tasks by simply clicking their titles.</para>
</listitem>
<listitem><para>FailSafe tasksets let you set up and monitor all the components
of a Linux FailSafe cluster using an easy-to-use graphical user interface.
</para>
</listitem>
</itemizedlist>
</sect2>
<sect2 id="LE35303-PARENT">
<title id="LE35303-TITLE">Starting the FailSafe Manager GUI</title>
<para>You can start the FailSafe Manager GUI by launching either the FailSafe
Manager or the FailSafe Cluster View.</para>
<para>To launch the FailSafe Manager, use one of these methods:</para>
<itemizedlist>
<listitem><para>Choose &ldquo;FailSafe Manager&rdquo; from the desktop (KDE
or GNOME) menu.</para>
<comment>KDE menus &mdash;> Applications &mdash;> FailSafe Manager</comment>
<para>You will need to restart the desktop panel after installing Linux FailSafe
to see the FailSafe entry in the appropriate menu. To restart the panel, right-click
(ring-click) on the panel, and select <userinput>restart</userinput>. In order
for this to take effect, the <filename>sysadm_failsafe_client</filename> package
must be installed on the client system.</para>
</listitem>
<listitem><para>Enter the following command line:</para>
<programlisting>% <userinput>/usr/bin/fstask</userinput></programlisting>
</listitem>
<listitem><para>In your Web browser, enter <literal>http://<replaceable>server
</replaceable>/FailSafeManager/</literal> (where  <replaceable>server</replaceable>
is the name of node in the pool or cluster that you want to administer) and
press Enter. At the resulting Web page, click on the shield icon.</para>
<para>You can use this method of launching FailSafe Manager if you want to
administer the Cluster Manager GUI from a non-Linux system. If you are running
the Cluster Manager GUI on a Linux system, the preferred method is to use
the desktop panel menu or <?Pub _nolinebreak><command>/usr/bin/fstask</command><?Pub /_nolinebreak><?Pub Caret>.
</para>
<para>This method of launching FailSafe Manager works only if you have installed
the Java Plug-in, exited all Java processes, restarted your browser, and enabled
Java. If there is a long delay before the shield appears, you can click on
the &ldquo;non plug-in&rdquo; link, but operational glitches may be the result
of running in the browser-specific Java.</para>
</listitem>
</itemizedlist>
<para>To launch the FailSafe Cluster View, use one of these methods<itemizedlist>
<listitem><para>Choose "FailSafe Manager" from the desktop (KDE or GNOME)
menu.  </para>
<para>You must restart the desktop panel after installingLinux FailSafe to
see the FailSafe entry in the appropriate menu. To restart the panel, right-click
(ring-click) on the panel, and select restart. In order for this to take effect,
the <literal>sysadm_failsafe-client</literal> package must be installed on
the client system. </para>
</listitem>
<listitem><para>Enter the following command line:<programlisting>% <userinput>
/usr/bin/fsdetail</userinput></programlisting></para>
</listitem>
</itemizedlist></para>
<para>The Cluster Manager GUI allows you to administer the entire cluster
from a single point of administration. When Linux FailSafe daemons have been
activated in a cluster, you must be sure to connect to a node that is running
all the Linux FailSafe daemons to obtain the correct cluster status. When
Linux FailSafe daemons have not yet been activated in a cluster, you can connect
to any node in the pool.</para>
</sect2>
<sect2 id="LE49425-PARENT">
<title id="LE49425-TITLE">Opening the FailSafe Cluster View window</title>
<para>You can open the FailSafe Cluster View window using either of the following
methods:</para>
<itemizedlist>
<listitem><para>Click the &ldquo;FailSafe Cluster View&ldquo; button at the
bottom of the FailSafe Manager window.</para>
<para>This is the preferred method of opening the FailSafe Cluster View window
if you will have both the FailSafe Manager and the FailSafe Cluster View windows
open at the same time, since it reuses the existing Java process to open the
second window instead of starting a new one, which saves memory usage on the
client.</para>
</listitem>
<listitem><para>Open the FailSafe Cluster View window directly when you start
the FailSafe Manager GUI, as described above in <xref linkend="LE35303-PARENT">.
</para>
</listitem>
</itemizedlist>
</sect2>
<sect2>
<title>Viewing Cluster Item Details</title>
<para>To view the details on any cluster item, use the following procedure:
</para>
<orderedlist>
<listitem><para>Open the FailSafe Cluster View Window.</para>
</listitem>
<listitem><para>Click the name or icon of any item.</para>
</listitem>
</orderedlist>
<para>The configuration and status details will appear in a separate window.
To see the details in the same window, select Options. When you then click
on the Show Details option, the status details will appear in the right side
of the window.</para>
</sect2>
<sect2>
<title>Performing Tasks</title>
<para><indexterm id="ITadmintools-5"><primary>FailSafe Cluster Manager GUI
</primary><secondary>active guides</secondary></indexterm>To perform an individual
task with the FailSafe GUI, do the following:</para>
<orderedlist>
<listitem><para>Click the name of a category in the left-hand column of the
FailSafe Manager window.</para>
<para>A list of individual tasksets and taskset topics appears in the right-hand
column.</para>
</listitem>
<listitem><para>Click the title of a task in the right-hand column.</para>
<para>The task window appears.</para>
<note>
<para>You can click any blue text to get more information about that concept
or input field.</para>
</note>
</listitem>
<listitem><para>Enter information in the appropriate fields and click <interface
class="BUTTON">OK.</interface> to complete the task. (Some tasks consist of
more than one window; in these cases, click <interface class="BUTTON">Next
</interface> to go to the next window, complete the information there, and
then click <interface class="BUTTON">OK.</interface></para>
<para>A dialog box appears confirming the successful completion of the task
and displaying additional tasks that you can launch.</para>
</listitem>
<listitem><para>Continue launching tasks as needed.</para>
</listitem>
</orderedlist>
</sect2>
<sect2>
<title>Using the Linux FailSafe Tasksets</title>
<para><indexterm id="ITadmintools-6"><primary>Linux FailSafe Cluster Manager
GUI</primary><secondary>tasksets</secondary></indexterm>The FailSafe Manager
GUI also provides tasksets to guide you through the steps necessary to complete
a goal that encompasses several different tasks. Follow these steps to access
the Linux FailSafe tasksets:</para>
<orderedlist>
<listitem><para>Click the Guided Configuration category in the lefthand column
of the FailSafe Manager window.</para>
<para>A list of tasksets appears in the right-hand column.</para>
</listitem>
<listitem><para>Click a taskset in the right-hand column.</para>
<para>A window appears and lists the series of tasks necessary to accomplish
the desired goal.</para>
</listitem>
<listitem><para>Follow the steps shown, launching tasks by clicking them.
</para>
<para>As you click a task, its task window appears. After you complete all
of the tasks listed, you can close the taskset window by double-clicking the
upper left corner of its window or clicking Close if there is a Close button
on the window.</para>
</listitem>
</orderedlist>
</sect2>
</sect1>
<sect1 id="LE15969-PARENT">
<title id="LE15969-TITLE">Using the FailSafe Cluster Manager CLI</title>
<para>This section documents how to perform cluster administrative tasks by
means of the FailSafe Cluster Manager CLI. In order to execute commands with
the FailSafe Cluster Manager CLI, you should be logged in as root.</para>
<para>To use the cluster manager, enter either of the following:</para>
<programlisting># <userinput>/usr/lib/failsafe/bin/cluster_mgr</userinput></programlisting>
<para>or</para>
<programlisting># <userinput>/usr/lib/failsafe/bin/cmgr</userinput></programlisting>
<para>After you have entered this command, you should see the following message
and the cluster manager CLI command prompt:</para>
<comment>Do you want it to say&rdquo; Linux FailSafe Cluster Manager&rdquo;?
It currently says:</comment>
<programlisting>Welcome to SGI Cluster Manager Command-Line Interface
cmgr></programlisting>
<para>Once the command prompt displays, you can enter the cluster manager
commands.</para>
<para>At any time, you can enter <filename>?</filename> or <filename>help
</filename> to bring up the CLI help display.</para>
<para>When you are creating or modifying a component of a Linux FailSafe system,
you can enter either of the following commands:</para>
<variablelist>
<varlistentry><term><command>cancel</command></term>
<listitem>
<para>Abort the current mode and discard any changes you have made.</para>
</listitem>
</varlistentry>
<varlistentry><term><command>done</command></term>
<listitem>
<para>Commit the current definitions or modifications and return to the <filename>
cmgr</filename> prompt.</para>
</listitem>
</varlistentry>
</variablelist>
<sect2>
<title>Entering CLI Commands Directly</title>
<para><indexterm id="ITadmintools-7"><primary>FailSafe Cluster Manager CLI
</primary><secondary>-c option</secondary></indexterm> <indexterm id="ITadmintools-8">
<primary>FailSafe Cluster Manager CLI</primary><secondary>command line execution
</secondary></indexterm>There are some Cluster Manager CLI command that you
can execute directly from the command line, without entering <command>cmgr
</command> mode, by using the <command>-c</command> option of the <command>
cluster_mgr</command> command. These commands are <command>show</command>, <command>
delete</command>, <command>admin</command>, <command>install</command>,<command>
&ensp;start</command>, <command>stop</command>, <command>test</command>, <command>
help</command>, and <command>quit</command>. You can execute these commands
directly using the following format:</para>
<programlisting>cluster_mgr -c "<replaceable>command</replaceable>"</programlisting>
<para>For example, you can execute a <command>show clusters </command>CLI
command as follows:</para>
<programlisting>% <userinput>/usr/lib/failsafe/bin/cluster_mgr -c "show clusters"
</userinput></programlisting>
<programlisting>1 Cluster(s) defined
&ensp;       eagan</programlisting>
</sect2>
<sect2>
<title>Invoking the Cluster Manager CLI in Prompt Mode</title>
<para><indexterm id="ITadmintools-9"><primary>FailSafe Cluster Manager CLI
</primary><secondary>-p option</secondary></indexterm> <indexterm id="ITadmintools-10">
<primary>FailSafe Cluster Manager CLI</primary><secondary>prompt mode</secondary>
</indexterm> <indexterm id="ITadmintools-11"><primary>CLI</primary><secondary><emphasis>
See</emphasis> FailSafe Cluster Manager CLI</secondary></indexterm> <indexterm
id="ITadmintools-12"><primary>Cluster Manager CLI</primary><secondary><emphasis>
See</emphasis>  FailSafe Cluster Manager CLI</secondary></indexterm>The Cluster
Manager CLI provides an option which displays prompts for the required inputs
of administration commands that define and modify Linux FailSafe components.
You can run the CLI in prompt mode in either of the following ways:</para>
<itemizedlist>
<listitem><para>Specify a <command>-p</command> option when you enter the <command>
cluster_mgr</command> (or <command>cmgr</command>) command, as in the following
example:</para>
<screen># <userinput>/usr/lib/failsafe/bin/cluster_mgr -p</userinput></screen>
</listitem>
<listitem><para>Execute a <command>set prompting on</command> command after
you have brought up the CLI, as in the following example:</para>
<screen>cmgr> <userinput>set prompting on</userinput></screen>
<para>This method of entering prompt mode allows you to toggle in and out
of prompt mode as you execute individual CLI commands. To get out of prompt
mode while you are running the CLI, enter the following CLI command:</para>
<screen>cmgr> <userinput>set prompting </userinput></screen>
</listitem>
</itemizedlist>
<para>For example, if you are not in the prompt mode of the CLI and you enter
the following command to define a node, you will see a single prompt, as indicated:
</para>
<programlisting>cmgr> <userinput>define node </userinput><replaceable>A</replaceable>
Enter commands, when finished enter either "done" or "cancel"</programlisting>
<para><replaceable>A</replaceable>?</para>
<para>At this prompt, you enter the individual node definition commands in
the following format (for full information on defining nodes, see <xref linkend="LE15937-PARENT">):
</para>
<screen>set hostname to <replaceable>B</replaceable>

set nodeid to <replaceable>C</replaceable>
set sysctrl_type to <replaceable>D</replaceable>
set sysctrl_password to <replaceable>E</replaceable>
set sysctrl_status to <replaceable>F</replaceable>
set sysctrl_owner to <replaceable>G</replaceable>
set sysctrl_device to <replaceable>H</replaceable>
set sysctrl_owner_type to <replaceable>I</replaceable>
add nic <replaceable>J</replaceable></screen>
<para>Then, after you add a network interface, a prompt appears requesting
the parameters for the network interface, which you enter similarly.</para>
<para>If you are running CLI in prompt mode, however, the display appears
as follows (when you provide the appropriate inputs):</para>
<screen>cmgr> <userinput>define node </userinput><replaceable>A</replaceable>

Enter commands, when finished enter either "done" or "cancel"

Node Name [A]? 
Hostname? 
Node ID [0]? 
Sysctrl Type &lt;chalL|msc|mmsc>?<userinput>&ensp;</userinput>
Sysctrl Password [ ]?
Sysctrl Status &lt;enabled|disabled>? 
Sysctrl Owner? 
Sysctrl Device? 
Sysctrl Owner Type &lt;tty> ? 
Number of Controllers [2]? 
Controller IP Address? 
Controller Heartbeat HB (use network for heartbeats) &lt;true|false>? 
Controller (use network for control messages) &lt;true|false>? 
Controller Priority &lt;1,2,...>? </screen>
</sect2>
<sect2>
<title>Using Input Files of CLI Commands</title>
<para><indexterm id="ITadmintools-13"><primary>FailSafe Cluster Manager CLI
</primary><secondary>-f option</secondary></indexterm> <indexterm id="ITadmintools-14">
<primary> FailSafe Cluster Manager CLI</primary><secondary>using input files
</secondary></indexterm>You can execute a series of Cluster Manager CLI commands
by using the <command>-f </command>option of the <command>cluster_mgr</command>
command and specifying an input file:</para>
<programlisting>/usr/lib/failsafe/bin/cluster_mgr -f "<replaceable>input_file
</replaceable>"</programlisting>
<para>The input file must contain Cluster Manager CLI commands and end with
a <command>quit</command> command.</para>
<para>For example, the file <filename>input.file</filename> contains the following:
</para>
<screen>show clusters
show nodes in cluster beta3
quit</screen>
<para>You can execute the following command, which will yield the indicated
output:</para>
<screen>% <userinput>/usr/lib/failsafe/bin/cluster_mgr -f input.file</userinput>

1 Cluster(s) defined
&ensp;       eagan
Cluster eagan has following 2 machine(s)
&ensp;       cm1
&ensp;       cm2</screen>
<para>The <command>cluster_mgr</command> command provides a <command>-i</command>
option to be used with the <command>-f</command> option. This is the &ldquo;ignore&rdquo;
option which indicates that the Cluster Manager should not exit if a command
fails while executing a script.</para>
</sect2>
<sect2 id="LE41514-PARENT">
<title id="LE41514-TITLE">CLI Command Scripts</title>
<para><indexterm id="ITadmintools-15"><primary>command scripts</primary></indexterm> <indexterm
id="ITadmintools-16"><primary>FailSafe Cluster Manager CLI</primary><secondary>
command scripts</secondary></indexterm>You can use the <command>-f</command>
option of the <command>cluster_mgr</command> command to write a script of
Cluster Manager CLI commands that you can execute directly. The script must
contain the following line as the first line of the script.</para>
<screen>#!/usr/lib/failsafe/bin/cluster_mgr -f</screen>
<note>
<para>When you use the <command>-i</command> option of the <command>cluster_mgr
</command> command to indicate that the Cluster Manager should not exit if
a command fails while executing a script, you must use the following syntax
in the first line of the script file:  <command>#!/usr/lib/failsafe/bin/cluster_mgr
-if</command>.  It is not necessary to use the <command>-if</command> syntax
when using the <command>-i</command> option from the command line directly.
</para>
</note>
<para>Each line of the script must be a valid <command>cluster_mgr command 
</command>line, similar to a <filename>here</filename> document. Because the
Cluster Manager CLI will run through commands as if entered interactively,
you must include <command>done</command> and <command>quit</command> lines
to finish a multi-level command and exit out of the Cluster Manager CLI.</para>
<para>There are CLI template files of scripts that you can modify to configure
the different components of your system. These files are located in the  <filename>
/usr/lib/failsafe/cmgr-templates</filename> directory. For information on
CLI templates, see <xref linkend="LE10673-PARENT">.</para>
<para>The following shows an example of a CLI command script <filename>cli.script
</filename>.</para>
<screen>% <userinput>more cli.script</userinput>
#!/usr/lib/failsafe/bin/cluster_mgr -f

show clusters
show nodes in cluster beta3
quit

% <userinput>cli.script</userinput>
1 Cluster(s) defined
&ensp;       eagan
Cluster eagan has following 2 machine(s)
&ensp;       cm1
&ensp;       cm2

%</screen>
<para>For a complete example of a CLI command script that configures a cluster,
see <xref linkend="LE40790-PARENT"> in <xref linkend="LE94219-PARENT">.</para>
</sect2>
<sect2 id="LE10673-PARENT">
<title id="LE10673-TITLE">CLI Template Scripts</title>
<para><indexterm id="ITadmintools-17"><primary>template files</primary></indexterm> <indexterm
id="ITadmintools-18"><primary> FailSafe Cluster Manager CLI</primary><secondary>
template files</secondary></indexterm> <indexterm id="ITadmintools-19"><primary>
cmgr-templates directory</primary></indexterm>Template files of CLI scripts
that you can modify to configure the different components of your system are
located in the <filename>/usr/lib/failsafe/cmgr-templates</filename> directory.
</para>
<para>Each template file contains list of <command>cluster_mgr</command> 
commands to create a particular object, as well as comments describing each
field.  The template also provides default values for optional fields.</para>
<para>The <filename>/usr/lib/failsafe/cmgr-templates</filename> directory
contains following templates:</para>
<table frame="topbot">
<title>Available Templates</title>
<tgroup cols="2" colsep="0" rowsep="0">
<colspec colwidth="243*">
<colspec colwidth="243*">
<tbody>
<row rowsep="1">
<entry align="left" valign="top"><para><emphasis>File name</emphasis></para></entry>
<entry align="left" valign="top"><para><emphasis>Description</emphasis></para></entry>
</row>
<row>
<entry align="left" valign="top"><para><filename>cmgr-create-cluster</filename></para></entry>
<entry align="left" valign="top"><para>Creation of a cluster</para></entry>
</row>
<row>
<entry align="left" valign="top"><para><filename>cmgr-create-failover_policy
</filename></para></entry>
<entry align="left" valign="top"><para>Creation of failover policy</para></entry>
</row>
<row>
<entry align="left" valign="top"><para><filename>cmgr-create-node</filename></para></entry>
<entry align="left" valign="top"><para>Creation of node</para></entry>
</row>
<row>
<entry align="left" valign="top"><para><filename>cmgr-create-resource_group
</filename></para></entry>
<entry align="left" valign="top"><para>Creation of Resource Group</para></entry>
</row>
<row>
<entry align="left" valign="top"><para><filename>cmgr-create-resource_type
</filename></para></entry>
<entry align="left" valign="top"><para>Creation of resource type</para></entry>
</row>
<row>
<entry align="left" valign="top"><para><filename>cmgr-create-resource-<replaceable>
resource type</replaceable></filename></para></entry>
<entry align="left" valign="top"><para>CLI script template for creation of
resource of type <replaceable>resource type</replaceable></para></entry>
</row>
</tbody>
</tgroup>
</table>
<para>To create a Linux FailSafe configuration, you can concatenate multiple
templates into one file and execute the resulting CLI command script.</para>
<note>
<para>If you concatenate information from multiple template scripts to prepare
your cluster configuration, you must remove the <command>quit</command> at
the end of each template script, except for the final <command>quit</command>.
A <filename>cluster_mgr</filename> script must have only one <command>quit
</command> line.</para>
</note>
<para>For example: For a 3 node configuration with an NFS resource group containing
1 volume, 1 filesystem, 1 IP address and 1 NFS resource, you would concatenate
the following files, removing the <command>quit</command> at the end of each
template script except the last one:</para>
<itemizedlist>
<listitem><para>3 copies of the <filename>cmgr-create-node</filename> file
</para>
</listitem>
<listitem><para>1 copy of the <filename>cmgr-create-cluster</filename> file
</para>
</listitem>
<listitem><para>1 copy of the <filename>cmgr-create-failover_policy</filename>
file</para>
</listitem>
<listitem><para>1 copy of the <filename>cmgr-create-resource_group</filename>
file</para>
</listitem>
<listitem><para>1 copy of the <filename>cmgr-create-resource-volume</filename>
file</para>
</listitem>
<listitem><para>1 copy of the <filename>cmgr-create-resource-filesystem</filename>
file</para>
</listitem>
<listitem><para>1 copy of the <filename>cmgr-create-resource-IP_address</filename>
file</para>
</listitem>
<listitem><para>1 copy of the <filename>cmgr-create-resource-NFS</filename>
file</para>
</listitem>
</itemizedlist>
</sect2>
<sect2>
<title>Invoking a Shell from within CLI</title>
<para><indexterm id="ITadmintools-20"><primary>FailSafe Cluster Manager CLI
</primary><secondary>invoking a shell</secondary></indexterm> You can invoke
a shell from within the Cluster Manager CLI. Enter the following command to
invoke a shell:</para>
<screen>cmgr> <userinput>sh</userinput></screen>
<para>To exit the shell and to return to the CLI, enter <literal>exit</literal>
at the shell prompt.</para>
</sect2>
</sect1>
</chapter>
<?Pub *0000030509>