Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-01-2006, 05:14 PM
|
#1
|
Member
Registered: Nov 2005
Location: Egypt
Distribution: Fedora 17 KDE
Posts: 393
Rep:
|
how to expand linux partition & how much swap do i I need?
hello
i have linux installed for over 5 months now without new install and it is running out of space and actually i want to solve the problem without reinstalling
i want to increase the size of the partition holding linux by using the free space on the other drives without affecting them
is that possible
and here is how my 80GB hard drive look like
http://www.boomspeed.com/darkknight/freespace.jpg
the other thing is how much space is needed for the swap drive as i have 700 MB swap drive
Thanks in advance.
|
|
|
05-01-2006, 06:21 PM
|
#2
|
Bash Guru
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852
|
Manipulating partitions can be done with parted, or its GUI version qtparted. I'm not sure how good it is at splitting existing partitions though, as I've never used it for that personally.
Note, you won't "increase the size of your linux partition" this way, but you will gain one or more extra Linux-formatted partitions that you can transfer files to. Moving existing partitions around on a disk can be really tricky (read, dangerous).
A good rule of thumb is to make your swap partition equal to your physical memory. Use more (up to 2x) if you have little physical memory to start with or often use memory-hogging programs such as graphic editors. 700mb is a pretty good middle ground.
Last edited by David the H.; 05-01-2006 at 06:23 PM.
|
|
|
05-01-2006, 06:27 PM
|
#3
|
LQ Guru
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that.
Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700
Rep:
|
In the old days swap used to be twice the size of ram. Reason was ram was expensive. Today it is pretty cheap overall. Normally if you have 256meg or more ram then maybe 128meg swap is fine. Best way to determine is after running linux for a period of time run the top command and see if any free ram is left and see if swap is being used. May increase to whatever but keep in mind swap is consider slow versus the price of ram today. Add more ram would make the system run better overall.
To resize I would download an ISO of System Rescue CD from and burn to a cd. http://freshmeat.net/projects/systemrescuecd/
Only about 140meg if I remember. Boot with that and use the qtparted tool. Check out the link for qtparted and see if it can do what you need to do. On say reiserfs it can resize by expanding or shrinking but the begining blocak can never be moved. So you can't shrink a partition before the reiserfs one and then try to move it to fill the gap. It just not able to do that. http://qtparted.sourceforge.net/
Note: Even if you have qtparted installed you cannot resize a mounted partition. It must be unmounted before it can be resized.
Brian1
|
|
|
05-01-2006, 07:27 PM
|
#4
|
Bash Guru
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852
|
Quote:
Originally Posted by Brian1
In the old days swap used to be twice the size of ram. Reason was ram was expensive. Today it is pretty cheap overall. Normally if you have 256meg or more ram then maybe 128meg swap is fine.
|
That's true, but then again, disk space is also pretty cheap these days, so there's no real reason not to have a large swap space either. You may not use it normally, but it could come in handy on occasion when you're working with really large amounts of data.
That's why I suggested equal-to-ram. It's not as much as was necessary in the past, but, assuming he doesn't have gigabytes of it, it's a good, easy to remember compromise.
|
|
|
05-02-2006, 05:56 AM
|
#5
|
Member
Registered: Nov 2005
Location: Egypt
Distribution: Fedora 17 KDE
Posts: 393
Original Poster
Rep:
|
Thank you very much for your replies i can not be any happier
i will try them as soon as i can but first i would like to ask about the mounting trick
where are the RPM based programs installed and if i can mount the directory on another partition as it is possible in window$ so it would be physically on another drive and logically on the linux partition
|
|
|
05-03-2006, 06:20 PM
|
#6
|
Bash Guru
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852
|
Nearly all programs get installed to /usr and its subdirectories. And yes, it's quite easy to have it on a different partition or drive. I have it set up that way myself, in fact. All you need to do is set up fstab so that '/usr' is the mount point for the partition.
I'm not sure how easy it would be to change your current setup to that though. *Probably* all it would take would be to mount the partition to a temporary mount point, copy all of your current /usr files to it, then remount it as /usr in place of the originals. It would probably be much easier to boot into a live CD or something to do it however, since bad things might happen if you're running your regular system at the time.
Maybe someone else can give you better advice about this though.
|
|
|
All times are GMT -5. The time now is 04:02 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|