Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX System Administrator's Guide: Logical Volume Management: HP-UX 11i Version 3 > Chapter 3 Administering LVM

Administering Swap Logical Volumes

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

NOTE: Version 2.x volume groups do not support swap logical volumes.

When you enable a swap area within a logical volume, HP-UX determines how large the area is, and it uses no more space than that. If your disk has enough remaining contiguous space, you can increase the size of your primary swap area by using the lvextend command (or HP SMH) to extend the logical volume, then reboot the system. This procedure allows HP-UX to use the extra space.

If you plan device swap areas in addition to primary swap, you get the best performance when the device swap areas are on different physical volumes. This configuration allows for the interleaving of I/O to the physical volumes when swapping occurs.

To create interleaved swap, create multiple logical volumes for swap, with each logical volume on a separate disk. You must use HP-UX commands to help you obtain this configuration. HP SMH does not allow you to create a logical volume on a specific disk. See “Extending a Logical Volume to a Specific Disk”.

You can configure your swap space as described in HP-UX System Administrator's Guide: Overview.

NOTE: You must reboot the system for the system to recognize changes to the swap configuration.

Creating a Swap Logical Volume

To create a swap logical volume, use the lvcreate command. You must set a contiguous allocation policy using the -C y option. For example:

# lvcreate -C y -n swap_lvol /dev/vgnn

For more information, see lvcreate(1M).

If you create a logical volume to use as primary swap, use the lvlnboot command with the -s option to update the swap information used by LVM at boot. For example:

# lvlnboot -s /dev/vgnn/swap_lvol

Extending a Swap Device

If you are using a logical volume for swap, you must increase the logical volume size before increasing the swap size. You can extend the logical volume using lvextend or HP SMH.

Swap logical volumes must be contiguous, so extending the logical volume succeeds only if there are physical extents available at the end of the existing logical volume. If contiguous disk space is not available, create a new contiguous logical volume for primary swap within the root volume group. You do not need to designate a specific disk. For example:

# lvcreate -C y -L 48 -n pswap /dev/vgroot

After creating a logical volume to use as primary swap, use lvlnboot to update the boot information:

# lvlnboot -s /dev/vgroot/pswap

Reducing the Size of a Swap Device

If you are using a logical volume for swap, you must reduce the swap size before reducing the size of the logical volume. You can reduce the size of the logical volume using lvreduce or HP SMH.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2008 Hewlett-Packard Development Company, L.P.