1824206 Members
4379 Online
109669 Solutions
New Discussion юеВ

Swap

 
Donovan Israel Murray
Occasional Advisor

Swap

I recently installed 11.0 on a RP5470.

Not sure what happened but I ended up with a situation where I have two swap area lvol2 & lvol3. Thus my root is now on lvol4. I only wanted to have one swap area on lvol 2. Is there any way to roll lvol2 & lvol3 into one thus forming lvol2 and to have my root fs on lvol3?

Any help is appreciated.

Rgds
4 REPLIES 4
Patrick Wallek
Honored Contributor

Re: Swap

Hmmm....I'm not sure what you did, but I think the only "easy" way to do what you want is to make a make_tape_recovery backup (2 is probably advisable) of your system. Once that is done, boot from the make_tape_recovery tape, interact with the installation, and from there you can modify your VG00 and LVOL configuration to suit what you want.

As far as I know there is no way to do this on the fly, especially the renameing of an LV.

If you just want to have 1 swap area, you could remove lvol3, and then extend lvol2 to take the space that lvol3 had used. You will still have you / as lvol4 though. I know of no easy way to rename that. These steps would probably need to be done form lvm maintenance mode or single user mode so that the swap areas are not active while you are doing your switching.

Hope this helps.
Mike Hassell
Respected Contributor

Re: Swap

Donovan,

I don't know of way to combine both lvol2 & lvol3 into one contiguous swap lvol. While it is possible to rename lvols, since you're working with vg00, this tends to be problem as you need to unmount the lvols to rename them, hence losing some of the commands you need to do so. For example if this was vg01 you could do the following:

1. unmount the filesystem
2. rename the LV device files (mv)
3. edit the fstab
4. remount the filesystem.

While you may be able to pull this off with a recovery cd on vg00, I wouldn't recommend it.

I would say go with Patrick's advice and create a make_recovery_tape and edit your lvol config after booting from that ignite tape and ensure it's done cleanly.

Hope that helps.

-Mike
The network is the computer, yeah I stole it from Sun, so what?
PIYUSH D. PATEL
Honored Contributor

Re: Swap

Hi,

You should go ahead with patrick's advice of making a Ignite backup and then booting thro that tape and changing the configuration.

But if you havent loaded & configured the softwares, I would recommend you to reload the OS again.

Changing the lvol configuration on the root vg is very risky...ie merging the lvols and renaming them since it may give you problems.

Piyush
Shahul
Esteemed Contributor

Re: Swap

Hi

I am not going to analyze that how it happenend. Now U want to combine lvol2 and lvol3.. Right? It is possible.. Follow these.

Plan for an outage
Shutdown the system. While rebooting, disturb the auto boot and come to main menu. Then give this command
main menu>bo pri

This will ask whether U want to interact with ISL or not, Select yes. Then

ISL>hpux -lm

Now system will come to lvm maintenance mode. Then

#vgchange -a y vg00
#vgdisplay -v /dev/vg00

Here U note down the exact size of lvol2 and lvol3, Suppose lvol2 is xxxMB and lvol3 is yyyMB, Then

#lvrmboot -r /dev/vg00/lvol4
#lvrmboot -s /dev/g00/lvol3
#lvrmboot -s /dev/vg00/lvol2
#lvrmboot -d /dev/vg00/lvol2
#lvrmboot -d /dev/vg00/lvol3
#lvlnboot -v

Make sure that lvol2 and lvol3 are not listed. Then
#lvremove /dev/vg00/lvol2
#lvremove /dev/vg00/lvol3
#lvcreate -L -n lvol2 /dev/vg00

Here size = (xxx+yyy)

Then

#cd /dev/vg00
#mv lvol4 lvol3
#mv rlvol4 lvol3
#lvlnboot -b /dev/vg00/lvol1
#lvlnboot -s /dev/vg00/lvol2
#lvlnboot -d /dev/vg00/lvol2
#lvlnboot -r /dev/vg00/lvol3
#lvlnboot -R
#lvlnboot -v

Make sure that all lvols are listed here properly. If not use lvlnboot commands again.
#cd /etc
#vi fstab

Do necessary changes

I Hope now U are OK...

Do this thing carefully.. Because U are playing with root VG.

Best of luck
Shahul