1833059 Members
2971 Online
110049 Solutions
New Discussion

Primary Swap extending.

 
SOLVED
Go to solution
AVV
Super Advisor

Primary Swap extending.

Hi,
Can anyone guide me to extend the primary swap . I need primary swap only.
HP UX 11iV1
4 REPLIES 4
James R. Ferguson
Acclaimed Contributor
Solution

Re: Primary Swap extending.

Hi:

For all purposes, you can't extend primary swap. Swap extents must be contiguous disk extents and the ability to move extents in the logical volume adjacent to primary swap (that is in lvol3) is not going to exist. If you insist, take an Ignite image and recovery your server using that image while resizing your vg00 filesystems during the recovery process.

In reality, there is no need to extend primary swap. Simply add one or more secondary swap devices.

You can build your secondary swap on a non-vg00 volume group, or if necessary on vg00. Make the secondary device swap something *other* than one (1), which is the priority assigned to primary swap. Lower swap priority devices are used in preference to higher priority ones. Do something like:

# lvcreate -C y -r n -L 4096 -n lvol1 /dev/vg01

# swapon -p 0 /dev/vg01/lvol1

# echo "/dev/vg01/lvol1 ... swap pri=0 0 0" >> /etc/fstab

The idea of making the swap device priorities unequal, especially when they reside on the same physical volume, is to avoid mechanical disk head movement should swapping ever occur. Of course, if/when you do actually perform swap I/O your performance is degrading anyway!

Regards!

...JRF...
Jeeshan
Honored Contributor

Re: Primary Swap extending.

Hi

Extending your primary swap area isnt going to be easy, as it needs to be contiguous. This will be a long and tricky job.

Much easier to simply add another swap area, you can do this online without a reboot.
a warrior never quits
Sajjad Sahir
Honored Contributor

Re: Primary Swap extending.


follow up the above answeres
do it like this way
first create logical volume
then
create new swap space

activate it
swapon -a

if u want it permanently
put in /etc/fstab file
YAQUB_1
Respected Contributor

Re: Primary Swap extending.

Hi Jesy,

HP recommended U, never extend root, boot & swap space. If U want extend the root, boot & swap then U do ignite backup then start ignite recovery that time U change existing root, boot & swap space (I mean it is new install OS).

If it is urgent matter then U creates a new VGxx then U following this process:
1) lvcreate -C y -m 1 -L 8192(physical memory dubel space) -n lvolx /dev/vgxx
2) Next create an entry in /etc/fstab like this:
/dev/vgxx/lvolx ... swap pri=2 0 0

3) swapon â a

Best of luck,

Thanks â Yaqub
HP Support!!!