2. Example: shrink a volume

This section tells how to shrink a compatibility volume by 500 MB.

Example 16.1. Shrink a volume

Shrink the volume /dev/evms/lvm/Sample Container/Sample Region, which is the compatibility volume that was created in the chapter entitled "Creating Volumes," by 500 MB.


2.1. Using the EVMS GUI

Follow these steps to shrink the volume with the EVMS GUI:

  1. Select ActionsShrinkVolume...

  2. Select /dev/evms/lvm/Sample Container/Sample Region from the list of volumes.

  3. Click Next.

  4. Select /lvm/Sample Container/Sample Region from the list of volumes.

  5. Click Next.

  6. Enter 500MB in the "Shrink by Size" field.

  7. Click Shrink.

Alternatively, you can perform some of the steps to shrink the volume with the GUI context sensitive menu:

  1. From the Volumes tab, right click /dev/evms/lvm/Sample Container/Sample Region

  2. Click Shrink...

  3. Continue the operation beginning with step 3 of the GUI instructions.

2.2. Using Ncurses

Follow these steps to shrink a volume with Ncurses:

  1. Select ActionsShrinkVolume.

  2. Select /dev/evms/lvm/Sample Container/Sample Region from the list of volumes.

  3. Activate Next.

  4. Select lvm/Sample Container/Sample Region from the shrink point selection list.

  5. Activate Next.

  6. Scroll down using the down arrow until Shrink by Size is highlighted.

  7. Press spacebar.

  8. Press Enter.

  9. At the "::" prompt enter 500MB.

  10. Press Enter.

  11. Activate Shrink.

Alternatively, you can perform some of the steps to shrink the volume with the context sensitive menu:

  1. From the Volumes view, press Enter on /dev/evms/lvm/Sample Container/Sample Region.

  2. Activate the Shrink menu item.

  3. Continue the operation beginning with step 3 of the Ncurses instructions.

2.3. Using the CLI

The shrink command takes a shrink point followed by an optional name value pair or an optional shrink object. To find the shrink point, use the query command with the shrink points filter on the object or volume you plan to shrink. For example:

query: shrink points, "/dev/evms/lvm/Sample Container/Sample Region"

Use a list options filter on the object of the shrink point to determine the name-value pair to use, as follows:

query: objects, object="lvm/Sample Container/Sample Region", list options

With the option information that is returned, you can construct the command, as follows:

shrink: "lvm/Sample Container/Sample Region", remove_size=500MB