1831726 Members
4308 Online
110029 Solutions
New Discussion

swap addition

 
SOLVED
Go to solution
kelvin567
Occasional Advisor

swap addition

Hello All,

I want to add additional 4 gb of device swap on my HP box....what all steps do i need to perform...?

Tnks
6 REPLIES 6
Hasan  Atasoy
Honored Contributor
Solution

Re: swap addition


hi kelvin ;

1. lvcreate -L 4096 vg00
note that newly created lv name
2. add this lvname to /etc/fstab
/dev/vg00/yourlvname ... swap pri=1 0 0
3. swapon -a


mathmad.
Court Campbell
Honored Contributor

Re: swap addition

Mathmad is part of the way there. The lvcreate command should be:

lvcreate -C y -r n -L 4096 vg00

Swap should be contiguous and have bad block relocation turned off.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Patrick Wallek
Honored Contributor

Re: swap addition

You also need to be aware that if your 'maxswapchunks' kernel parameter (depending on your version of HP-UX) is too small, then you may not be able to use any or all of your newly created swap space.

maxswapchunks, if it needs adjusting, typically requires a reboot for it to become effective.
kelvin567
Occasional Advisor

Re: swap addition

guys as mathmad as suggested I created the swap lv, and I can see the changes in swapinfo -tam....However it has not allowed to create me a dump lvol since it needs to be countigous...



I believe if we are creating only swap lvol then lv does not need to be countigous
Court Campbell
Honored Contributor

Re: swap addition

You are correct. I guess it's just a habit.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
rajdev
Valued Contributor

Re: swap addition

Hi Kelvin,

Its good practice to make swap volume also contiguous.

The manpage of lvlnboot has the following:

bootlv -- First volume on disk + contiguous + badblock relocation off
dumplv -- contiguous + badblock relocation off
rootlv -- contiguous + badblock relocation off
swaplv -- contiguous

Regards,
RD