- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Adding more 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
Forums
Discussions
Discussions
Forums
Discussions
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
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
08-06-2007 08:56 AM
08-06-2007 08:56 AM
Adding more swap space...
I have available space, about 16GB, I want to use for swap space. Could someone give me commandline instructions on how to do this from scratch?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2007 09:07 AM
08-06-2007 09:07 AM
Re: Adding more swap space...
regards,
ivan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2007 09:17 AM
08-06-2007 09:17 AM
Re: Adding more swap space...
Now edit /etc/fstab and add an entry like this:
/dev/vg01/lvol2 ... swap pri=2 0 0
and save the file. Next execute "swapon -a" and you are done. Man 1m swapon for details.
Now the "gotcha" is that this may fail because the kernel is not configured to utilize the additional swap if this is a version prior to 11.23. You may have to increase maxswapchunks and/or swchunk and build a new kernel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2007 09:22 AM
08-06-2007 09:22 AM
Re: Adding more swap space...
first create a lv
a) To create the volume manager, execute the following command:
lvcreate â l
Then sam....add the swap space...sam... filemamanger..swap..add swap..
then execute swapon -a
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2007 09:59 AM
08-06-2007 09:59 AM
Re: Adding more swap space...
lvcreate -L (size in mb) -C y -r n /dev/vgXX (Creating a logical volume for swap)
edit the fstab file ..ie /dev/vgXX/lvolX ... swap pri=1 0
swapon -a
swapinfo -tam (should show new swap)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2007 02:26 PM
08-06-2007 02:26 PM
Re: Adding more swap space...
lvswap is lv that must be you create for adding swap
# lvcreate -L lv_size -n lvswap /dev/vg00
edit /etc/fstab, add line:
/dev/vg00/lvswap .. swap pri=1 0 0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2007 02:59 PM
08-06-2007 02:59 PM
Re: Adding more swap space...
#kmtune|grep -i chunk
maxswapchunks 16384 - 16384
swchunk 2048 - 2048
Also i would say the swap as a dump device too that will help you collect a full crash dump during a TOC/panic.
Action plan: Add vg16/lv3 to the dump configuration for a total of 23.6 GB dump space
1) Verify vg16/lv3 is strict, contiguous and has bad block relocation policy set
to off.
To change the parameters of an existing swap lvol issue
#lvchange -C y -s y -r n /dev/vg16/lv3
2) Add the new dump lvol in /etc/fstab as shown below:
( ie: /dev/ vg16/lv3 ... dump defaults 0 0 )
3) Edit /etc/rc.config.d/crashconf as below:
CRASHCONF_ENABLED=1
CRASHCONF_READ_FSTAB=1
CRASHCONF_REPLACE=0
4) Issue "/sbin/rc1.d/S080crashconf start" to update the dump devices, it
should return EXIT CODE: 0 for a successful operation.
5) To verify your dump configuration issue "crashconf"
For adding a swap space.
Create a separe vg like vgswap
scsictl -m queue_depth=4 (device name got from step above) # Primary Link
scsictl -m queue_depth=4 (alt. device name for above) # Alternate Link
create LV with the properties mentioned above
To enable the swap from command line;
# swapon -p 1 /dev/vgswap/swap
# swapon -p 1 /dev/vgswap/swap1
# vi /etc/fstab and add a line
/dev/vgswap/swap . . . swap pri=1 0 2
and save
# swapinfo.
Confirm there is no error because of the swap removed
# lvlnboot -v
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2007 02:28 AM
08-07-2007 02:28 AM
Re: Adding more swap space...
You may not have realized this but SAM works from terminal windows if you terminal type is set correctly and the window is a proper size. Try it. Sam can work in both X and telnet windows. This is one of its major strengths.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2007 02:32 AM
08-07-2007 02:32 AM
Re: Adding more swap space...
Create vg01:
pvcreate /dev/rdsk/c25t0d0
pvcreate /dev/rdsk/c25t2d0
vgcreate -s 8 -p 128 /dev/vg01 /dev/dsk/c25t0d0 /dev/dsk/c25t2d0
vgchange -a y /dev/vg01
lvcreate -C y -L 16384 -n lvswap /dev/vg01
/usr/sbin/swapon -f -p 3 /dev/vg01/lvswap
add to /etc/fstab:
/dev/vg01/lvswap ... swap pri=3 0 0
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2007 06:17 PM
08-09-2007 06:17 PM
Re: Adding more swap space...
You need to add additional swap space from your logical volume.
Here are the steps:
lvcreate -L (size in mb) -C y -r n /dev/vgXX/swaplv (Creating a logical volume for swap) (creating contegious and bad block disable)
edit the fstab file ..ie /dev/vgXX/lvolX ... swap pri=1 0
swapon -a (To activate swap)
swapinfo -tam (should show new swap)