LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 11-15-2012, 02:59 PM   #1
pretruder
LQ Newbie
 
Registered: Apr 2008
Posts: 8

Rep: Reputation: 0
swap question


I don't think I allowed enough swap space for my swap partition when I initially set up my partitions. If I add a swap file, will this interfere with my swap partition? If not, will the system use both? I am trying to increase my swap memory with out having to mess with the disk.
 
Old 11-15-2012, 03:25 PM   #2
johnsfine
Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,087

Rep: Reputation: 1110Reputation: 1110Reputation: 1110Reputation: 1110Reputation: 1110Reputation: 1110Reputation: 1110Reputation: 1110Reputation: 1110
Quote:
Originally Posted by pretruder View Post
If I add a swap file, will this interfere with my swap partition?
No.

Quote:
If not, will the system use both?
If both are enabled and if the space is necessary, Linux will use both.

What Linux distribution are you using?

The instructions to create a swap file should be easy to find and should be pretty independent of distribution, similarly the instructions to enable the swap file right after you create it.

But I think you need to do a bit more to cause the swap file to be enabled again automatically on each reboot of Linux. I'm not sure of those instructions and I think the best way of doing that may depend on which distribution of Linux you have. In case that is true, identifying your distribution will help someone, who knows more than I about swap files, to give you a better answer.
 
Old 11-15-2012, 03:28 PM   #3
jefro
Guru
 
Registered: Mar 2008
Posts: 11,552

Rep: Reputation: 1406Reputation: 1406Reputation: 1406Reputation: 1406Reputation: 1406Reputation: 1406Reputation: 1406Reputation: 1406Reputation: 1406Reputation: 1406
You could even set a priority for use if you want. Many people use swap files.

Swap file is an easy way to add swap but it does have one limit at least. If you want to suspend/hibernate it may cause an issue.

I think you can create even a sort of swap raid so you could have swap across a number of disks.

Last edited by jefro; 11-15-2012 at 03:30 PM.
 
Old 11-16-2012, 06:30 AM   #4
pretruder
LQ Newbie
 
Registered: Apr 2008
Posts: 8

Original Poster
Rep: Reputation: 0
Yes, I have found plenty of information on how to do it, activate it, etc., and it is pretty straight forward and simple. I just couldn't find anything related to my question on the effects it would have to my existing swap. Thank you for clarifying that for me.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
swap question: using 8e filesystem for swap dennysnight Red Hat 1 06-26-2009 03:17 PM
Swap question heraklez Slackware 13 07-30-2006 02:50 PM
question about swap what0101 Linux - Newbie 3 09-19-2005 02:52 PM
Mount question and hot swap question Dr Gutiemouth Linux - Newbie 8 10-20-2004 12:30 PM
Swap question johntramp Linux - Newbie 4 04-16-2004 11:30 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration