Operating System - HP-UX
1832536 Members
7626 Online
110043 Solutions
New Discussion

Re: error increasing swap

 
M.Thomas
Frequent Advisor

error increasing swap

# swapinfo -atm
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4096 0 4096 0% 0 - 1 /dev/vg00/lvol2
dev 8192 0 8192 0% 0 - 1 /dev/vg00/lvswap1
dev 8192 6899 1293 84% 0 - 0 /dev/vg00/lvswap2
dev 5120 4974 146 97% 0 - 0 /dev/vg00/lvswap3
reserve - 13339 -13339
memory 19222 7373 11849 38%
total 44822 32585 12237 73% - 0 -
#
# lvcreate -C y -r n -L 25000 -n lvswap4 /dev/vg00
Warning: rounding up logical volume size to extent boundary at size "25008" MB.
Logical volume "/dev/vg00/lvswap4" has been successfully created with
character device "/dev/vg00/rlvswap4".
lvcreate: Not enough free physical extents available.
Logical volume "/dev/vg00/lvswap4" could not be extended.
Failure possibly caused by contiguous allocation policy.
Run the "lvextend" command to create space on the Logical Volume.
# swapon -p 0 /dev/vg00/lvswap4
swapon: The kernel tunable parameter "maxswapchunks" needs to be increased to add
paging on device /dev/vg00/lvswap4.

how do i find how much contiguous space is available on a VG?

Thanks

Thomas
9 REPLIES 9
siva0123
Trusted Contributor

Re: error increasing swap

Thomas

what is the o/p of vgdisplay -v /dev/vg00.

It seems that you dont have enough free space in vg vg00.

If that is the case you have to add a new disk and try it by extending vg00.

Please post the o/p of vgdisplay.


Thanks,
Siva
siva0123
Trusted Contributor

Re: error increasing swap

Run vgdisplay -v /dev/vg00.

Look for the line

Available PE : XXX some nos.

Look for the
PE Size : XX Mbytes.

Multiply Available PE*PE Size

That will give you the available free space in the VG.

Thanks,
Siva
DCE
Honored Contributor

Re: error increasing swap



In addition, the system is telling you to increase a kernel parameter

swapon: The kernel tunable parameter "maxswapchunks" needs to be increased to add
paging on device /dev/vg00/lvswap4.


You need to increase the aboce referenced parameter (maxswapchunks) I beleive you will have to reboot the stystem to make the change effective
siva0123
Trusted Contributor

Re: error increasing swap


It is
Free PE's and not
Available PE's

You can use vgdisplay /dev/vg00 without the -v option.

Thanks,
Siva
Jaime Bolanos Rojas.
Honored Contributor

Re: error increasing swap

M.Thomas,

If I remember good the allocation policy for primary swap in vg00 is contiguous, meaning that probably you have something written after lvswap3.

Create dev swap on a different vg, that should fix your issue.

Regards,

Jaime.
Work hard when the need comes out.
M.Thomas
Frequent Advisor

Re: error increasing swap

can this be on a SAN VG? i mean the disks residing on SAN

Thanks

Thomas
siva0123
Trusted Contributor

Re: error increasing swap

Yes ,

I hope you can create a swap device in other disks too but the thing is while creating the LV i think you have to create is contiguous using -C option.

Thanks,
Siva
M.Thomas
Frequent Advisor

Re: error increasing swap

OK i was able to create 20G. since it is looking for contiguous space. but what should be the value for the maxswapchunks now? my current value as follows

# kmtune |grep -e chunk
maxswapchunks 16384 - 16384
swchunk 2048 - 2048
voliomem_chunk_size 65536 - (64*1024)
Patrick Wallek
Honored Contributor

Re: error increasing swap

Go ahead and set maxswapchunks to the maximum value allowed. That way you don't have to worry about it in the future.