1819851 Members
3015 Online
109607 Solutions
New Discussion юеВ

Re: swap

 
SOLVED
Go to solution
Fadia Almarei
Super Advisor

swap

Dear All
i want more details in how to extend my swap area , please in details,either in command line or using sam
fadia.marei
13 REPLIES 13
Ranjith_5
Honored Contributor

Re: swap

Hi Fadia,

Extending your primary swap area is not that easy, as it needs to be contiguous and in the first 2GB of your disk. This will be a long and tricky job.

Much easier to simply add another swap/ Secondary swap area, you can do this online without a reboot (first option above will need a reboot).

Instead you can go on as follows.

Create a LV of required size and then add it to the /etc/fstab file;

/dev/vg00/lvolX / swap defaults 0 0

Use swapon -a and that's allll.

swapinfo -mt will show you the newly activated swap.

If you want to go with SAM,

Run SAM
go to Disks and Filesystems -->Swap-->Actions-->Add Filesystem Swap/Device Swap as required.

regards,
Syam

regards,
Syam
Steven E. Protter
Exalted Contributor

Re: swap

I would add a secondary swap area a higher priority number therefore lower system priority. Do it from sam, it will force a boot, so be prepared.

Thats the best way to go.

If swap is already twice RAM, get memory. There is no substitute for enough memory.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ravi_8
Honored Contributor

Re: swap

Hi,

#lvcreate -L /dev/vgxx

make an entry in /etc/fstab

dev/vgxx/lvolx / swap defaults 0 0

#swapon -a

will enable the swap /dev/vgxx/lvolx

SAM-->Disks and Filesystems -->Logical volumes-->Actions-->Add Filesystem, choose the swap as the file system type and priority if required. (machine will reboot)
never give up
Fadia Almarei
Super Advisor

Re: swap

when i choose sam and then open the file system swap and it appears for me a list of file system and there is no swap found so which one should i use
fadia.marei
Fadia Almarei
Super Advisor

Re: swap

syam,
i want to know this tricky way to extend my primary swap
fadia.marei
Ravi_8
Honored Contributor
Solution

Re: swap

Hi,

you can't extend primray swap, unless you use ignite. You can add swap.

# swapinfo

what the o/p says, you can't have a system without swap.

usually /dev/vg00/lvol2 will be the swap.
never give up
Fadia Almarei
Super Advisor

Re: swap

how to use ignite to extend swap
fadia.marei
bhavin asokan
Honored Contributor

Re: swap

hi,

a swap must be contiguous.you can use the following steps to configure a secondary swap.
change parameters like cg name as per your requirement.

lvcreate -n swap1 -C y -r n /dev/vgXX
lvextend -L size /dev/vgXX/swap1 /dev/dsk/cXtXdX

swapon -f -p 1 /dev/vgXX/swap1

see information by swapinfo command

swapinfo -tam

then vi /etc/fstab
add the following entry.

/dev/vgXX/swap1 . . . swap pri=1 00


regds,

bhavin asokan
Honored Contributor

Re: swap

hi,

the tricky way for primary swap is defined in the installing and updating hpux 11 & 11i documents.see page no:184 & 185 in installing and updating hpux 11i pdf file or page no:122 and 123 in installing and updating hpux 11 .you can download it from docs.hp.com

see the following link

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=785327


regds,
Nguyen Anh Tien
Honored Contributor

Re: swap

Let care at:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=91325
This thread explain how kernel parameter is set to use full zise of swap.
HTH
Tienna
HP is simple
Fadia Almarei
Super Advisor

Re: swap

the voulme group i use to make a secondary swap area must be the same as that the / partition found in ?
fadia.marei
Ranjith_5
Honored Contributor

Re: swap

Hi Fadia,

A filesystem swap is always a secondary swap,which can coexist with other files on a file system. It can be configured dynamically and usually used when device swap is full.Usually , a low priority level is attached with file system swap.You can use a directory in a filesystem that is used for filesystem swap. Also you can put an upper limit on the filesystem swap if you dont want the swap to grow beyond a certain limit.

You can also use other device swap areas as secondary swap space.However, it is always better idea to keep additional swap areas on a different physical disk.

The following command creates a filesystem swap ona filesystem mounted on the /FS_SWAP. The command puts a maximum limit of 500MB on the swap area. The actual directory that will be used for the swap space is /FS_SWAP/paging

#swapon -l 500M /FS_SWAP

Regards,
Syam
Ranjith_5
Honored Contributor

Re: swap

Hi Fadia,

More inputs..

To create swap space on a logical volume lvol3 in volume group 4 use the following swapon command.

#swapon /dev/vg04/lvol1

after you use the swapon command the swap area is created and it is immediately available to use aas a swap area. If a LV is already having a filesystem use -f option with swapon command to forefully make swap area.

to make a disk /dev/dsk/c1t2d0 exclusively for swap space use.

#swapon /dev/dsk/c1t2d0

See the detailed procedure here. Spent 10-15 mins and go through the follwoing.You can clear all your doubts.

http://docs.hp.com/en/B2355-90672/ch06.html


regards,
Syam