Operating System - HP-UX
1838622 Members
1998 Online
110128 Solutions
New Discussion

Re: Changing Primary Swap

 
Vito Sarducci
Regular Advisor

Changing Primary Swap

How can I change my mirrored primary swap to another lvol that is a larger disk size without having to do a makerecovery? Here is the scenario

Primary Mirrored
lvol1 lvol1
lvswap2 1.5gb lvol2 5gb
lvswap3 lvol3

I want to change lvswap2 to match lvol2 in mirror?

the lvlnboot says lvswap2 is my primary?

If I change the lvlnboot file to match the mirror config, is the primary affected, and if i reboot will this hose my server since it is looking for lvswap2 and i removed it in the lvlnboot and changed it to another name?

What is the best way to change this on the fly? Can this be done? Help?

Chris
chrisam@rocketmail.com
Lifes too short to stress out, Enjoy every day you have on earth!
3 REPLIES 3
Uday_S_Ankolekar
Honored Contributor

Re: Changing Primary Swap

Hello.
You can not change Primary Swap. You can create a secondary swap instead.
--USA-
Good Luck..
JAYAMOHAN.V.D
Occasional Advisor

Re: Changing Primary Swap

hi,
if ur aim is to incraese the size of the swap due to the insufficient swap space, its better to add a secondary device swap with a high priority like 1.
regards
jayamohan
Peggy Fong
Respected Contributor

Re: Changing Primary Swap

Hi

lvol2 is usually by default primary swap but you say that lvswap2 is your primary.

You can change your primary swap to lvol2 if that is already a swap device. To do this remove lvswap2 from lvlnboot:

lvrmboot -s lvswap2 vg00

Add lvol2 as primary swap in the lvlnboot area:

lvlnboot -s lvol2 vg00

If dump is defined to swap, you might need to reconfigure it as well...lookup up the lvlnboot command.

Edit /etc/fstab to make sure that lvol2 is not in there as secondary swap and add the other swap areas (lvswap2 and lvswap3) if they are not there.

Reboot your system to make sure that the changes take place correctly and verify your swap after your system reboot. Use glance or swapinfo command, etc.

That will at least make lvol2 primary if that's what you are trying to do.

Hope that helps some,
Peggy