1825667 Members
3623 Online
109686 Solutions
New Discussion

increase / reduce swap

 
SOLVED
Go to solution
lawrenzo_1
Super Advisor

increase / reduce swap

hello,

I have 16gb of swap on /dev/vg00/lvol2.

I have created an additional /dev/vg00/lvswap at 18gb.

I dont require both however I do need 18gb therefore can I remove lvol2 or is it better to remove lvswap and extend lvol2?

Thanks for the help.
hello
4 REPLIES 4
Victor Fridyev
Honored Contributor
Solution

Re: increase / reduce swap

Hi,

First of all it's strongly not recommended to have to swap spaces on the same physical disk, so you are 100% right when want to cancel one of them.
I'm not sure that you can extend lvol2 because swap MUST be contigious, so HPUX almost surely will not permit you to extend lvol2, so you have to replace swap spaces.
I'm afraid, you will have to reboot the server. Before the reboot edit /etc/fstab and delete from it lvol2 and leave lvswap.

HTH
Entities are not to be multiplied beyond necessity - RTFM
lawrenzo_1
Super Advisor

Re: increase / reduce swap

lvol2 doesnt appear in fstab ?

I will remove lvswap from vg00 and assign 2gb to another disk as I am not sure I can remove lvol2.

unless any other suggestions?

i require 18gb swap.

cheers
hello
James R. Ferguson
Acclaimed Contributor

Re: increase / reduce swap

Hi Lawrenzo:

You cannot remove 'lvol2' which is your primary swap. Too, unless you have free, contiguous extents immediately adjacent to the last physical extent of 'lvol2' you cannot extend primary swap.

If you haven't done a 'swapon' to activate your secondary swap, you could simply 'lvremove' it. If, on the other hand, you have activated it, as noted, remove any entry from '/etc/fstab', reboot, and then 'lvremove the logical volume.

You note that you really are trying to add only 2GB (18-16=2).

If you don't have 'swapmem_on=1' tuned in your kernel, I urge you to do this. This will activate "pseudoswap". This enables 75% of your physical memory to be considered as swap space for process swap reservation. This is ideal for large memory systems and is intended to reduce the need for large amounts of device (disk) swap.

If pseudoswap is on, you will have a line labeled "memory" when you do:

# swapmem -tam

The absence of the "memory"-labeled line means that 'swapmem_on=0' (off).

Since turning on 'swapmem_on" will require a reroot if it is off, you may be able to do one reboot to deactivate your secondary device swap and substitute pseudoswap.

Regards!

...JRF...
lawrenzo_1
Super Advisor

Re: increase / reduce swap

cool, that'll do for me!

swapmem param is equal to 1 so I will leave 16gb as it is.

cheers

Chris
hello