LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 03-23-2014, 09:02 AM   #1
thiyagusham
Member
 
Registered: Apr 2012
Posts: 213

Rep: Reputation: Disabled
how can i increase swap area size


Hi all ;

I want to increase swap area size.
Atleast i need 600mb for swap area.
I am planning to utilize from /u03.

How can i achieve that ??

PHP Code:
[root@gyan ~]# df -TH
Filesystem    Type     Size   Used  Avail Use% Mounted on
/dev/sda3     ext3      11G   3.6G   6.1G  37% /
/
dev/sda8     ext3     5.4G   146M   5.0G   3% /u03
/dev/sda7     ext3     2.1G   125M   1.9G   7% /tmp
/dev/sda5     ext3     6.1G   147M   5.7G   3% /u02
/dev/sda2     ext3      16G   174M    15G   2% /u01
/dev/sda1     ext3     152M    12M   132M   9% /boot
tmpfs        tmpfs     1.1G      0   1.1G   0
% /dev/shm
/dev/hdc   iso9660     3.1G   3.1G      0 100% /media/Enterprise Linux dvd 20100405
.host:/     vmhgfs     105G    52G    54G  49% /mnt/hgfs 
Thanks all;
 
Old 03-23-2014, 09:22 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 7,912

Rep: Reputation: 775Reputation: 775Reputation: 775Reputation: 775Reputation: 775Reputation: 775Reputation: 775
Handiest thing would be to find another home for the 146M on /u03 and run these commands
Code:
umount /dev/sda8
mkswap /dev/sda8
swapon /dev/sda8
To prevent a load of errors, update /etc/fstab to look more like
Code:
/dev/sda8        swap             swap
 
Old 03-23-2014, 09:38 AM   #3
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 3,399

Rep: Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486Reputation: 1486
Quickest way is to use a swap file:
Code:
dd if=/dev/zero bs=1M count=600 of=/u03/swap600
mkswap /u03/swap600
swapon -v /u03/swap600
Then, add this line to your /etc/fstab to make it used automatically:
Code:
/u03/swap600    swap    swap    defaults    0 0
 
Old 03-23-2014, 11:06 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,788

Rep: Reputation: 4162Reputation: 4162Reputation: 4162Reputation: 4162Reputation: 4162Reputation: 4162Reputation: 4162Reputation: 4162Reputation: 4162Reputation: 4162Reputation: 4162
Quote:
Originally Posted by thiyagusham View Post
Hi all ;
I want to increase swap area size. Atleast i need 600mb for swap area. I am planning to utilize from /u03. How can i achieve that ??

PHP Code:
[root@gyan ~]# df -TH
Filesystem    Type     Size   Used  Avail Use% Mounted on
/dev/sda3     ext3      11G   3.6G   6.1G  37% /
/
dev/sda8     ext3     5.4G   146M   5.0G   3% /u03
/dev/sda7     ext3     2.1G   125M   1.9G   7% /tmp
/dev/sda5     ext3     6.1G   147M   5.7G   3% /u02
/dev/sda2     ext3      16G   174M    15G   2% /u01
/dev/sda1     ext3     152M    12M   132M   9% /boot
tmpfs        tmpfs     1.1G      0   1.1G   0
% /dev/shm
/dev/hdc   iso9660     3.1G   3.1G      0 100% /media/Enterprise Linux dvd 20100405
.host:/     vmhgfs     105G    52G    54G  49% /mnt/hgfs 
Thanks all;
And the VERY FIRST HIT in Google for "how to increase swap space in linux" is:
http://www.thegeekstuff.com/2010/08/...dd-swap-space/

..a complete explanation, with examples, of both methods. Did you even try to look this up first???
 
  


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
How to Increase swap size ramesh14 Linux - Software 10 03-29-2010 12:01 AM
How to increase size of swap space? anyzoo Linux - Newbie 11 06-18-2009 07:11 PM
increase swap size ssilayaraja Linux - Newbie 5 08-18-2008 09:23 PM
How to increase swap size in LVM? Akhran Debian 1 04-04-2006 09:47 AM
ubuntu - increase swap size dna9 Linux - Distributions 11 01-24-2005 11:45 AM


All times are GMT -5. The time now is 08:14 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration