- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- lvextend primary swap
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
Forums
Discussions
Discussions
Discussions
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
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
05-08-2006 10:41 PM
05-08-2006 10:41 PM
I am going to do this soon, and I am just wondering if I should expect any problems? I am also wondering if the new space becomes available automatically, or will it take a reboot?
My primary swap is /dev/vg00/lvol2, as is usual. I do have enough free contiguous extents, I am armed with an Ignite-UX tape (or two), and I am familiar with the lvlnboot command. Running 11.11 on the server in question.
I am looking for some of the not-so-obvious or subtle problems, or any "battle" stories from the field where a lesson was learned.
Thanks much!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2006 10:51 PM
05-08-2006 10:51 PM
Re: lvextend primary swap
You cannot extend primary swap, without re-installing the operating system, because the first three filesystems need to be contigeous. There are get-arounds, but these are not supported by HP.
A better way to do this would be to create an additional disk swap. You may need to increase the maxswapchunks kernel parameter to accomodate the extra swap.
Hope this helps,
JASH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2006 11:01 PM
05-08-2006 11:01 PM
Re: lvextend primary swap
lvcreate -C y -r n /dev/vgxx
Make sure you have kernel tunable maxswapchunk set right. Then just pu this swap device in use.
swapon -av
Put it in fstab to make it swap space at boot time. Like. follows.
/dev/vgxx/lvolx ... swap pri=x 0 2
priority should be same as primary swap. This in turns makes swapping round robin and is good.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2006 11:35 PM
05-08-2006 11:35 PM
Re: lvextend primary swap
So if your new swap partition is /dev/vg00/newswap then do:
crashconf /dev/vg00/newswap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2006 11:45 PM
05-08-2006 11:45 PM
Re: lvextend primary swap
see the doc attached for more info.
Cheers,
Awadhesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2006 03:04 AM
05-09-2006 03:04 AM
Re: lvextend primary swap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2006 11:11 AM
05-15-2006 11:11 AM
Re: lvextend primary swap
So, here are the overall steps I took:
1) I took time, in advance, to shuffle disk space on my system drives. That included breaking some mirrored LVs, a few pvmoves(1m), even creating a temporary "stub" logical volume, and finally reestablishing the mirrors.
2) Ultimately I ended up with this physical layout at the beginning of the system disks:
lvol1
lvol2
contiguous free space
lvol3
other LVs
At this point all LVs were mirrored between two system drives. I had even ran lvlnboot -R, even though that is supposed to run automatically after every pvmove(1m) affecting vg00.
3) At that point I did an lvextend on lvol2:
lvextend -l
4) lvol2 simply took the available contiguous free space, no questions asked
5) The system did not automatically recognize the newly available swap space
6) I rebooted, and the system swap & dump was now bigger
I would NOT recommend this process to anyone inexperienced with LVM. The complicated part is in the first step: shuffling things around on the system disks. If anyone is really curious, I can posts the steps I took.
There is also a great deal of risk involved, because you don't really know how the system will react when lvol2 suddenly becomes bigger. I would not be doing this on a system with high swap utilization - at least not at runlevel 3, maybe go to single user mode first.
As far as just adding a 2nd swap space... In my opinion there is one problem with that: I will end up with two swap spaces that are NOT next to each other on disk - one will be at the beginning of the disk (lvol2) and another at the end (the new swap volume). From what I understand, this is not a good idea from a performance stand point. I am sure that there is a reason why primary swap has to be contiguous. By creating a new swap space I will essentially break up the contiguity.
Maybe I am way off on that last point, so if you do not agree, please reply. Do tell me why having two swap spaces at different physical locations on the same disk is OK. Thanks!
P.S. I do realized that I could have saved myself the reboot by simply creating a new LV in the contiguous free space behing lvol2, and using that as the new swap. This was only a matter of personal choice.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2006 12:28 PM
05-15-2006 12:28 PM
Solution> As far as just adding a 2nd swap space... In my opinion there is one problem with that: I will end up with two swap spaces that are NOT next to each other on disk - one will be at the beginning of the disk (lvol2) and another at the end (the new swap volume). From what I understand, this is not a good idea from a performance stand point. I am sure that there is a reason why primary swap has to be contiguous. By creating a new swap space I will essentially break up the contiguity.
Back when memory was measured in megs (not gigs), swap space was a critical part of the OS and swap performance was a big issue. So big, that Unix would define the importance of swap areas (priority) and use round-robin for equal priority. Having swap spaces close together was of some importance, decades ago.
Today, swap is the worst possible feature of a virtual memory machine. Application users cannot tolerate the massive delays caused by deactivating processes, then moving pages out to swap areas. The impact is so damaging to performance that disk performance and contiguous space is simply unimportant. When more RAM is needed by a top priority program, other programs are deactivated as the available memory approaches zero. Once the amount of RAM is too small, portions (pages) of the program(s) are moved to swap. But because memory is being reorganized, spinlocks will occur, effectively stopping all activities on all processors until the new memory layout is stabilized. This affects all processes and users on the system at the same time.
The key is the swap rate...a handful of pages per second is not usually noticed, dozens of pages will make the system seem sluggish, and hundreds of pages will make your server run like a Windows XP system with 64megs of RAM (ie, 15 minutes to boot up, 5 minutes to start Excel).
Now that's not to say that a highly interactive system won't benefit from swapping. When there is a lot of "think" time, applications can easily be deactivated and paged out in a small RAM system because the time needed to reinstate the process is relatively short. I ran about 2000 users on a 256meg system where 90% of the work was elm and LaserROM (aka, Instant Information). Active swap space usage was over 2000 megs but the page out rate was 1 to 5 pages/sec average. No one noticed.
But a modern database works much differently. There is a large coordination program that gets and puts the data from small clients. If the main program is too large to fit into RAM, it will be constantly paging and everyone would feel the pain.
So "swap performance" is an oxymoron -- it is a conflict in terminology in today's computers. Just add swap space as needed from any volume group. You won't be able to measure any difference whether the swap is on a big VG00 primary and 10 different areas scattered all over your disk farm. If you start using the swap space at a high rate, your users (and managers) won't care about your swap layout -- the only fix is more RAM.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2006 01:22 PM
05-15-2006 01:22 PM
Re: lvextend primary swap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2006 03:29 PM
05-15-2006 03:29 PM
Re: lvextend primary swap
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-15-2006 04:52 PM
05-15-2006 04:52 PM
Re: lvextend primary swap
Agreed, it doesn't make sense to spend 2 hours rearranging vg00 and then rebooting... unless you are a perfectionist, or you have an older machine with a slow system disk and a small amount of RAM.
On the bright side, I proved to myself that primary swap can be extended.
Thanks for the replies! I think we beat this one to death.