1834666 Members
2361 Online
110069 Solutions
New Discussion

Re: increasing swap

 
SOLVED
Go to solution
Chris Fadrowski
Super Advisor

increasing swap

I need to increase my primary swap. currently i have all of vg00 on 1 disk. I have a 2nd disk of equal size that i added to vg00. what is the best way to do this? i tryed doing a make_recovery -A -p and then editing the config.recover file to increase the size of lvol2, then resuming the make_recovery but that didnt work for some reason. Should it or is there a better way. Not using jfsonline.
10 REPLIES 10
James R. Ferguson
Acclaimed Contributor
Solution

Re: increasing swap

Hi Chris:

Wait! Don't complicate your vg00 by making it a multi-disk volume group. If you need more swapspace, simply add a secondary swap space as a logical volume on *another* disk. You can do this quickly with SAM if you like. Make the swap priority the same as that of your primary and you will gain I/O interleaving when/if swapping occurs, thereby increasing performance.

Regards!

...JRF...
A. Clay Stephenson
Acclaimed Contributor

Re: increasing swap

Your Ignite/make_tape_recovery approach should have worked and in practical terms that's about the only way to do this BUT before you do this you should ask yourself why increase the size of PRIMARY swap. It really only needs to be 256-512MB and the rest (if needed) can be secondary swap which can go anywhere and added anytime.


If it ain't broke, I can fix that.
S.K. Chan
Honored Contributor

Re: increasing swap

Since you're adding a second disk, why not just create the additional (secondary) swap on that disk ? Make it the same size as the primary swap, same priority (so that interleave is enabled). But make sure the second disk is created on a different VG, that would be better than including it in vg00.
Chris Fadrowski
Super Advisor

Re: increasing swap

thank you both for your help. Good points brought up. I just felt that by creating another lvol with device swap that performance would suffer. I wasn't aware you could assign the same priority but all worked just fine. thanks again for your quick responses.
Sebastian Galeski_1
Trusted Contributor

Re: increasing swap

Hi
The easiest way is to add second swap, for example vi SAM or manually:
1)lvcreate -L 256 -n swap2 -C y -r n /dev/vg00
2) swapon -e -f -p 1 -u /dev/vg00/swap2
3) entry in /etc/fstab

Or if You want to reorganize all Your vg00 do:
make_recovery -avi -d /dev/rmt/0m
boot from tape and fix new lvol size.

hope it help
MANOJ SRIVASTAVA
Honored Contributor

Re: increasing swap

Chris


You shouldnot increase the primary swap as it will also ersult in more i/o to the same disk , the better option is to add a secondary swap on different disk .

Manoj Srivastava
PIYUSH D. PATEL
Honored Contributor

Re: increasing swap

Hi ,

Never increase the primary swap space. It may create lots of problems.

Add a secondary swap space for load balancing.

Load will be shared on the new disk....or else your root VG will be having more I/Os

lvcreate -L swapsize -n swap2 -C y -r n /dev/vg00

swapon

put swap entry in /etc/fstab

Piyush


Patrick Wallek
Honored Contributor

Re: increasing swap

Chris,

Just creating the make_recovery tape does not do anything to your VG00 configuration. It merely gives you a tool install from that allows you to make changes.

In order for the new configuration that is on the tape to take effect, you must boot from the tape and reinstall HP-UX from that Ignite tape. The reinstall is when you can make changes to LV sizes, etc.

Chris Fadrowski
Super Advisor

Re: increasing swap

james, thats what i did. I may not have explained it with all the details above. i used the MR tape for a recovery after i edited the files and did an advance install. I beleive the reason it didn't work was because swap needs to be contiguous.
Chris Fadrowski
Super Advisor

Re: increasing swap

i meant patrick