cancel
Showing results for 
Search instead for 
Did you mean: 

Want to increase swap space

 
Brett Simpson
Frequent Advisor

Want to increase swap space

I have the following swap space defined on lvol2. The actual amount of space available on lvol2 is 86000M. I have a request to increase the swap to 49M. If I want to use the space on lvol2, do I need to remove the current swap and increase it?

Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 16777216 0 16777216 0% 0 - 1 /dev/vg00/lvol2
reserve - 16777216 -16777216
memory 66971440 16067492 50903948 24%
6 REPLIES
Dennis Handly
Acclaimed Contributor

Re: Want to increase swap space

Please provide the -tam numbers, there are just too many digits in your Kb numbers. :-)

Do you really need that much more swap?

>swap to 49M

That should be G?
James R. Ferguson
Acclaimed Contributor

Re: Want to increase swap space

Hi Brett:

> If I want to use the space on lvol2, do I need to remove the current swap and increase it?

You won't be able to expand 'lvol2' since primary swap requires contiguous logical volume physical extents. This doen't matter, tough, since a secondary device swap can be created and activated (with 'swapon') quite easily.

There are any number of threads in this forum that offer mechanistic details and preferences for configuring secondary device swap. Search and you shall be amply rewarded.

Regards!

...JRF...
SoorajCleris
Honored Contributor

Re: Want to increase swap space

> If I want to use the space on lvol2, do I need to remove the current swap and increase it?

If you wnat to use it on lvol2 you should increase it.

Its a tough job as lvol2 should be contiguous.

There are methods to increase it, online and offline ( but risky as you will be playing with root disk)

As JRF said , you can have a secondary swap enabled easly. I think you must have configured your lvol2 as dump device also. You should always plan the size properly when you manage swap devices.

#swapinfo -tam will be helpful to give better suggetions.

Regards,
Sooraj
"UNIX is basically a simple operating system, but you have to be a genius to understand the simplicity" - Dennis Ritchie
Kranti Mahmud
Honored Contributor

Re: Want to increase swap space

Hi Brett,

There are 2 ways to increase the swap space :

1. By SAM

SAM > Disk and File Systems > Swap > Actions

You can add the Device Swap or File System Swap. Check this document-ID : KBRC00002148 for document about 'how to increase system swap'

2. By command line

a. Create the logical volume for your secondary swap:

# lvcreate -L 128 /dev/vg14

NOTE: "-L 128" is the size of desired swap

b. Verify the logical volume:

# lvdisplay /dev/vg14/lvol15

c. Use SAM to declare your new secondary swap or use the command line:

# swapon /dev/vg14/lvol15

d. Verify it has been added in "/etc/fstab" when using SAM, or add it manually
when using the command line.

Example:

/dev/vg14/lvol15 . swap defaults 0 0

Check the below link for more details:
http://docs.hp.com/en/B2355-90950/ch06s03.html

Rgds-Kranti
Dont look BACK as U will miss something INFRONT!
Brett Simpson
Frequent Advisor

Re: Want to increase swap space

Thanks for your responses. I understand how to increase swap. I misread some values on lvol2 and realize that I'll just add another swap space.
Mike Miller_8
Regular Advisor

Re: Want to increase swap space

Take a look at the swapon command.
You could just add file system swap as well.
- Just a thought.