1752565 Members
5350 Online
108788 Solutions
New Discussion юеВ

Re: Extending Swap Space

 
SOLVED
Go to solution
Vipin K Gupta
Occasional Advisor

Extending Swap Space

Hi,

I need to analyse the impacts for extending swap space.

I am having 8GB swap space. There 3 secondary space.
For extending swap should I extend the secondary space or create a new secondary swap?

Do I need contigous space for creating new secondary space?

What are other prerequisites apart from free PE's available for extending swap?

Thanks!!!
18 REPLIES 18
Manix
Honored Contributor

Re: Extending Swap Space

Hello Vipin !!

You can not extend swap lv on a fly , yes lvol can be extended but "swapon -a " wont see it , you do need contagious extents to extend that lvol & reboot is needed as well.

Best idea is to use equal sizes disk chucks a
on a similar device preferably to create newswap devices and run "swapon -a" after making entries in /etc/fstab.

"lvcreate -c y -b n -n XXXM lvolname " is used
to create a new swap device.

Do post further queries.

Thanks
Manix

HP-UX been always lovable - Mani Kalra
Manix
Honored Contributor
Solution

Re: Extending Swap Space

Hey !! just correcting the "switches" to be used

# lvcreate -C y -r n -L 8192 -n lvolN /dev/vgXX
# swapon -p /dev/vgXX/lvolN

And do check is maxswapchunks large enough for the increased swap; if not, you will need to build a new kernel and reboot.
HP-UX been always lovable - Mani Kalra
Vipin K Gupta
Occasional Advisor

Re: Extending Swap Space

Hi,

Thanks for the reply.

Here I would like to ask a question

DO I need a separate disk for creating new swap.

I am having 4 disk out of which 2 are mirror disks.

I need to create 16 GB swap lv, and I am having 15 GB available in 1disk and 13 GB available on another disk.

What to do in this case.
Manix
Honored Contributor

Re: Extending Swap Space

No you don`t need separate disks to create secondary swap .You have 2 disks which are mirrored to each other it means they must be boot disks ( i guess so ) others must have some
data.

send output for vgdisplay -v vg00 & swapinfo -tam


Do you enabled 'swapmem_on' for "pseudo swap" 75% of your physical memory will be counted by the kernel as available swap space.

Thanks
Manix
HP-UX been always lovable - Mani Kalra
Manix
Honored Contributor

Re: Extending Swap Space

>>this is good one too - ))

>>I have assigned points to 0 of 15 responses to my questions.
HP-UX been always lovable - Mani Kalra
Vipin K Gupta
Occasional Advisor

Re: Extending Swap Space

/root# vgdisplay -v vg01
--- Volume groups ---
VG Name /dev/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 12
Open LV 12
Max PV 16
Cur PV 4
Act PV 4
Max PE per PV 4341
VGDA 8
PE Size (Mbytes) 4
Total PE 17360
Alloc PE 6512
Free PE 10848
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg01/swap1
LV Status available/syncd
LV Size (Mbytes) 1000
Current LE 250
Allocated PE 500
Used PV 2

LV Name /dev/vg01/swap2
LV Status available/syncd
LV Size (Mbytes) 1000
Current LE 250
Allocated PE 500
Used PV 2

LV Name /dev/vg01/tmp
LV Status available/syncd
LV Size (Mbytes) 1000
Current LE 250
Allocated PE 500
Used PV 2

LV Name /dev/vg01/home
LV Status available/syncd
LV Size (Mbytes) 500
Current LE 125
Allocated PE 250
Used PV 2

LV Name /dev/vg01/localcw
LV Status available/syncd
LV Size (Mbytes) 900
Current LE 225
Allocated PE 450
Used PV 2

LV Name /dev/vg01/orahome
LV Status available/syncd
LV Size (Mbytes) 500
Current LE 125
Allocated PE 250
Used PV 2

LV Name /dev/vg01/oravar
LV Status available/syncd
LV Size (Mbytes) 200
Current LE 50
Allocated PE 100
Used PV 2

LV Name /dev/vg01/patrol
LV Status available/syncd
LV Size (Mbytes) 1024
Current LE 256
Allocated PE 512
Used PV 2

LV Name /dev/vg01/openv
LV Status available/syncd
LV Size (Mbytes) 2000
Current LE 500
Allocated PE 1000
Used PV 2

LV Name /dev/vg01/EMC
LV Status available/syncd
LV Size (Mbytes) 800
Current LE 200
Allocated PE 200
Used PV 1

LV Name /dev/vg01/swap3
LV Status available/syncd
LV Size (Mbytes) 3000
Current LE 750
Allocated PE 750
Used PV 1

LV Name /dev/vg01/lvol10
LV Status available/syncd
LV Size (Mbytes) 3000
Current LE 750
Allocated PE 1500
Used PV 2


--- Physical volumes ---
PV Name /dev/dsk/c3t2d0
PV Status available
Total PE 4340
Free PE 3234
Autoswitch On
Proactive Polling On

PV Name /dev/dsk/c3t3d0
PV Status available
Total PE 4340
Free PE 3915
Autoswitch On
Proactive Polling On

PV Name /dev/dsk/c8t2d0
PV Status available
Total PE 4340
Free PE 1034
Autoswitch On
Proactive Polling On

PV Name /dev/dsk/c8t3d0
PV Status available
Total PE 4340
Free PE 2665
Autoswitch On
Proactive Polling On
Vipin K Gupta
Occasional Advisor

Re: Extending Swap Space

Kindly check the output of vgdisplay.
Manix
Honored Contributor

Re: Extending Swap Space

got late due to network disconnect .. yes i may see that there are three swap devices swap 1 ,2 & 3 of ( 1 + 1 + 3 = 5 gigs ), rest would be primary swap.

It would be better if you have created couple of equally sized swap devices rather then spreading them around.

Please post output for swapinfo -tam as I requested earlier to help you further.

Thanks
Manix

HP-UX been always lovable - Mani Kalra
Vipin K Gupta
Occasional Advisor

Re: Extending Swap Space

(root):/root# swapinfo -atm
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 3000 0 3000 0% 0 - 1 /dev/vg00/swap
dev 1000 0 1000 0% 0 - 0 /dev/vg01/swap1
dev 1000 0 1000 0% 0 - 0 /dev/vg01/swap2
dev 3000 0 3000 0% 0 - 0 /dev/vg01/swap3
reserve - 8000 -8000
memory 32768 12373 20395 38%
total 40768 20373 20395 50% - 0 -