From Wiki-UX.info

Wiki-UX / Swap / How to add swap and dump devices using logical volumes
Jump to: navigation, search

How to add swap and dump devices using logical volumes

Contents

Abstract

This article provides basic information on the procedures to add additional Swap and|or Dump devices to a HP-UX Operating Environment using LVM logical volumes.

Configure Swap device

Check SWAP Kernel Parameters

On HP-UX 11i v1 two kernel parameters handle the maximum swap that the system can use: swchunk and maxswapchunks.

On HP-UX 11i v2 and later, the maxswapchunks was deprected. The parameter is hard coded to it's historical maximum of 16384 chunks and removed from the list of configurable kernel parameters.

Change the parameters as needed. For most situations, just increase maxswapchunks to the maximum value 16384 (on HP-UX 11i v1) and set the swchunk parameter to the required size for your enviroment using any of the following formulas:

swchunk  = SWAP_GB * 64

Or

swchunk  = ( SWAP_GB * 1024^2 ) / 16384

For example, to configure the kernel to be able to address 64 GB of swap space:

swchunk  = ( 64 * 1024^2 ) / 16384
swchunk  = 4096

On HP-UX 11i v3, ...the total bytes of swap space manageable by the system is swchunk * 1 KB * 2,147,483,648 (the system maximum number of swap chunks in the swap table). Note that the minimum (or default) value of swchunk therefore allows 4,096 TB of swap space.

Configure Swap Devices

1. Create a logical volume. The logical volumes may come from any existing volume group or from a new one created at hoc for this purpose. The logical volume must be contiguous, strict allocated and bad block reallocation must be disabled.

Physical volumes created on direct attached storage or fibre channel may be use. Remember that fibre channel may have higher latency if compared with direct attach storage on a heavily use fibre configuration. Also, temporary connection lost may force your system to TOC if not recovered between beteeen the define physical volume timeouts. Always configure alternate PV links, on release prior to HP-UX 11i v3, if using fibre attached devices for additional swap.

# lvcreate -C y -s y -r n -n swap2 -L 1024 /dev/vg00

2. Edit /etc/fstab file and add the new swap logical volume. Is recommended to set the same or greater priority to the larger swap device. The same priority is used on the example.

-> /etc/fstab
/dev/vg00/swap2 / swap pri=1 0 0

Note that the new logical volume swap allocation can be activate online using the swapon command, or rebooting the system. For example:

# swapon -p 1 /dev/vg00/swap2

3. Verify the new swap configuration.

# swapinfo -tam
             Mb      Mb      Mb   PCT  START/      Mb
TYPE      AVAIL    USED    FREE  USED   LIMIT RESERVE  PRI  NAME
dev        4096     715    3381   17%       0       -    1  /dev/vg00/lvol2
dev        1024       0       0    0%       0       -    1  /dev/vg00/swap2
reserve       -     382    -382
memory     1946    1350     596   69%
total      7066    2447    4619   35%       -       0    -

Configure Dump device

Using boot volume group (/dev/vg00)

1. Create a logical volume

# lvcreate -C y -s y -r n -n dump2 -L 1024 /dev/vg00

2. Update the VGBA using lvnlnboot command.

# lvlnboot -d /dev/vg00/dump2

3. Verify new dump configuration.

# lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
        /dev/disk/disk11 -- Boot Disk
Boot: lvol1     on:     /dev/disk/disk11
Root: lvol3     on:     /dev/disk/disk11
Swap: lvol2     on:     /dev/disk/disk11
Dump: lvol2     on:     /dev/disk/disk11, 0
Dump: dump2     on:     /dev/disk/disk11, 1

Using a non-boot logical volume

http://docs.hp.com/en/B2355-90950/ch06s03.html

With the 11.0 release, dump configuration allows for not only selecting which devices are to be used to store a crash dump, as in prior releases, but also, how much if any of the dump you wish to retain. Dumps no longer need to contain the entire contents of physical memory. With expanded physical memory limits, you may wish to dump only those classes of physical memory which you will use in a crash dump analysis.

Further, you now have an additional way to configure dump devices: In addition to reconfiguring the kernel, at 11.0, you can also do dump configuration at runtime using the crashconf(1M) command without the need to reboot the system.

The file /etc/fstab is read, and all dump devices identified in it will be added to (or will replace) the current list of crash dump devices. This is in addition to any crash dump devices specified on the command line. See fstab(4) for information on the format of /etc/fstab.

1. Create a new volume group for the new dump logical volume is needed. For example, vgswap.

2. Create a new logical volume for the dump.

# lvcreate -C y -s y -r n -n dump2 -L 1024 /dev/vgswap

2. Update the VGBA using lvnlnboot command.

# lvlnboot -d /dev/vg00/dump2

3. Edit /etc/fstab file.

Reference

Authors

This page was last modified on 22 July 2010, at 03:15. This page has been accessed 8,001 times.