LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-20-2014, 12:57 PM   #1
abhijeetdutta
Member
 
Registered: Aug 2009
Posts: 139

Rep: Reputation: 16
Swap Space


Hello Members,

Just a small question to all my friends.

I know how to increase or decrease a swap partition, but i have scenario in my mind, how can I increase a swap partition if i don't have any free space in any of my partition.

I am not interested to add any extra disk.

Is this scenario is possible?

Cheers!
 
Old 07-20-2014, 01:01 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Jessie, Linux Mint 17
Posts: 7,750

Rep: Reputation: 271Reputation: 271Reputation: 271
Yes, you can add a swap file:

http://www.cyberciti.biz/faq/linux-a...ap-file-howto/

-------------------------
Steve Stites
 
Old 07-20-2014, 01:07 PM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,921

Rep: Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690
Quote:
Originally Posted by abhijeetdutta View Post
Hello Members,

Just a small question to all my friends. I know how to increase or decrease a swap partition, but i have scenario in my mind, how can I increase a swap partition if i don't have any free space in any of my partition. I am not interested to add any extra disk. Is this scenario is possible?
You can create a swap file, but the better question is "Why???" If your server is configured and sized correctly, chances are you will NEVER use swap, and there's no need to create more. What is telling you that you need more swap space? And if ALL your disks are 100% full, you have other issues as well.

Also, since you've been here for five years now, and have been an administrator for that long, you should know that asking questions requires DETAILS...things like what kind of hardware, version/distro of Linux, what you've done/tried so far, what this server does, and what error(s) you're seeing that would lead you to think performing this action is a good thing.

What are you trying to accomplish??
 
Old 07-20-2014, 01:21 PM   #4
abhijeetdutta
Member
 
Registered: Aug 2009
Posts: 139

Original Poster
Rep: Reputation: 16
Okay, My mistake. It just a question that comes in my mind, I haven't yet faced any such challenges.

It could be any hardware or virtual server.

Take distro as RHEL-6 or Centos-6

I just had a swap decrease from ubuntu server, because it wrongly configured while building.

Same time i have question what I will do if i face such scenario, where I don't have any space left in partition and can't add any extra disk.

That's all
 
Old 07-20-2014, 02:24 PM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 17,921

Rep: Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690Reputation: 3690
Quote:
Originally Posted by abhijeetdutta View Post
Okay, My mistake. It just a question that comes in my mind, I haven't yet faced any such challenges.
It could be any hardware or virtual server. Take distro as RHEL-6 or Centos-6

I just had a swap decrease from ubuntu server, because it wrongly configured while building.
And again, why would it matter? Swap is VERY rarely used these days, ever. I've got plenty of servers with only a 2GB swap, and that is WAY more than is needed.
Quote:
Same time i have question what I will do if i face such scenario, where I don't have any space left in partition and can't add any extra disk.
You will NEVER be in that scenario, since you can ALWAYS add more disks to a server. And again, if you have been an administrator for five years, you should know how to properly size and configure a server, so that you don't run out of resources and NEED swap space, much less run out of disk space.
 
Old 07-20-2014, 06:33 PM   #6
JeremyBoden
Member
 
Registered: Nov 2011
Posts: 938

Rep: Reputation: 174Reputation: 174
For the future...
Read up on LVM - you need never have to resize a partition again.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
What if tmpfs space is full? Written to swap space? pstein Linux - Newbie 8 11-18-2012 07:51 AM
how to reduce swap space and reclaim the space grantm Linux - Newbie 7 08-16-2012 08:05 AM
[SOLVED] what the difference swap space and swap file dundu Linux - Newbie 4 07-29-2012 01:03 PM
how much swap space is needed; how to increase swap space? johnpaulodonnell Linux - Newbie 5 03-23-2007 04:20 AM
How to unmount actual swap and mount a new(bigger) swap space? isaac Linux - Newbie 1 06-06-2004 02:23 AM


All times are GMT -5. The time now is 10:17 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration