Operating System - HP-UX
1845943 Members
3965 Online
110250 Solutions
New Discussion

Decrease swap with Veritas

 
Duncan Galbraith
Frequent Advisor

Decrease swap with Veritas

This sounds so simple but I simply don't see an easy way of doing it :(

I have an 11i system configured using Veritas LVM with a primary device swap LV of 2G.
I can't afford the disk space and don't care about the swap so I would like to reduce the swap size to say 500Mb.
I don't mind rebooting.

I've tried:
vxassist shrinkby swapvol 1000M
and I get an error back:
vxvm:vxassist: ERROR: non-contigous shrinks are not allowed for root mirrors

Thanks in advance...
7 REPLIES 7
Bill Hassell
Honored Contributor

Re: Decrease swap with Veritas

Primary swap space cannot be changed while the system is running. This includes single user mode because swap space is an extenstion of memory. You'll need to use Ignite/UX to reinstall your root disk and interactively specify the new size of swap. You can also use this re-install to resize / and /stand if necessary as well as the size of any other partition.


Bill Hassell, sysadmin
D Block 2
Respected Contributor

Re: Decrease swap with Veritas

I'm not sure if you can simply reduce the size of swap lvol2 without playing w/ your re_installation using IgnITE.

pls, before you start chaning primary swap, have an igniTE of your system. you can boot of the ignite tape, and re-size your swap.

of course, your mirror's will be broken at this moment.

good luck
Golf is a Good Walk Spoiled, Mark Twain.
Duncan Galbraith
Frequent Advisor

Re: Decrease swap with Veritas

Thanks guys.
I'll re-install then but I have to say that this seems to be a rather drastic measure to do such a small thing :(
Claire Greathead
Occasional Contributor

Re: Decrease swap with Veritas

Hi

I have managed to change the primary swap by creating additional swap elsewhere giving it the same priority, rebooting, move to the new swap, reboot, delete the old swap, reboot and then you can recreate swap in the old area to the size you want.

Rgds

Claire
Duncan Galbraith
Frequent Advisor

Re: Decrease swap with Veritas

That sounds like a good idea Claire.
Was your swap under a Veritas logical volume and if so could you give suggested comands for removing it once the second swap volume had been created.
If not don't worry as I have already started the re-install.
Ted Buis
Honored Contributor

Re: Decrease swap with Veritas

How much RAM do you have? Do you have psuedo swap enabled (swapmemon=1)? I would be very cautious about removing swap, until I had figured out the consequences of doing this. A swap space of 2GB is not at all unreasonable. Swap plus 50% to 85% of RAM will be all the virtual address space in your system. So, that could mean that some programs just can't run!
Mom 6
David Child_1
Honored Contributor

Re: Decrease swap with Veritas

Duncan,

I'm sure you are already aware, but since you didn't mention it I thought I would bring it up. Does this server have only 2Gb of physical memory? If so you can reduce your swap to 500Mb as long as the swapmem_on kernel parameter is set to '1'. If you have more than 2Gb physical memory you will run into problems.

The other thing to keep in mind about such a small amount of physical memory is that, depending on what you are running, you may run into a paging situation. The bad thing about swapmem_on=1 is when you start paging your system runs very, very slowly.

Just my 2-cents,
David