UbuntuThis forum is for the discussion of Ubuntu Linux.
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.
I had just installed gparted , not used yet
I have a problem , at the time of installation i havent created necessary swap space , my linux partition contains 30GB with ext2 filesystem
I'm fully having this , but my question is with the above mentioned tool can I recreate swap space from this 30GB , like 20GB as user space and rest 10 as swap space . Can I?
Distribution: pclos2010.12, Slack1337 DebSqueeze, +50+ other Linux OS, for test only.
Posts: 9,310
Rep:
A working ( mounted ) partition cannot be changed,
so you will have to reduce the 30 GB partition with
an external tool, a live cd, e.g. the Gparted live
cd. And create swap on the new empty space.
If you have 1 GB RAM, I would suggest 1..2 GB swap.
10 GB will never be used.
.....
Linux can use a swap file instead of a swap partition. That involves a bit of extra overhead, so it isn't usually the best choice. But at this point you might find it the best choice. You could allocate that swap file in the existing partition while running in that partition. No need to resize by rebooting to a liveCD.
If you do decide to correct the partitioning, you can boot a liveCD run Gparted and shrink the existing partition and create a swap partition.
I don't agree with the implication made by knudfl that a 10GB swap partition is necessarily wrong nor that the proper size for the swap partition depends on the amount of physical RAM you have.
But it is unlikely that 10GB is a good choice for the swap partition size when you are taking that space away from a partition of only 30GB. It is likely your swap partition size should be much smaller than 10GB.
The best swap partition size depends primarily on how much rarely used data will be tied up in virtual memory by server programs, background processes, applications you've switched away from, etc. For an ordinary home user all that typically adds up to less than one GB. But I don't know what you intend to run on your Linux system. Maybe you intend a lot of virtual memory tied up in rarely running background processes.
There is no performance difference between swap partition vs swap file. That disparity went away with 2.4 kernels. Here is an example of how to do allocate a swap file.
If you are running o.k. now without a swap at all, 1 Gig should be more than sufficient. A single 10 Gig swap is unnecessary - and unusable. On x86 the default system will only use 2 Gig of any extent - RHEL incorporate a patch to extend this, but I'm not aware of Ubuntu desktop using similar. Multiple swaps can be allocated should they be found to be necessary.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.