HP-UX : How To Create Swap – Command Line

To create swap, we need a contiguous space on a disk / LUN.

Create vg01:

pvcreate /dev/rdsk/c12t0d0
pvcreate /dev/rdsk/c12t2d0
vgcreate -s 8 -p 128 /dev/vg01 /dev/dsk/c12t0d0 /dev/dsk/c12t2d0
vgchange -a y /dev/vg01

lvcreate -C y -L 16384 -n lvswap /dev/vg01

/usr/sbin/swapon -f -p 3  /dev/vg01/lvswap

add to /etc/fstab:

/dev/vg01/lvswap … swap pri=3 0 0

Leave a Reply

Your email address will not be published. Required fields are marked *

CAPTCHA * Time limit is exhausted. Please reload the CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.