Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 06-24-2005, 08:01 PM   #1
LQ Newbie
Registered: Jun 2005
Posts: 1

Rep: Reputation: 0
Resizing Linux Partition

I have dual operating system, Windows XP and Suse Linux 9.1. As of now, I got 14 GB partitioned to my Windows, 15 GB for my Linux and 1 Gb for swap space. M quesetion is, How do I resize the partition so that I could have 20 GB for my windows and only 9 GB for Linux? Also, is it okay to decrease the partition for my swap space?
Old 06-24-2005, 08:23 PM   #2
Senior Member
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,991

Rep: Reputation: 76
For resizing partitions, look at gnuparted or commercial software like PartitionMagic. This is not a simple process because the filesystems on the partitions that you are trying to resize weren't ever designed to be resized. However, software tends to do a good job of this these days (though it's a good idea to take a backup first anyway).

Changing swap space is a more difficult question.

Under Linux, swap space is used for two reasons. The first use is to store data that doesn't fit in RAM (effectively giving you more memory), and the second, less common, use is to store data that won't be used for a long time, to make more free RAM available for disk and I/O caching.

The amount of swap that you need is equal to the maximum amount of memory that you might be using instantaneously, minus the amount of physical RAM that you have. This can be difficult to determine, but typically having more swap is good because it either makes things marginally faster or stops programs from crashing with out of memory errors.

You can see the amount of memory that you are using (swap and RAM) at any point in time in /proc/meminfo.

You could always turn swap off
swapoff -a
and see if it makes any noticable effect on your system, before messing with the swap partition. You can also use a swap file
dd if=/dev/zero of=/swapfile; mkswapfs /swapfile bs=1024 count=size_in_kb && mkswap /swapfile
You will also need to add the swap file to /etc/fstab in this case.
Old 06-24-2005, 08:31 PM   #3
Registered: Feb 2005
Distribution: Debian 3.x & Fedora Core 3, Debie on IBM Thinkpad
Posts: 68

Rep: Reputation: 15
First, whatever I am about to write depends on how your partitions are setup..

You can decrease your swap partition space but you may experience reduced performance..But usually twice the size of ram is okay..I have some units running with no swap partition, it does not seem to effect the performance much, then again those units are not production servers...
Partitioning the drives, I suggest you resize your linux partition with something like qparted while RUNNING linux (do not do this from windows, it may corrupt your data). When you reduce the partition size, you will have some space freed, go into windows and use something like partition magic (this is not free) or some other choice of free partitioning tool (maybe dos based) to convert this newly freed space. Reboot, and merge your windows partition with the one you have just created.
Old 06-27-2005, 04:55 AM   #4
Registered: Jun 2005
Distribution: Debian testing, Kubuntu 5.04
Posts: 104

Rep: Reputation: 15
Using a live CD (MEPIS works well; it has QTParted) to resize partitions is a good idea because you can get problems when resizing a mounted partition. (I have tried this and I had to reinstall Debian). You can also check the filesystems from the live CD both before and after you resize it to make sure everything works right.
I have 512 MB of RAM and use about 520 MB Swap. It works fime. I have tried increasing it and there is no performance increase, but having less makes it somewhat slower. I'd reccomend the same amount as you have RAM, perhaps more if you have under 256MB.


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
Problem Resizing Linux Partition From Partition magic John_Emad SUSE / openSUSE 5 02-16-2005 01:42 PM
Resizing linux partition saiz66 Linux - Newbie 1 09-16-2004 09:05 PM
resizing the linux partition tzvik Linux - Software 2 04-30-2003 06:53 AM
resizing the linux partition tzvik Linux - Newbie 3 04-30-2003 03:25 AM
Resizing linux partition tanchu Linux - Hardware 1 03-16-2003 12:05 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:30 AM.

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