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.