LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 06-24-2005, 07:01 PM   #1
the99ebookstore
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, 07:23 PM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

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
Code:
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
Code:
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, 07:31 PM   #3
nevarlen
Member
 
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, 03:55 AM   #4
bp12345
Member
 
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.
 
  


Reply



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 12:42 PM
Resizing linux partition saiz66 Linux - Newbie 1 09-16-2004 08:05 PM
resizing the linux partition tzvik Linux - Software 2 04-30-2003 05:53 AM
resizing the linux partition tzvik Linux - Newbie 3 04-30-2003 02:25 AM
Resizing linux partition tanchu Linux - Hardware 1 03-16-2003 11:05 AM

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

All times are GMT -5. The time now is 07:02 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
Open Source Consulting | Domain Registration