- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Extending Swap Space
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-29-2011 12:54 AM
тАО01-29-2011 12:54 AM
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!!!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-29-2011 01:27 AM
тАО01-29-2011 01:27 AM
Re: Extending Swap Space
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-29-2011 01:31 AM
тАО01-29-2011 01:31 AM
Solution# 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-29-2011 02:37 AM
тАО01-29-2011 02:37 AM
Re: Extending Swap Space
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-29-2011 03:10 AM
тАО01-29-2011 03:10 AM
Re: Extending Swap Space
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-29-2011 03:16 AM
тАО01-29-2011 03:16 AM
Re: Extending Swap Space
>>I have assigned points to 0 of 15 responses to my questions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-29-2011 03:22 AM
тАО01-29-2011 03:22 AM
Re: Extending Swap Space
--- 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-29-2011 04:15 AM
тАО01-29-2011 04:15 AM
Re: Extending Swap Space
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-29-2011 05:23 AM
тАО01-29-2011 05:23 AM
Re: Extending Swap Space
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-29-2011 06:19 AM
тАО01-29-2011 06:19 AM
Re: Extending Swap Space
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 -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-29-2011 09:18 AM
тАО01-29-2011 09:18 AM
Re: Extending Swap Space
Edit /etc/fstab and add the entry for each of them like this.
/dev/vg??/lv?? ... swap pri=1 0 0
This will enable swap interleaving as primary swap is already set to the default priority of 1.
(lowest number such as 0 gets used first, equal priorities are assigned in round-robin manner).
Further you have 32 Gigs of "pseudo swap" so it means your RAM size should be 50 Gigs which is good , you need to configure swap space at least equal to physical memory.
Check " dmesg | grep -i physical" to check RAM size and make sure you have equal amount of swap.
Look right now 8 Gigs of swap is reserved by some database application i guess.
You have 43 Gigs of free space in vg01 , please go ahead and good amount of swap to make it equal to RAM size ( or as much as you can, i think you need 42 Gigs..- )
Thanks
Manix
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-31-2011 01:06 AM
тАО01-31-2011 01:06 AM
Re: Extending Swap Space
Secondary device swap in your case can be extended on same disk or new disk online with lvextend & swapon -a command. No reboot is required for swapon -a. Then its not necessary for secondary device swap to be contiguous but primary swap has to be.
Thanks & regards,
Kavita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-31-2011 01:37 AM
тАО01-31-2011 01:37 AM
Re: Extending Swap Space
>>you do need contagious extents to extend ..>>that<< lvol
Hello Kavita
Thanks for checking in but these comments were only for "primary swap" that can`t be extended on fly and needs contagious extents ( if possible ..with certain work around )+ reboot.
Not for secondary do check the same -- ))
Thanks
Manix
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-31-2011 02:18 AM
тАО01-31-2011 02:18 AM
Re: Extending Swap Space
Thanks & regards,
Kavita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-31-2011 07:22 PM
тАО01-31-2011 07:22 PM
Re: Extending Swap Space
I just need to extend swap to 32 GB.
I can create a new swap or I can extend the existing secondary swap.
I got confused.
Conclusion - We can extend the existing secondary swap online right???
Thanks
Vipin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-31-2011 11:13 PM
тАО01-31-2011 11:13 PM
Re: Extending Swap Space
Secondary can be extended ( needs reboot after that ) and we need to check what option you used while creating it ( -c y ) & do the things accordingly.
As we already discussed ,create new swap devices .
Thanks
Manix
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-31-2011 11:36 PM
тАО01-31-2011 11:36 PM
Re: Extending Swap Space
I have one doubt,
If i created a secondary swap without -C y option, can i extend the swap with lvextend.
What i understood is.
If i created the secondary swap without -C y option, then i have to do swapoff on that LV.
Then i have to extend the LV
Then i have to do swapon on that LV.
Is my undestanding is ryt?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-01-2011 12:20 AM
тАО02-01-2011 12:20 AM
Re: Extending Swap Space
I am not able to find any HP doc ,supporting that secondary swap can be non - contagious.
But 'swapoff' is not a native in built command & there is patch for 11.31 only (AFAIK).read the link below.
https://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=SwapoffEn
I would still prefer to keep add a new device for -C y option .
Thanks
Manix
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-01-2011 04:35 AM
тАО02-01-2011 04:35 AM