old-www/LDP/EVMSUG/html/exshrink.html

501 lines
6.7 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML
><HEAD
><TITLE
>Example: shrink a volume</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="EVMS User Guide"
HREF="index.html"><LINK
REL="UP"
TITLE="Expanding and shrinking volumes"
HREF="expandshrink.html"><LINK
REL="PREVIOUS"
TITLE="Why expand and shrink volumes?"
HREF="whyexpandshrink.html"><LINK
REL="NEXT"
TITLE="Example: expand a volume"
HREF="mkfs.html"></HEAD
><BODY
CLASS="sect1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>EVMS User Guide</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="whyexpandshrink.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 16. Expanding and shrinking volumes</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="mkfs.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="exshrink"
></A
>16.2. Example: shrink a volume</H1
><P
>This section tells how to shrink a compatibility volume by 500 MB.</P
><A
NAME="AEN3185"
></A
><BLOCKQUOTE
CLASS="BLOCKQUOTE"
><DIV
CLASS="example"
><A
NAME="AEN3186"
></A
><P
><B
>Example 16-1. Shrink a volume</B
></P
><P
>Shrink the volume
<TT
CLASS="filename"
>/dev/evms/lvm/Sample Container/Sample Region</TT
>, which
is the compatibility volume that was created in the chapter entitled
"Creating Volumes," by 500 MB.</P
></DIV
></BLOCKQUOTE
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="shrinkgui"
></A
>16.2.1. Using the EVMS GUI</H2
><P
>Follow these steps to shrink the volume with the EVMS GUI:
<P
></P
><OL
TYPE="1"
><LI
><P
>Select <SPAN
CLASS="guimenu"
>Actions</SPAN
>-&gt;<SPAN
CLASS="guimenuitem"
>Shrink</SPAN
>-&gt;<SPAN
CLASS="guimenuitem"
>Volume...</SPAN
></P
></LI
><LI
><P
>Select <SPAN
CLASS="guimenu"
>/dev/evms/lvm/Sample Container/Sample Region</SPAN
>
from the list of volumes.
</P
></LI
><LI
><P
>Click <SPAN
CLASS="guibutton"
>Next</SPAN
>.
</P
></LI
><LI
><P
>Select <SPAN
CLASS="guimenu"
>/lvm/Sample Container/Sample Region</SPAN
> from the list of volumes.
</P
></LI
><LI
><P
>Click <SPAN
CLASS="guibutton"
>Next</SPAN
>.
</P
></LI
><LI
><P
>Enter <TT
CLASS="userinput"
><B
>500MB</B
></TT
> in the "Shrink by Size" field.</P
></LI
><LI
><P
>Click <SPAN
CLASS="guibutton"
>Shrink</SPAN
>.</P
></LI
></OL
>
</P
><P
>Alternatively, you can perform some of the steps to shrink the volume with the GUI
context sensitive menu:</P
><P
></P
><OL
TYPE="1"
><LI
><P
>From the <SPAN
CLASS="guimenuitem"
>Volumes</SPAN
> tab, right click
<TT
CLASS="filename"
>/dev/evms/lvm/Sample Container/Sample Region</TT
></P
></LI
><LI
><P
>Click <SPAN
CLASS="guimenuitem"
>Shrink...</SPAN
></P
></LI
><LI
><P
>Continue the operation beginning with step 3 of the GUI
instructions.</P
></LI
></OL
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="shrinkncurses"
></A
>16.2.2. Using Ncurses</H2
><P
>Follow these steps to shrink a volume with Ncurses:
<P
></P
><OL
TYPE="1"
><LI
><P
>Select <SPAN
CLASS="guimenu"
>Actions</SPAN
>-&gt;<SPAN
CLASS="guimenuitem"
>Shrink</SPAN
>-&gt;<SPAN
CLASS="guimenuitem"
>Volume</SPAN
>.
</P
></LI
><LI
><P
>Select
<SPAN
CLASS="guimenuitem"
>/dev/evms/lvm/Sample Container/Sample Region</SPAN
> from the
list of volumes.
</P
></LI
><LI
><P
>Activate <SPAN
CLASS="guibutton"
>Next</SPAN
>.
</P
></LI
><LI
><P
>Select
<SPAN
CLASS="guimenuitem"
>lvm/Sample Container/Sample Region</SPAN
> from the
shrink point selection list.
</P
></LI
><LI
><P
>Activate <SPAN
CLASS="guibutton"
>Next</SPAN
>.
</P
></LI
><LI
><P
>Scroll down using the <B
CLASS="keycap"
>down</B
> arrow until
<SPAN
CLASS="guimenuitem"
>Shrink by Size</SPAN
> is highlighted.
</P
></LI
><LI
><P
>Press <B
CLASS="keycap"
>spacebar</B
>.
</P
></LI
><LI
><P
>Press <B
CLASS="keycap"
>Enter</B
>.
</P
></LI
><LI
><P
>At the "::" prompt enter <TT
CLASS="userinput"
><B
>500MB</B
></TT
>.
</P
></LI
><LI
><P
>Press <B
CLASS="keycap"
>Enter</B
>.
</P
></LI
><LI
><P
>Activate <SPAN
CLASS="guibutton"
>Shrink</SPAN
>.
</P
></LI
></OL
>
</P
><P
>&#13;Alternatively, you can perform some of the steps to shrink the volume with the
context sensitive menu:</P
><P
></P
><OL
TYPE="1"
><LI
><P
>From the Volumes view, press <B
CLASS="keycap"
>Enter</B
> on <TT
CLASS="filename"
>/dev/evms/lvm/Sample Container/Sample Region</TT
>.</P
></LI
><LI
><P
>Activate the <SPAN
CLASS="guimenuitem"
>Shrink</SPAN
> menu item.</P
></LI
><LI
><P
>Continue the operation beginning with step 3 of the Ncurses instructions.</P
></LI
></OL
></DIV
><DIV
CLASS="sect2"
><H2
CLASS="sect2"
><A
NAME="shrinkcli"
></A
>16.2.3. Using the CLI</H2
><P
>The <B
CLASS="command"
>shrink</B
> command takes a shrink point followed by an optional name
value pair or an optional shrink object. To find the shrink point, use the <B
CLASS="command"
>query</B
> command with the shrink points filter on the object or volume you plan to shrink. For example:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>query: shrink points, "/dev/evms/lvm/Sample Container/Sample Region"</PRE
></FONT
></TD
></TR
></TABLE
><P
>Use a list options filter on the object of the shrink point to determine the name-value pair to use, as follows:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>query: objects, object="lvm/Sample Container/Sample Region", list options</PRE
></FONT
></TD
></TR
></TABLE
><P
>With the option information that is returned, you can construct the command, as follows:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="programlisting"
>shrink: "lvm/Sample Container/Sample Region", remove_size=500MB</PRE
></FONT
></TD
></TR
></TABLE
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="whyexpandshrink.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="mkfs.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Why expand and shrink volumes?</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="expandshrink.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Example: expand a volume</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>