cancel
Showing results for 
Search instead for 
Did you mean: 

Increasing Swap space..

kunjuttan
Super Advisor

Increasing Swap space..

How can I increase the swap space..
7 REPLIES
g3jza
Esteemed Contributor

Re: Increasing Swap space..

Hi,
in fact, you can not increase the swap space. You need to create a new one.
Depends on what type of swap do you want to create: device swap / filesystem swap.

for device, which is the fastest:
1) create new LV first - #lvcreate -L -n -C y /dev/

2) enable the swap to be used - #swapon /dev//
kunjuttan
Super Advisor

Re: Increasing Swap space..

May i know yy to use C y options with lvcreate command.
g3jza
Esteemed Contributor

Re: Increasing Swap space..

Device swap must be created as a contiguous LV. This means that there are no gaps in the allocated physical extents that the LV is made of.

I forgot that you should also add the new swap area entry to the /etc/fstab
g3jza
Esteemed Contributor

Re: Increasing Swap space..

like this in your /etc/fstab:


/dev/vg01/lvol1 ... swap pri=0 0 0
kunjuttan
Super Advisor

Re: Increasing Swap space..

hi thanx...

If i am not using that -C y,is there is any problem??
g3jza
Esteemed Contributor

Re: Increasing Swap space..

I've never tried to create lvol for swap as non-contigious, there should be at least some performance-degradation in the already degradated performance when using swap devices as memory. the '-C y' option is recommended.
kunjuttan
Super Advisor

Re: Increasing Swap space..

Thanks..Issue Solved