Operating System - HP-UX
1833767 Members
2453 Online
110063 Solutions
New Discussion

Re: create secondary swap

 
Vick10
Advisor

create secondary swap

I added a secondary swap in HPUX11.23, with command:

#/usr/sbin/swapon /dev/vg01/lvswap2

After this my swapinfo looks liek this now:

# /usr/sbin/swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4096 1603 2493 39% 0 - 1 /dev/vg00/lvol2
dev 5000 0 5000 0% 0 - 1 /dev/vg01/lvswap2
reserve - 1948 -1948
memory 2037 1605 432 79%
total 11133 5156 5977 46% - 0 -

Both swap are showing as PRI=1, how do I change the /dev/vg01/lvswap2 to PRI=2 without reboot.


10 REPLIES 10
john123
Trusted Contributor

Re: create secondary swap

I dont think u can change the priority once ypou enabled it.. U may have wait till the next reboot...

swapon -p could have used for this instead of just swapon

regards
John
Ganesan R
Honored Contributor

Re: create secondary swap

Hi,

Try this..

swapon -p 2 /dev/vg01/lvswap2
Best wishes,

Ganesh.
Vick10
Advisor

Re: create secondary swap

# swapon -p 2 /dev/vg01/lvswap2
/bin/ksh: swapon: not found
# /usr/sbin/swapon -p 2 /dev/vg01/lvswap2
/usr/sbin/swapon: /dev/vg01/lvswap2 is already enabled for paging.
Ganesan R
Honored Contributor

Re: create secondary swap

Hi,

You can change the priority through SAM. But I think it will be effective after you reboot the server.
Best wishes,

Ganesh.
Venkatesh BL
Honored Contributor

Re: create secondary swap

I don't think you can do it without reboot.
Venkatesh BL
Honored Contributor

Re: create secondary swap

The latest 11.31 release provides a 'swapoff' feature that will let you remove the swap device without reboot. So, you could achieve this with that.
http://docs.hp.com/en/5992-4174/ch04s05.html
Suraj K Sankari
Honored Contributor

Re: create secondary swap

Hi,

You have to take a reboot to reset swap PRI=1 to PRI=2 no other option.

Suraj
Ninad_1
Honored Contributor

Re: create secondary swap

Hi,

You would need to reboot the server.
One important thing prior to reboot - please add the entry of the swap device in /etc/fstab (with the PRI set to 2), so that the secondary swap will persist to be enabled across reboots.

Regards,
Ninad
Sagar Sirdesai
Trusted Contributor

Re: create secondary swap

You have to wait for a reboot .
But before that you need to edit the /etc/fstab file amd change priority for this swap lvol to 2.

Sagar
Vick10
Advisor

Re: create secondary swap

Reboot