mirror of https://github.com/tLDP/LDP
341 lines
12 KiB
XML
341 lines
12 KiB
XML
|
|
|
|
|
|
<chapter id="expandshrink"><title>Expanding and shrinking volumes</title>
|
|
|
|
<para>This chapter tells how to expand and shrink EVMS volumes with the EVMS
|
|
GUI, Ncurses, and CLI interfaces. Note that you can also expand and shrink compatibility volumes and EVMS objects.</para>
|
|
|
|
<sect1 id="whyexpandshrink"><title>Why expand and shrink volumes?</title>
|
|
<para>Expanding and shrinking volumes are common volume operations on most systems. For example, it might be necessary to shrink a particular volume to create
|
|
free space for another volume to expand into or to create a new volume.</para>
|
|
|
|
<para>EVMS simplifies the process for expanding and shrinking volumes, and
|
|
protects the integrity of your data, by coordinating expand and shrink
|
|
operations with the volume's file system. For example, when shrinking a
|
|
volume, EVMS first shrinks the underlying file system appropriately to protect
|
|
the data. When expanding a volume, EVMS expands the file system automatically
|
|
when new space becomes available.</para>
|
|
|
|
<para>Not all file system interface modules (FSIM) types supported by EVMS
|
|
allow shrink and expand operations, and some only perform the operations when
|
|
the file system is mounted ("online"). The following table details the
|
|
shrink and expand options available for each type of FSIM.
|
|
</para>
|
|
<para><table><title>FSIM support for expand and shrink operations</title><tgroup cols="3"><colspec colnum="1" colname="C1"/><colspec colnum="2" colname="C2"/><colspec colnum="3" colname="C3"/>
|
|
<thead><row><entry>FSIM type</entry>
|
|
<entry>Shrinks</entry>
|
|
<entry>Expands</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody>
|
|
<row>
|
|
<entry>JFS</entry>
|
|
<entry>No</entry>
|
|
<entry>Online only</entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry>XFS</entry>
|
|
<entry>No</entry>
|
|
<entry>Online only</entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry>ReiserFS</entry>
|
|
<entry>Offline only</entry>
|
|
<entry>Offline and online</entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry>ext2/3</entry>
|
|
<entry>Offline only</entry>
|
|
<entry>Offline only</entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry>SWAPFS</entry>
|
|
<entry>Offline only</entry>
|
|
<entry>Offline only</entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry>OpenGFS</entry>
|
|
<entry>No</entry>
|
|
<entry>Online only</entry>
|
|
</row>
|
|
|
|
<row>
|
|
<entry>NTFS</entry>
|
|
<entry>Offline only</entry>
|
|
<entry>Offline only</entry>
|
|
</row>
|
|
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
|
|
</para>
|
|
|
|
<para>You can perform all of the supported shrink and expand operations with each of the EVMS user interfaces.</para></sect1>
|
|
|
|
<sect1 id="exshrink"><title>Example: shrink a volume</title>
|
|
<para>This section tells how to shrink a compatibility volume by 500 MB.</para>
|
|
|
|
<blockquote><example><title>Shrink a volume</title>
|
|
<para>Shrink the volume
|
|
<filename>/dev/evms/lvm/Sample Container/Sample Region</filename>, which
|
|
is the compatibility volume that was created in the chapter entitled
|
|
"Creating Volumes," by 500 MB.</para>
|
|
</example></blockquote>
|
|
|
|
<sect2 id="shrinkgui"><title>Using the EVMS GUI</title>
|
|
<para>Follow these steps to shrink the volume with the EVMS GUI:
|
|
|
|
<orderedlist>
|
|
<listitem><para>Select <menuchoice><guimenu>Actions</guimenu><guimenuitem>Shrink</guimenuitem><guimenuitem>Volume...</guimenuitem></menuchoice></para></listitem>
|
|
|
|
<listitem><para>Select <menuchoice>
|
|
<guimenu>/dev/evms/lvm/Sample Container/Sample Region</guimenu> </menuchoice>
|
|
from the list of volumes.
|
|
</para></listitem>
|
|
|
|
<listitem><para>Click <guibutton>Next</guibutton>.
|
|
</para></listitem>
|
|
|
|
<listitem><para>Select <menuchoice><guimenu>/lvm/Sample Container/Sample Region</guimenu></menuchoice> from the list of volumes.
|
|
</para></listitem>
|
|
|
|
<listitem><para>Click <guibutton>Next</guibutton>.
|
|
</para></listitem>
|
|
|
|
|
|
<listitem><para>Enter <userinput>500MB</userinput> in the "Shrink by Size" field.</para></listitem>
|
|
|
|
<listitem><para>Click <guibutton>Shrink</guibutton>.</para></listitem>
|
|
|
|
</orderedlist>
|
|
</para>
|
|
<para>Alternatively, you can perform some of the steps to shrink the volume with the GUI
|
|
context sensitive menu:</para>
|
|
|
|
<orderedlist><listitem><para>From the <guimenuitem>Volumes</guimenuitem> tab, right click
|
|
<filename>/dev/evms/lvm/Sample Container/Sample Region</filename></para></listitem>
|
|
<listitem><para>Click <guimenuitem>Shrink...</guimenuitem></para></listitem>
|
|
<listitem><para>Continue the operation beginning with step 3 of the GUI
|
|
instructions.</para></listitem>
|
|
|
|
</orderedlist>
|
|
</sect2>
|
|
|
|
|
|
<!-- Ncurses-->
|
|
<sect2 id="shrinkncurses"><title>Using Ncurses</title>
|
|
<para>Follow these steps to shrink a volume with Ncurses:
|
|
|
|
<orderedlist>
|
|
<listitem><para>Select <menuchoice><guimenu>Actions</guimenu><guimenuitem>Shrink</guimenuitem>
|
|
<guimenuitem>Volume</guimenuitem></menuchoice>.
|
|
</para></listitem>
|
|
|
|
<listitem><para>Select
|
|
<guimenuitem>/dev/evms/lvm/Sample Container/Sample Region</guimenuitem> from the
|
|
list of volumes.
|
|
</para></listitem>
|
|
|
|
<listitem><para>Activate <guibutton>Next</guibutton>.
|
|
</para></listitem>
|
|
|
|
<listitem><para>Select
|
|
<guimenuitem>lvm/Sample Container/Sample Region</guimenuitem> from the
|
|
shrink point selection list.
|
|
</para></listitem>
|
|
|
|
<listitem><para>Activate <guibutton>Next</guibutton>.
|
|
</para></listitem>
|
|
|
|
<listitem><para>Scroll down using the <keycap>down</keycap> arrow until
|
|
<guimenuitem>Shrink by Size</guimenuitem> is highlighted.
|
|
</para></listitem>
|
|
|
|
|
|
<listitem><para>Press <keycap>spacebar</keycap>.
|
|
</para></listitem>
|
|
|
|
<listitem><para>Press <keycap>Enter</keycap>.
|
|
</para></listitem>
|
|
|
|
|
|
<listitem><para>At the "::" prompt enter <userinput>500MB</userinput>.
|
|
</para></listitem>
|
|
|
|
<listitem><para>Press <keycap>Enter</keycap>.
|
|
</para></listitem>
|
|
<listitem><para>Activate <guibutton>Shrink</guibutton>.
|
|
</para></listitem>
|
|
|
|
</orderedlist>
|
|
</para>
|
|
|
|
<para>
|
|
Alternatively, you can perform some of the steps to shrink the volume with the
|
|
context sensitive menu:</para>
|
|
|
|
<orderedlist>
|
|
<listitem><para>From the Volumes view, press <keycap>Enter</keycap> on <filename>/dev/evms/lvm/Sample Container/Sample Region</filename>.</para>
|
|
</listitem>
|
|
<listitem><para>Activate the <guimenuitem>Shrink</guimenuitem> menu item.</para>
|
|
</listitem>
|
|
<listitem><para>Continue the operation beginning with step 3 of the Ncurses instructions.</para>
|
|
</listitem>
|
|
</orderedlist>
|
|
</sect2>
|
|
|
|
<!-- CLI-->
|
|
<sect2 id="shrinkcli"><title>Using the CLI</title>
|
|
|
|
|
|
<para>The <command>shrink</command> command takes a shrink point followed by an optional name
|
|
value pair or an optional shrink object. To find the shrink point, use the <command>query</command> command with the shrink points filter on the object or volume you plan to shrink. For example:</para>
|
|
|
|
<programlisting>query: shrink points, "/dev/evms/lvm/Sample Container/Sample Region"</programlisting>
|
|
|
|
<para>Use a list options filter on the object of the shrink point to determine the name-value pair to use, as follows:</para>
|
|
|
|
<programlisting>query: objects, object="lvm/Sample Container/Sample Region", list options</programlisting>
|
|
<para>With the option information that is returned, you can construct the command, as follows:</para>
|
|
|
|
<programlisting>shrink: "lvm/Sample Container/Sample Region", remove_size=500MB</programlisting>
|
|
|
|
</sect2>
|
|
|
|
</sect1>
|
|
|
|
<sect1 id="mkfs"><title>Example: expand a volume</title>
|
|
<para>This section tells how to expand a volume a compatibility volume by 500 MB.</para>
|
|
<blockquote><example><title>Expand a volume</title>
|
|
<para>Expand the volume <filename>/dev/evms/lvm/Sample Container/Sample Region</filename>, which is the compatibility volume that was created in the chapter entitled "Creating Volumes," by 500 MB.
|
|
</para></example></blockquote>
|
|
|
|
<sect2 id="expandgui"><title>Using the EVMS GUI</title>
|
|
<para>Follow these steps to expand the volume with the EVMS GUI:
|
|
|
|
<orderedlist>
|
|
<listitem><para>Select
|
|
<menuchoice><guimenu>Actions</guimenu><guimenuitem>Expand</guimenuitem>
|
|
<guimenuitem>Volume...</guimenuitem></menuchoice>
|
|
</para></listitem>
|
|
|
|
<listitem><para>Select
|
|
<menuchoice><guimenu>/dev/evms/lvm/Sample Container/Sample Region</guimenu></menuchoice>
|
|
from the list of volumes.
|
|
</para></listitem>
|
|
|
|
<listitem><para>Click <guibutton>Next</guibutton>.
|
|
</para></listitem>
|
|
|
|
|
|
<listitem><para>Select <menuchoice><guimenu>lvm/Sample Container/Sample Region</guimenu></menuchoice> from the list as the expand point.
|
|
</para></listitem>
|
|
|
|
<listitem><para>Click <guibutton>Next</guibutton>.
|
|
</para></listitem>
|
|
|
|
<listitem><para>Enter <userinput>500MB</userinput> in the "Additional Size" field.</para></listitem>
|
|
|
|
<listitem><para>Click <guibutton>Expand.</guibutton></para></listitem></orderedlist>
|
|
</para>
|
|
|
|
<para>Alternatively, you can perform some of the steps to expand the volume with the GUI
|
|
context sensitive menu:</para>
|
|
|
|
<orderedlist>
|
|
<listitem><para>From the <guimenuitem>Volumes</guimenuitem> tab, right click
|
|
<filename>/dev/evms/lvm/Sample Container/Sample Region</filename>.</para></listitem>
|
|
<listitem><para>Click <guimenuitem>Expand...</guimenuitem></para></listitem>
|
|
|
|
<listitem><para>Continue the operation to expand the volume beginning with step 3
|
|
of the GUI instructions.</para></listitem>
|
|
|
|
</orderedlist>
|
|
</sect2>
|
|
|
|
|
|
<!-- Ncurses-->
|
|
<sect2 id="expandncurses"><title>Using Ncurses</title>
|
|
<para>Follow these steps to expand a volume with Ncurses:
|
|
|
|
<orderedlist>
|
|
<listitem><para>Select <menuchoice><guimenu>Actions</guimenu><guimenuitem>Expand</guimenuitem><guimenuitem>Volume</guimenuitem></menuchoice>.
|
|
</para></listitem>
|
|
|
|
<listitem><para>Select
|
|
<guimenuitem>/dev/evms/lvm/Sample Container/Sample Region</guimenuitem> from the
|
|
list of volumes.
|
|
</para></listitem>
|
|
|
|
<listitem><para>Activate <guibutton>Next</guibutton>.
|
|
</para></listitem>
|
|
|
|
|
|
<listitem><para>Select <guimenuitem>lvm/Sample Container/Sample Region</guimenuitem> from
|
|
the list of expand points.
|
|
</para></listitem>
|
|
|
|
<listitem><para>Activate <guibutton>Next</guibutton>.</para></listitem>
|
|
|
|
|
|
<listitem><para>Press <keycap>spacebar</keycap> on the <guimenuitem>Additional Size</guimenuitem> field.
|
|
</para></listitem>
|
|
|
|
<listitem><para>At the "::" prompt enter <userinput>500MB</userinput>.
|
|
</para></listitem>
|
|
|
|
<listitem><para>Press <keycap>Enter</keycap>.
|
|
</para></listitem>
|
|
<listitem><para>Activate <guibutton>Expand</guibutton>.
|
|
</para></listitem>
|
|
|
|
</orderedlist>
|
|
|
|
|
|
</para>
|
|
<para>Alternatively, you can perform some of the steps to shrink the volume with the
|
|
context sensitive menu:</para>
|
|
|
|
<orderedlist>
|
|
<listitem><para>From the Volumes view, press <keycap>Enter</keycap> on /<guimenuitem>dev/evms/lvm/Sample Container/Sample Region</guimenuitem>.</para>
|
|
</listitem>
|
|
<listitem><para>Activate the <guimenuitem>Expand</guimenuitem> menu item.</para>
|
|
</listitem>
|
|
<listitem><para>Continue the operation beginning with step 3 of the Ncurses instructions.</para>
|
|
</listitem>
|
|
|
|
</orderedlist>
|
|
</sect2>
|
|
|
|
<!-- CLI-->
|
|
<sect2 id="expandcli"><title>Using the CLI</title>
|
|
|
|
<para>The <command>expand</command> command takes an expand point followed by an optional name
|
|
value pair and an expandable object. To find the expand point, use the <command>query</command> command with the Expand Points filter on the object or volume you plan to expand. For example:</para>
|
|
|
|
<programlisting>query: expand points, "/dev/evms/lvm/Sample Container/Sample Region"</programlisting>
|
|
|
|
<para>Use a list options filter on the object of the expand point to determine the name-value pair to use, as follows:</para>
|
|
|
|
<programlisting>query: objects, object="lvm/Sample Container/Sample Region", list options</programlisting><para>The free space in your container is the container name plus <filename>/Freespace</filename>.</para>
|
|
<para>With the option information that is returned, you can construct the command, as follows:</para>
|
|
|
|
<programlisting>expand: "lvm/Sample Container/Sample Region", add_size=500MB,
|
|
"lvm/Sample Container/Freespace"</programlisting>
|
|
|
|
|
|
|
|
|
|
|
|
</sect2>
|
|
|
|
</sect1>
|
|
</chapter>
|