LDP/LDP/guide/docbook/EVMSUG/selectact.xml

467 lines
12 KiB
XML

<chapter id="selectact"><title>Selectively activating volumes and objects</title>
<para>This chapter discusses selective activation and
deactivation of EVMS volumes and objects.
</para>
<sect1 id="initialactivation"><title>Initial activation using /etc/evms.conf</title>
<para>
There is a section in the EVMS configuration file,
<filename>/etc/etc/evms.conf</filename>, named "activate."
This section has two entries: "include" and "exclude." The
"include" entry lists the volumes and objects that should be activated.
The "exclude" entry lists the volumes and objects that should not be
activated.
</para>
<para>
Names in either of the entries can be specified using "*", "?", and
"[...]" notation. For example, the following entry will activate
all the volumes:
</para>
<programlisting>
include = [/dev/evms/*]
</programlisting>
<para>
The next entry specifies that objects sda5 and sda7 not be activated:
</para>
<programlisting>
exclude = [ sda[57] ]
</programlisting>
<para>When EVMS is started, it first reads the include entry and builds a list
of the volumes and objects that it should activate. It then reads the
exclude entry and removes from the list any names found in the exclude list.
For example, an activation section that activates all of the volumes
except <filename>/dev/evms/temp</filename> looks like this:
</para>
<programlisting>
activate {
include = [/dev/evms/*]
exclude = [/dev/evms/temp]
}
</programlisting>
<para>
If <filename>/etc/evms.conf</filename> does not contain an activate
section, the default behavior is to activate everything. This
behavior is consistent with versions of EVMS prior to 2.4.
</para>
<para>
Initial activation via <filename>/etc/evms.conf</filename> does not
deactivate any volumes or objects. It only determines which ones
should be active.
</para>
</sect1>
<sect1><title>Activating and deactivating volumes and objects</title>
<para>
The EVMS user interfaces offer the ability to activate or deactivate
a particular volume or object. The volume or object will be
activated or deactivated when the changes are saved.
</para>
<sect2><title>Activation</title>
<para>
You can activate inactive volumes and objects using the various EVMS
user interfaces.
</para>
<note><title>Note</title>
<para>
EVMS does not currently update the EVMS configuration file
(<filename>/etc/evms.conf</filename>) when volumes and objects are
activated. If you activate a volume or object that is not initially
activated and do not make the corresponding change in
<filename>/etc/evms.conf</filename>, the volume or object will not be
activated the next time the system is booted and you run
<command>evms_activate</command> or one of the user interfaces.
</para>
</note>
<sect3><title>Using the EVMS GUI</title>
<para>To activate volumes or objects with the GUI, follow these steps:
<orderedlist>
<listitem>
<para>Select
<menuchoice>
<guimenu>Actions</guimenu>
<guimenuitem>Activation</guimenuitem>
<guimenuitem>Activate...</guimenuitem>
</menuchoice>
</para>
</listitem>
<listitem>
<para>Select the volume(s) and object(s) you want to activate.
</para>
</listitem>
<listitem><para>
Click <guibutton>Activate</guibutton>.
</para></listitem>
<listitem>
<para>Click <guibutton>Save</guibutton> to save the changes and
activate the volume(s) and object(s).
</para>
</listitem>
</orderedlist>
</para>
</sect3>
<sect3><title>Using the EVMS GUI context-sensitive menu</title>
<para>To activate with the GUI context-sensitive menu, follow these steps:
<orderedlist>
<listitem>
<para>
Right click the volume or object you want to activate.
</para>
</listitem>
<listitem><para>
Click "Activate."
</para>
</listitem>
<listitem><para>
Click <guibutton>Activate</guibutton>.
</para></listitem>
<listitem>
<para>Click <guibutton>Save</guibutton> to save the changes and
activate the volume(s) and object(s).
</para>
</listitem>
</orderedlist>
</para>
</sect3>
<sect3>
<title>Using Ncurses</title>
<para>To activate a volume or object with Ncurses, follow these steps:
<orderedlist>
<listitem>
<para>Select
<menuchoice>
<guimenu>Actions</guimenu>
<guimenuitem>Activation</guimenuitem>
<guimenuitem>Activate...</guimenuitem>
</menuchoice>
</para>
</listitem>
<listitem>
<para>Select the volume(s) and object(s) you want to activate.
</para>
</listitem>
<listitem><para>
Select <guibutton>Activate</guibutton>.
</para></listitem>
<listitem>
<para>Select
<menuchoice>
<guimenu>Actions</guimenu>
<guimenuitem>Save</guimenuitem>
</menuchoice>
to save the changes and
activate the volume(s) and object(s).
</para>
</listitem>
</orderedlist>
</para>
</sect3>
<sect3><title>Using the Ncurses context-sensitive menu</title>
<para>To enable activation on a volume or object with the
Ncurses context-sensitive menu, follow these steps:
<orderedlist>
<listitem>
<para>
Highlight the volume or object you want to activate and press
<keycap>Enter</keycap>.
</para>
</listitem>
<listitem><para>
Select "Activate."
</para>
</listitem>
<listitem><para>
Select <guibutton>Activate</guibutton>.
</para></listitem>
<listitem>
<para>Select
<menuchoice>
<guimenu>Actions</guimenu>
<guimenuitem>Save</guimenuitem>
</menuchoice>
to save the changes and
activate the volume(s) and object(s).
</para>
</listitem>
</orderedlist>
</para>
</sect3>
<sect3><title>Using the CLI</title>
<para>To activate a volume or object with the CLI,
issue the following command to the CLI (where "name" is the name of
the volume or object you want to activate):</para>
<programlisting>
Activate:name
</programlisting>
</sect3>
</sect2>
<sect2><title>Deactivation</title>
<para>
You can deactivate active volumes and objects using the various EVMS
user interfaces.
</para>
<note><title>Note</title>
<para>
EVMS does not currently update the EVMS configuration file
(<filename>/etc/evms.conf</filename>) when a volume or object is
deactivated.
If you deactivate a volume or object that is initially activated and
do not make the corresponding change in <filename>/etc/evms.conf</filename>,
then the volume or object will be activated the next time you run
<command>evms_activate</command> or one of the user interfaces.
</para>
</note>
<sect3><title>Using the EVMS GUI</title>
<para>To deactivate a volume or object with the GUI, follow these steps:
<orderedlist>
<listitem>
<para>Select
<menuchoice>
<guimenu>Actions</guimenu>
<guimenuitem>Activation</guimenuitem>
<guimenuitem>Deactivate...</guimenuitem>
</menuchoice>
</para>
</listitem>
<listitem>
<para>Select the volume(s) and object(s) you want to deactivate.
</para>
</listitem>
<listitem><para>
Click <guibutton>Deactivate</guibutton>.
</para></listitem>
<listitem>
<para>Click <guibutton>Save</guibutton> to save the changes and
activate the volume(s) and object(s).
</para>
</listitem>
</orderedlist>
</para>
</sect3>
<sect3><title>Using the EVMS GUI context-sensitive menu</title>
<para>To deactivate a volume or object with the GUI
context-sensitive menu, follow these steps:
<orderedlist>
<listitem>
<para>
Right click the volume or object you want to deactivate.
</para>
</listitem>
<listitem><para>
Click "Deactivate."
</para>
</listitem>
<listitem><para>
Click <guibutton>Deactivate</guibutton>.
</para></listitem>
<listitem>
<para>Click <guibutton>Save</guibutton> to save the changes and
activate the volume(s) and object(s).
</para>
</listitem>
</orderedlist>
</para>
</sect3>
<sect3><title>Using Ncurses</title>
<para>To deactive a volume or object with Ncurses, follow these steps:
<orderedlist>
<listitem>
<para>Select
<menuchoice>
<guimenu>Actions</guimenu>
<guimenuitem>Activation</guimenuitem>
<guimenuitem>Deactivate...</guimenuitem>
</menuchoice>
</para>
</listitem>
<listitem>
<para>Select the volume(s) and object(s) you want to deactivate.
</para>
</listitem>
<listitem><para>
Select <guibutton>Deactivate</guibutton>.
</para></listitem>
<listitem>
<para>Select
<menuchoice>
<guimenu>Actions</guimenu>
<guimenuitem>Save</guimenuitem>
</menuchoice>
to save the changes and
deactivate the volume(s) and object(s).
</para>
</listitem>
</orderedlist>
</para>
</sect3>
<sect3><title>Using the Ncurses context-sensitive menu</title>
<para>To deactivate a volume or object with the
Ncurses context-sensitive menu, follow these steps:
<orderedlist>
<listitem>
<para>
Highlight the volume or object you want to deactivate and press
<keycap>Enter</keycap>.
</para>
</listitem>
<listitem><para>
Select "Deactivate."
</para>
</listitem>
<listitem><para>
Select <guibutton>Deactivate</guibutton>.
</para></listitem>
<listitem>
<para>Select
<menuchoice>
<guimenu>Actions</guimenu>
<guimenuitem>Save</guimenuitem>
</menuchoice>
to save the changes and
deactivate the volume(s) and object(s).
</para>
</listitem>
</orderedlist>
</para>
</sect3>
<sect3><title>Using the CLI</title>
<para>To deactivate a volume or object with the CLI,
issue the following command to the CLI (where "name" is the name of
the volume or object you want to deactivate):</para>
<programlisting>
Deactivate:name
</programlisting>
</sect3></sect2>
<sect2><title>Activation and deactivation dependencies</title>
<para>
In order for a volume or object to be active, all of its children
must be active. When you activate a volume or object, EVMS will
activate all the objects that the volume or object comprises.
</para>
<para>
Similarly, in order for an object to be inactive, all of its
parents cannot be activate. When you deactivate an object, EVMS
will deactivate all of the objects and volumes that are built from
that object.
</para>
<sect3><title>Dependencies during initial activation</title>
<para>
As discussed in <xref linkend="initialactivation"></xref>,
when EVMS starts, it builds an initial list of
volumes and objects whose names match the "include" entry in the
activation section of <filename>/etc/evms.conf</filename>. Because those
volumes and objects cannot be active unless the objects they comprise are
active, EVMS then adds to the list all the objects that are comprised by
the volumes and objects that were found in the initial match.
</para>
<para>
EVMS then removes from the list the volumes and objects whose names
match the "exclude" entry in the activation section of
<filename>/etc/evms.conf</filename>. Because any volumes or objects
that are built from the excluded ones cannot be active, EVMS removes
them from the list as well.
</para>
<para>
The enforcement of the dependencies can result in behavior that is not
immediately apparent.
Let's say, for example, that segment hda7 is made into volume
<filename>/dev/evms/home</filename>. and the activation section in
<filename>/etc/evms.conf</filename> looks like this:
</para>
<programlisting>
activate {
include = [*]
exclude = [hda*]
}
</programlisting>
<para>
When EVMS builds the list of volumes and objects to activate,
everything is included. EVMS next removes all objects whose names
start with "hda." hda7 will be removed from the list.
Next, because volume <filename>/dev/evms/home</filename> is built
from hda7, it will also be removed from the list and will not be
activated.
So, although volume <filename>/dev/evms/home</filename> is not
explicitly in the exclude list, it is not activated because it
depends on an object that will not be activated.
</para>
</sect3>
<sect3><title>Dependencies for compatibility volumes</title>
<para>
Compatibility volumes are made directly from the volume's object.
That is, the device node for the volume points directly to the device
for the volume's object.
Because a compatibility volume is inseparable from its object, a
compatibility volume itself cannot be deactivated.
To deactivate a compatibility volume you must deactivate the volume's object.
</para>
<para>
Similarly, if a compatibility volume and its object are not active
and you activate the volume's object, the compatibility volume will be
active as well.
</para>
</sect3>
</sect2>
</sect1>
</chapter>