Operating System - HP-UX
1832240 Members
2499 Online
110041 Solutions
New Discussion

easiest way to change vg00 partition maps using extra disk

 
SOLVED
Go to solution
IH_2
Advisor

easiest way to change vg00 partition maps using extra disk

Hi

Sorry to ask such basic questions. I tried searching, but couldn't find anything (not very good with keyword search, I guess)

I have an HPUX 10.20. recently it came to my attention that there isn't enough swap space allocated on this system (whoever configured it only gave 512Mb for a system with 4G RAM!). I'm not sure if this is a problem, but given the standard swap allcation being 1.5-2x RAM, it must be crippling the performance of the system? (or, if it really doesn't matter, then I can keep it as-is)

There are many unused spaces on other lvols (/opt has 7Gb and is only using 1.2G, /usr has 3.5G and only using 1.2G, etc), and I am comtemplating reallocating space to give more swap space.

I also have an identical unused hard drive as the vg00 on the system (unmounted, unconfigured, unformatted) available at my disposal.

so.. I thought, there must be an easy, fast, and safe way to backup/remap lvol sizes/recover the system using the two drives.

What would be the best method given this luxury? I also do have a tape drive available.

I am relative newbie admin... I know some basic maneuvers, but nothing really beyond the routine... (very little experience messing with lvols)

Eventually I would like to configure this extra drive to mirror key partitions and/or /home, but until the, I can do whatever with it.

Thanks for any help...
13 REPLIES 13
Patrick Wallek
Honored Contributor
Solution

Re: easiest way to change vg00 partition maps using extra disk

Before we get too far into this, let's check something:

Run 'swapinfo -tam' and post the results. With this we'll be able to tell if there are any potential swap issues. It will also tell us if you have the 'swapmem_on' kernel parameter set to 1, which would explain only 512 MB RAM.

The 1.5-2x RAM requirement for swap space is an old and, in my opinion, obsolete requirement.
Artyom Voronchihin
Respected Contributor

Re: easiest way to change vg00 partition maps using extra disk

Hello!

Not sure about 10.20, but the easiest way to rebuild vg00 is to create ignite tape (man make_recofery or man make_tape_recovery), boot from the tape and resize volumes during interactive recovery. Ignite-UX should be installed to create the tape.
"Intel inside" is not a label, it's a warning.
MarkSyder
Honored Contributor

Re: easiest way to change vg00 partition maps using extra disk

If you've got 4 Gb it's distinctly possible you're not using any swap space. If you're not having performance problems I'd be inclined not to worry.

The suggestion of rebuilding vg00 with ignite to increase swap is a good one, but the feasibility depends on the size of your root disc. Another recommendation is to spread the swap evenly across your discs. But, as I said above, if you're not having performance problems you may not need to do anything.

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
Trond Haugen
Honored Contributor

Re: easiest way to change vg00 partition maps using extra disk

Apart from what already have been said I would like to add that if you system had had too little swap you would have been experiencing problems. Like console and syslog messages like "cannot fork". Very likely the system has been set up with pseudo swap (swapmem_on 1).
Running HP-UX 10.20 which has been obsolete for some time I guess the likelihood of putting more load on the system isn't too big. Do however check swap usage with 'swapinfo -tam' and post the result.

Regards,
Trond
Regards,
Trond Haugen
LinkedIn
IH_2
Advisor

Re: easiest way to change vg00 partition maps using extra disk

Hi All,

thanks for the replies. here is the result of the swapinfo -tam:

# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 512 0 512 0% 0 - 1 /dev/vg00/lvol2
reserve - 62 -62
memory 2889 944 1945 33%
total 3401 1006 2395 30% - 0 -


and it is correct that we haven't had any panic messages or error messages.

may be I can keep it as-is?
Pete Randall
Outstanding Contributor

Re: easiest way to change vg00 partition maps using extra disk

Definitely - you are not using swap at all so there is no need to change it.


Pete

Pete
IH_2
Advisor

Re: easiest way to change vg00 partition maps using extra disk

Hi All!

thank you all for the messages. seems like the best course of action is the best one: Do nothing!

thanks again!
TwoProc
Honored Contributor

Re: easiest way to change vg00 partition maps using extra disk

I also agree that you don't need to add any swap. I'm just commenting on the question you had about resizing vg00. You don't need to have all swap in vg00. You can have swap in any vg: just add the new swap sections to /etc/fstab and do a "swapon -a". So, what I'm saying here is even if you wanted/needed to add more swap it does not necessarily require a reconfiguration of vg00 to get it.
We are the people our parents warned us about --Jimmy Buffett
IH_2
Advisor

Re: easiest way to change vg00 partition maps using extra disk

Good to know that swap doesn't need to be contiguous space...

Also, how did they (whoever configured this system) manage to disable swap? is there some option when installing the OS?

can you disable swap if you have 2G RAM and still be ok (for a low-load system)?
Trond Haugen
Honored Contributor

Re: easiest way to change vg00 partition maps using extra disk

Each swap area has to be contigious. But you can have several of them "in different places". There just have to be one swaparea on vg00. Often called primary swap.

Swap isn't disabled as such. It is there but just not used yet. The reason for that being that there is more RAM on the system than the OS and processes need.

You can't disable swap altogether. You got to have some. And you got to have 'swapmeom_on 1'. That is what gives you the memory line in swapinfo. It is only make belive.
The philosopy is that if you stick enough RAM in you system to acomdate all your processes you don't ever need to swap. So you configure the system with little swap. But for every process you start HP-UX will need to RESERVE swap. So we invented pseudo swap which tells the OS it has the swap.

Regards,
Trond


can you disable swap if you have 2G RAM and still be ok (for a low-load system)?
Regards,
Trond Haugen
LinkedIn
TwoProc
Honored Contributor

Re: easiest way to change vg00 partition maps using extra disk

As Trond has told you, swap must be contiguous. However, you can have more than one, and the "secondary" (or even trinary) swap areas can be located inside of any volume group. So, my point is, if you need more swap, there is no reason to tear down vg00, you can just add more swap to the system.

Suppose you have (or create) a volume group called "vg02", then create a 6gig lvol in it, and the lvol is called "lvol1".

Just add the following line to the /etc/fstab file:

/dev/vg02/lvol1 ... swap defaults 0 0

Then, issue the command:

swapon -a

Next you can view your new swap with:

swapinfo -tam

You'll see your new swap area listed, and now part of the swapspace.




We are the people our parents warned us about --Jimmy Buffett
Howard Marshall
Regular Advisor

Re: easiest way to change vg00 partition maps using extra disk

I agree that he doesn't need to add any paging space, but,

Where is his dump space located? If its primary swap which I think is default on 10.20, will it stop dumping when it gets to the end of lvol2 or will it just keep right on going and dump over lvol3 and overwrite the root file system?

Just a thought before everyone gives IH a blessing and something happens to panic the system and he cant recover.

Does anyone know for certain how 10.20 dump behaves on a panic?

H
Patrick Wallek
Honored Contributor

Re: easiest way to change vg00 partition maps using extra disk

If HP-UX attempts to dump memory to the dump space, and the dump space is too small, you will get a partial dump. It will NOT continue writing and overwrite anything on the next lvol. HP-UX is smarter than that!