Operating System - HP-UX
1832413 Members
2899 Online
110042 Solutions
New Discussion

extending Mirrored primary swap area

 
SOLVED
Go to solution
Fayez
Trusted Contributor

extending Mirrored primary swap area

Hi all,

I have been asked to increase the primary swap area from 4GB to 8GB for Oracle 9i installation, but I already configured it as mirrored, my quastion is I want to know the exact procedure to do this.

One more thing, we do not have the Online JFS product.

Thanks in advance....
13 REPLIES 13
Jeff Schussele
Honored Contributor

Re: extending Mirrored primary swap area

Hi,

You won't be able to extend the primary swap because it, / & /stand *must* be contigous.
What you _can_ do is setup another, secondary swap area in either free VG space you now have or add a disk & setup a VG with a swap LV defined within it. It's just like creating any other LV except you just don't put a filesystem on it.
Once it's set up then add an entry to /etc/fstab like the following

/dev/vg_name/lv_name ... swap pri=0 0 0

and then run
swapon -a

You may need to increase either/or kernel parameters:

maxswapchunks
swchunk

to accomodate the extra swap space. Both require a reboot.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Pete Randall
Outstanding Contributor

Re: extending Mirrored primary swap area

Use LVM to create a new logical volume then use lvextend to mirror it and, finally, use swapon to enable it.


Pete

Pete
Steven E. Protter
Exalted Contributor

Re: extending Mirrored primary swap area

first:

lvextend -L /dev/vg00/lvol2 /dev/dsk/c1t51d0 /dev/dsk/c1t6d0

This should actually extend the mirror straight away. No online JFS.

I usually break the mirror first.

lvsplit /dev/vg00/lvol2

lvextend -L 9000 /dev/vg00/lvol2 /dev/dsk/c1t5d0

lvremove the copy that was made with lvsplit.

lvextend -m 1 /dev/vg00/lvol02 /dev/dsk/c1t6d0

You'll probably have to activate the large swap area. Sam provides a good interface, but you'll probably have to boot the box.

SEP

Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Geoff Wild
Honored Contributor

Re: extending Mirrored primary swap area

If you just need more swap, then add a new swap device (either through SAM or command line).

No reboot required to add swap.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Jeff Schussele
Honored Contributor

Re: extending Mirrored primary swap area

Ummmmm SEP, even though the poster didn't explicitly state it, I'm pretty sure that they not only want to extend it - they wish to be able to use it as well.
Your method just won't fly.
The *only* way to extend primary swap on the root/boot disk is via Ignite tape recovery.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Bill Hassell
Honored Contributor

Re: extending Mirrored primary swap area

Since this is just for Oracle installation, just find a 4Gb logical volume and run the swapon command to add it. There is no need to increase the primary swap area as there is nothing special except that it is the first swap area. swapon adds the additional space and the system uses it transparently. When you reboot, the additional swap area disappears and the lvol can be reused.

The DBAs are asking for the wrong task. They may have said 'primary' but what they meant was 'total'. swap is not a filesystem, it is part of the virtual memory system and the raw swap space cannot be extended--the virtual memory system won't 'see' any new space in an lvol.


Bill Hassell, sysadmin
Prashant Zanwar_4
Respected Contributor

Re: extending Mirrored primary swap area

hi,
What we used to practice for temporary need was enable paging on some file system having a paging directory. You can acheive it by doing as follows:
/usr/sbin/swapon -l 5000 -r 10000 -p 2 /var/adm/crash/paging

What you can keep in mind is try and see a bing enough file system which you can use.

-r 10000 these much file system blocks will be saved for file system usage.

Hope this helps
Reply what you did at last

Thanks
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
Prashant Zanwar_4
Respected Contributor

Re: extending Mirrored primary swap area

Below link also will help you for understanding swap modification operation.

http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B2355-90670/B2355-90672_top.html&con=/hpux/onlinedocs/B2355-90672/00/00/62-con.html&toc=/hpux/onlinedocs/B2355-90672/00/00/62-toc.html&searchterms=swapon&queryid=20040922-135555

Thanks
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
Fayez
Trusted Contributor

Re: extending Mirrored primary swap area

Hi all,

Jeff I think you are right, there is no way to increase the Pri. swap space as I found it in some Docs. unless you have physical extents contiguous, Any way I will try to build secondary swap space and enable it and mke a mirrored copy of it, but I want to ask you is it important for Oracle swap space to be one piece??

Thanks....
bhavin asokan
Honored Contributor

Re: extending Mirrored primary swap area

hi,

i think there is option to do it if you are having enough space (should be contiguous) in your root vg.

see the attachment for detailed procedure.

i got the procedure for creating a new swap volume from hpux 11/11i installation and update guide.

regds,




Fayez
Trusted Contributor

Re: extending Mirrored primary swap area

Hi all,

Any way what I did, I located an extra 4Gb and build an scondary swap device on it make mirror, but is it important for Oracle to be one larg swap area, not devided into two???

Bhaven I did not recive your attached file befor this, but It looks useful thanks for it and I hope to use it in the future.

Thanks for every body...
Jeff Schussele
Honored Contributor
Solution

Re: extending Mirrored primary swap area

Hi,

No it makes no difference if you have 1, 2, 3 or even more swap devices simply because if you actually start paging out to them - implying that you've exhausted RAM - your response times will go into the toilet. This results because disk access is more than 1000 times slower than RAM access.
You usually need more swap space for reservation purposes. This is because *every* process that wants to start must reserve a chunk of swap space just in case it ever does need to physically page out.
You should also check the kernel parm swapmem_on & make sure it's set to 1
This allows the system to use approx 75% of RAM as pseudo-swap & will give you more reservation space.
The moral is - Make sure you have enough physical RAM to support all the processes. You don't *ever* want to actually page out.
I hope this answers your question.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Fayez
Trusted Contributor

Re: extending Mirrored primary swap area

Hi

Yes Jeff it dose, and I already make neccessary changes to the kernel params. to enable all swap space.

Thanks a lot for all....