LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-18-2007, 07:58 AM   #1
pdillard
LQ Newbie
 
Registered: Jan 2007
Posts: 1

Rep: Reputation: 0
How do I increase my swap space on RH Linux AS 4.0


I am runnint "Linux beaurac2.beaumont.edu 2.6.9-42.0.2.ELlargesmp #1 SMP x86_64 GNU/Linux".

Swap space is currently set at 8gig on logicla volume "/dev/osvg/swap".
I need to increase my swap space to approximately 10gig for my 10gR2 RAC linux install.

I am using logical volume manager but I am not able to make any changes to the swap space.

Can some one tell me how to increase my swap space?
 
Old 01-18-2007, 09:10 AM   #2
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
Read the man pages for mkswap and swapon;

man mkswap
man swapon

Or contact Red Hat support for assistance.
 
Old 01-18-2007, 09:26 AM   #3
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Of course before you can use those commands for adding to swap you'll have to either increase your existing logical volume (LV) or add another one. I'd suggest the latter just because it is easier.

vgdisplay /dev/osvg # Will show you how much space if any you have left in the Volume Group (VG) named osvg.

You can use the lvcreate command to create another LV using the space needed assuming you have space in the VG.

There is an lvextend command as well but I'm not sure you could just extend a swap LV and have it work. At a minimum you'd have to reboot - and it might not even allow you to do the extend because swap is in use. You might have to do something like:
-Comment out the swap entries in /etc/fstab
-Boot the system (swap won't start)
-Do the lvextend on the swap LV
-Use the swap commands to insure the new LV is fully set as swap.
-Uncomment the swap entries in /etc/fstab
-Reboot the server and verify you have the correct amount of swap.

I'd caution you on the Oracle specifications though. So far as I can tell they just base what they tell you on the machine they happened to have been on rather than actually checking requirement. I once saw a specification for shared memory max (shmmax) kernel parameter that was larger than my machine's physical memory. The system ran just fine once I allocated what seemed a much more reasonable number.

10GB swap should mean you have at least 5GB physical memory (using the old rule of thumb Swap = 2 x Physical. Some people just do 1 x Physical. The swap won't really let you increase your SGA though - that resides in shared memory (shmmax, shmmni etc... are the kernel parameters for that).

Of course the SGA is for the DB server. For the apps (middle tier) swap probably have more of an impact though they aren't really memory intensive the way the DB is.

By the way: We have RAC 10g Lite on RHEL AS 3 and only have 5 GB swap configured there.

Last edited by MensaWater; 01-18-2007 at 09:28 AM.
 
Old 01-19-2007, 02:37 AM   #4
arpflux
LQ Newbie
 
Registered: Jan 2007
Posts: 5

Rep: Reputation: 0
To extend the existing LV, refer to the ffg as a guide. But as suggested earlier, its a good idea to just create a new LV or file to add as a swap.

- Disable the swap for the associated logical volume.

swapoff -v /dev/osvg/swap

- Resize the LV.

lvresize -L +1000M /dev/osvg/swap

- Format the new swap space.

mkswap /dev/osvg/swap

- Enable the swap on the extended LV.

swapon -va

- Test that swap has been extended properly.

cat /proc/swaps
free
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to increase the hard disk space of linux? hari78 Linux - Newbie 5 03-01-2005 05:09 AM
How to increase SWAP partition space ? sureshsaragadam Linux - Newbie 23 10-01-2003 09:24 AM
how to increase the space for linux ?? bobby2k3 Linux - Newbie 4 09-19-2003 05:42 AM
how to increase the space for linux ?? bobby2k3 Linux - Newbie 1 09-18-2003 06:57 AM
Increase Swap Space? star geezer Linux - Software 9 03-10-2003 12:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration