1833451 Members
3084 Online
110052 Solutions
New Discussion

Change Primary Swap

 
Vito Sarducci
Regular Advisor

Change 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!
2 REPLIES 2
A. Clay Stephenson
Acclaimed Contributor

Re: Change Primary Swap

Hi,

You were on the right track. Change it using lvlnboot -s xxxxxx where xxxxxx is the swap logical volume. The bad news is that you can't do it on the fly - it takes effect upon the next boot. You must also make certain that the swap logical volume is contiguous. If you need to add swap immediately you can use the swapon command. Man swapon for details.

Clay
If it ain't broke, I can fix that.
Bill McNAMARA_1
Honored Contributor

Re: Change Primary Swap

this is risky, but you can try to issue an lvsplit and then an lvmerge..

LAter,
Bill
It works for me (tm)