LinuxQuestions.org
Latest LQ Deal: Linux Power User 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 08-16-2001, 06:16 PM   #1
totalcommand
LQ Newbie
 
Registered: Aug 2001
Posts: 23

Rep: Reputation: 15
I'm an idiot...please help me with resizing my swap partition


Any chance someone could tell me how to resize my swap partition? Right now I have it set to 64 MB, which I think is not enough. I have 48 MB of RAM and the recommended swap size is double that. Is there any way I can resize the 64MB Swap partition to an at least 96MB partition? Thanks a bunch.
 
Old 08-16-2001, 06:26 PM   #2
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 46
What makes you think you need more swap space? Have a look at the output from the free command. This will mention how much swap space you are using, if its not maxed out then you don't need more.

As for resizing it. If you have unpartioned space somewhere then I would simply create a second swap partition. The kernel will then automatically balance its swapping between them (assuming they have the same priority [they will have unless you change it]). If you don't have unpartition space then you'll need to use something like PartitionMagic (PartitionTragic) to shift some partitions around but make sure you backup you data first, and make sure you have a boot disk. If you move the kernel you'll break LILO so you'll need that boot disk.

cheers

Jamie...
 
Old 09-25-2001, 12:23 PM   #3
jameztcc
LQ Newbie
 
Registered: Sep 2001
Location: Singapore
Distribution: RH, Clarkconnect
Posts: 9

Rep: Reputation: 0
What abt this: I install with 512 mb ram....RH create a 1gb swap partition...how can I resize it to say 256mb......1gig of hd on laptop with 6gb is a WASTE :>
 
Old 09-28-2001, 10:01 AM   #4
jameztcc
LQ Newbie
 
Registered: Sep 2001
Location: Singapore
Distribution: RH, Clarkconnect
Posts: 9

Rep: Reputation: 0
up
 
Old 09-28-2001, 10:59 PM   #5
jameztcc
LQ Newbie
 
Registered: Sep 2001
Location: Singapore
Distribution: RH, Clarkconnect
Posts: 9

Rep: Reputation: 0
up
 
Old 10-11-2001, 09:04 AM   #6
rahul
LQ Newbie
 
Registered: Oct 2001
Location: India
Distribution: RedHat
Posts: 9

Rep: Reputation: 0
Post swap partition problem

Hi,
Hmmm so you all facing prob with the swap space. so you all want to use your RAM space for the swap partition then this is not for you.

i prefer using the harddisk space for this.so here we go:

you may need some tools for this make sure you have all these:

mkswap, swapon


first of all delete the current swap partition using fdisk and creat a new with the size you want, change the partition type to linux swap.

save the configuration and run

#mkswap -c /dev/hdaX (Where X is the swap partition number you created)

edit /etc/fstab
replace the current swap partition entry with the new one, if you have created the swap partition in the same place as before and only reduced the size then this step is not required. It is only required if the new swap partition number is different from the earlier one.

Reboot the system.

man mkswap, swapon
man fstab

regards
 
Old 10-11-2001, 12:01 PM   #7
jameztcc
LQ Newbie
 
Registered: Sep 2001
Location: Singapore
Distribution: RH, Clarkconnect
Posts: 9

Rep: Reputation: 0
Thanks for you detailed step-by-step info :>

I managed to changed the default 1gb of swap to just 200mb...on a laptop with 6gb of hd space + 512 mb of ram :>



cool!



total used free shared buffers cached
Mem: 512828 53320 459508 0 1500 28004
-/+ buffers/cache: 23816 489012
Swap: 192740 0 192740

Last edited by jameztcc; 10-11-2001 at 12:08 PM.
 
Old 10-17-2001, 07:09 PM   #8
wolfyheart
LQ Newbie
 
Registered: Oct 2001
Location: California
Distribution: mandrake 7.2
Posts: 6

Rep: Reputation: 0
Question

Did you get help yet for your problem?
Quote:
Originally posted by jameztcc
What abt this: I install with 512 mb ram....RH create a 1gb swap partition...how can I resize it to say 256mb......1gig of hd on laptop with 6gb is a WASTE :>
 
Old 10-18-2001, 01:11 PM   #9
jameztcc
LQ Newbie
 
Registered: Sep 2001
Location: Singapore
Distribution: RH, Clarkconnect
Posts: 9

Rep: Reputation: 0
See the message above you, fixed :>

Thanks
 
  


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
Resizing swap partition shujja Linux - Newbie 3 09-30-2005 03:20 AM
deleting/resizing swap partition / increasing hd space saranga2000 Linux - Hardware 1 12-09-2004 11:03 AM
Resizing a swap file rhmd5 Linux - General 5 01-11-2003 01:40 PM
Resizing Swap Partition Staz Linux - General 4 08-30-2002 01:33 PM
Resizing swap partition... PapaLewA Linux - Newbie 4 11-17-2001 02:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:26 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