1827385 Members
4236 Online
109963 Solutions
New Discussion

Re: swap space

 
SOLVED
Go to solution
Jeff Hagstrom
Regular Advisor

swap space

How do I add swap space to the swap area?
4 REPLIES 4
Joseph C. Denman
Honored Contributor

Re: swap space

I normally use sam to handle swap and dump devices.

sam>disk and file systems>logical volumes

create a new swap device.

...jcd...
If I had only read the instructions first??
Robin Wakefield
Honored Contributor

Re: swap space

Hi Jeff,

It might be worth looking at the man page for a general overview:

man 1m swapon

Rgds, Robin.
linuxfan
Honored Contributor
Solution

Re: swap space

Hi Jeff,


If you are creating a device swap,

lvcreate -L size -C y -r n /dev/vgname
swapon /dev/vgname/lvname

(modify your /etc/fstab with)
/dev/vgname/lvname ... swap defaults 0 0

Otherwise the device swap won't be activated on subsequent reboots.

But before you can increase the swapspace, check the kernel parameter maxswapchunks
(Maximum swap space that can be configured on a machine is maxswapchunks*DEV_BSISE*swchunk) Defaults for DEV_BSISE is 1024 and for swchunk it is 2048.

To check the configured swap space, do swapinfo -atm

So if your maxswapchunks is 1024, the maximum swap space you can configure is 2GB.

-HTH
Ramesh
They think they know but don't. At least I know I don't know - Socrates
Pasarakoda Dharmarao
Occasional Contributor

Re: swap space

Hi Jeff,
Use SAM, it is easy and straight forward to use.
I think to create extra swap (device), you do not have to touch /etc/fstab. Which is used for swap(file systems).
You can also select (with SAM), to be activated at every boot time.

You can use later, "swapinfo -tm" and also to use the SWAP (full) use the instruction as proposed by other friends.

The command line instructions are as mentioned by
other friends.

Best regards,
./Rao