LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 02-02-2011, 06:16 AM   #1
janakiramulu
Member
 
Registered: Jan 2011
Location: mangalore
Distribution: ubuntu
Posts: 167

Rep: Reputation: 0
making of swap partition is necessary


hi
all
i tried ubuntu 10.4,10.10
in ubutnu 10.4 no need to swap partition separetily(swap>2*ram size)
it will take atomatically
but in ybuntu 10.10,we need to give swap partition size/will it take atomatically

is this swap partition is must?,if i didnt give is there any problem
------------------------------------------------------------------
1q: can we create swap partitions for each logical partition
2q: if there exist no of swap partitions,how to club them/how to remove all expect one
this one get confusing
plz provide any help/site/anything
thanks in advance
 
Old 02-02-2011, 07:33 AM   #2
darkduck
Member
 
Registered: Jan 2011
Location: Cyprus
Distribution: Kubuntu, OpenSuSE
Posts: 502

Rep: Reputation: 26
I don't see why 10.10 has swap partition "as must". never seen this. Where did you take it from?

You can have one swap partition across all you PC. If you have several systems installed, one swap is enough: it will be used by currently booted system.
 
Old 02-02-2011, 07:42 AM   #3
tommylovell
Member
 
Registered: Nov 2005
Distribution: Raspbian, Debian, Ubuntu
Posts: 380

Rep: Reputation: 103Reputation: 103
Quote:
is this swap partition is must?,if i didnt give is there any problem
No, not on a modern Linux system. A long long time ago some applications would check for the existence of swap and complain if there was none.

The notion that you need a swap that is twice your installed RAM size is quite antiquated. That "rule of thumb" made sense when RAM was very expensive. The assumption was that if you spent all of that money on RAM, then you justified the cost based on an anticipated application load with a very large memory footprint, hence you need 2x RAM size to support that large a load on your system. Now that RAM is dirt cheap, you may have more RAM installed than you will ever use. It depends on your application load. So much for the "rule of thumb".

Quote:
1q: can we create swap partitions for each logical partition
I don't understand the question. You can create 32 swap areas (per 'man mkswap'). A swap area can be either a device (a real partition or an LVM Logical Volume) or a file. You can have any combination of swap areas of any size, or no swap at all. If you use a swap file or LVM LV then it would be very difficult (bordering on impossible) to share it between multiple bootable copies of Linux. A swap partition would make much more sense in that case.

Quote:
2q: if there exist no of swap partitions,how to club them/how to remove all expect one
It's very easy to create them and just as easy to eliminate them.

Create,
1. create partition, LVM LV, or file.
2. 'mkswap' that device or file.
3. add it temporarily: 'swapon' the device or file.
add it permanently: add an entry to /etc/fstab, then 'swapon -a'.

Eliminate a swap area
1. 'swapoff' the device or file.
2. remove the entry from /etc/fstab, if one exists.
3. remove the partition, LVM LV, or file.

'swapon -s' will tell you the status of your swap areas as will a 'cat /proc/swaps'.

It's fairly straightforward.

Last edited by tommylovell; 02-02-2011 at 07:47 AM.
 
  


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
Can swap file or a swap partition be mounted and read? Mr-Bisquit Linux - General 3 06-08-2009 02:16 PM
Hard Drive Partition Management - Mandriva Double Partition with Swap File partition moshebagelfresser Linux - Hardware 2 05-23-2008 10:46 AM
Installer has trouble making proper swap partition? General Debian 4 05-16-2007 07:27 PM
Making Kubuntu recognize a new swap partition eqisow Linux - Software 8 01-11-2006 11:36 PM
making Linux use a swap partition Nooooobie Linux - Newbie 7 10-08-2001 12:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

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