LDP/LDP/guide/docbook/EVMSUG/deleterecurs-ug.xml

166 lines
7.1 KiB
XML

<chapter id="deleterecurs"><title>Deleting objects</title>
<para>This chapter tells how to delete EVMS objects through the delete and
delete recursive operations.</para>
<sect1 id="howtodel"><title>How to delete objects: delete and delete recursive</title>
<para>There are two ways in EVMS that you can destroy objects that you no longer want: Delete and Delete Recursive. The Delete option destroys only the specific object you specify. The Delete Recursive option destroys the object you specify and its underlying objects, down to the container, if one exists, or else down to the disk. In order for an object to be deleted, it must not be mounted. EVMS verifies that the object you are attempting to delete is not mounted and does not perform the deletion if the object is mounted.</para>
</sect1>
<sect1 id="examdelrecur"><title>Example: perform a delete recursive operation</title>
<para> The following example shows how to destroy a volume and the objects below it with the EVMS GUI, Ncurses, and CLI interfaces.</para>
<blockquote><example><title>Destroy a volume and the region and container below it</title>
<para>This example uses the delete recursive operation to destroy volume <filename>/dev/evms/Sample Volume</filename> and the region and container below it. Volume <filename>/dev/evms/Sample Volume</filename> is the volume that was created in earlier. Although we could also use the delete option on each of the objects, the delete recursive option takes fewer steps. Note that because we intend to delete the container as well as the volume, the operation needs to be performed in two steps: one to delete the volume and its contents, and one to delete the container and its contents.
</para></example></blockquote>
<sect2 id="mkfsgui"><title>Using the EVMS GUI</title>
<para>Follow these steps to delete the volume and the container with the EVMS GUI:
<orderedlist>
<listitem><para>Select <menuchoice><guimenu>Actions</guimenu>
<guimenuitem>Delete</guimenuitem>
<guimenuitem>Volume</guimenuitem></menuchoice>.
</para></listitem>
<listitem><para>Select volume <guimenuitem>/dev/evms/Sample Volume</guimenuitem>
from the list.
</para></listitem>
<listitem><para>Click <guibutton>Recursive Delete</guibutton>. This step deletes the volume
and the region <filename>lvm/Sample Container/Sample Region</filename>. If you want to
keep the
underlying pieces or want to delete each piece separately, you would click
<guibutton>Delete</guibutton> instead of <guibutton>Delete Recursive</guibutton>.
</para></listitem>
<listitem><para>Assuming you chose Delete Recursive (if not, delete the region before
continuing with these steps), select <menuchoice><guimenu>Actions</guimenu>
<guimenuitem>Delete</guimenuitem>
<guimenuitem>Container</guimenuitem></menuchoice>.
</para></listitem>
<listitem><para>Select container <guimenuitem>lvm/Sample Container</guimenuitem> from the list.
</para></listitem>
<listitem><para>Click <guibutton>Recursive Delete</guibutton> to destroy the container and anything
under it. Alternatively, click <guibutton>Delete</guibutton> to destroy only the container (if you built the container on
disks as in the example, either command has the same effect).
</para></listitem>
</orderedlist>
</para>
<para>Alternatively, you can perform some of the volume deletion steps with the GUI context
sensitive menu:</para>
<orderedlist>
<listitem><para>From the <guimenuitem>Volumes</guimenuitem> tab, right click
<filename>/dev/evms/Sample Volume</filename>.</para></listitem>
<listitem><para>Click <guimenuitem>Delete...</guimenuitem></para></listitem>
<listitem><para>Continue with the operation beginning with step 3 of the
GUI instructions.</para></listitem>
</orderedlist>
</sect2>
<!-- Ncurses-->
<sect2 id="mkfsncurses"><title>Using Ncurses</title>
<para>Follow these steps to delete the volume and the container with Ncurses:
<orderedlist>
<listitem><para>Select <menuchoice><guimenu>Actions</guimenu>
<guimenuitem>Delete</guimenuitem><guimenuitem>Volume</guimenuitem></menuchoice>.
</para></listitem>
<listitem><para>Select volume
<guimenuitem>/dev/evms/Sample Volume</guimenuitem> from the list.
</para></listitem>
<listitem><para>Activate
<guibutton>Delete Volume Recursively</guibutton>.
This step deletes the volume and the region
<filename>lvm/Sample Container/Sample Region</filename>. If you want to keep the
underlying pieces or want to delete each piece separately, activate
<guibutton>Delete</guibutton> instead of <guibutton>Delete Recursive</guibutton>.
</para></listitem>
<listitem><para>Assuming you chose <guimenuitem>Delete Volume Recursively</guimenuitem>
(if not, delete the region before continuing with
these steps), select <menuchoice><guimenu>Actions</guimenu>
<guimenuitem>Delete</guimenuitem><guimenuitem>Container</guimenuitem></menuchoice>.
</para></listitem>
<listitem><para>Select container
<guimenuitem>lvm/Sample Container</guimenuitem> from the list.
</para></listitem>
<listitem><para>Click
<guimenuitem>Recursive Delete</guimenuitem> to destroy the container and
everything under it. Alternatively, activate <guibutton>Delete</guibutton> to delete
only the container (if you built the container on disks as in the
example, either command has the same effect).</para></listitem>
<listitem><para>Press <keycap>Enter</keycap>.
</para></listitem>
</orderedlist>
</para>
<para>Alternatively, you can perform some of the volume deletion steps with the
context sensitive menu:</para>
<orderedlist>
<listitem><para>From the Volumes view, press <keycap>Enter</keycap> on <guimenuitem>/dev/evms/Sample Volume</guimenuitem>.</para>
</listitem>
<listitem><para>Activate <guibutton>Delete</guibutton>.</para>
</listitem>
<listitem><para>Continue with the operation beginning with step 3 of the Ncurses instructions.</para>
</listitem>
</orderedlist>
</sect2>
<!-- CLI-->
<sect2 id="deleterecurcli"><title>Using the CLI</title>
<para>Use the
<command>delete</command> and <command>delete recursive</command>
commands to destroy EVMS objects.
Specify the command name followed by a colon, and then specify the
volume, object, or container name. For example:
<orderedlist>
<listitem><para>Enter this command to perform the delete recursive
operation:</para>
<programlisting>delete recursive: "/dev/evms/Sample Volume"</programlisting>
<para>This step deletes the volume and the region
<filename>/lvm/Sample Container/Sample Region</filename>. If you wanted to keep the
underlying pieces or wanted to delete each piece separately, use the <command>delete</command> command, as follows:</para>
<programlisting>delete: "/dev/evms/Sample Volume"</programlisting>
</listitem>
<listitem><para>Assuming you chose <guimenuitem>Delete Volume Recursively</guimenuitem> (if not, delete the region before
continuing with these steps) enter the following to destroy the container and everything under it:</para>
<programlisting>delete recursive: "lvm/Sample Container"</programlisting>
<para>To destroy only the container, enter the following:</para>
<programlisting>delete: "lvm/Sample Container"</programlisting>
</listitem>
</orderedlist>
</para>
</sect2>
</sect1>
</chapter>