Operating System - HP-UX
1827293 Members
3731 Online
109717 Solutions
New Discussion

A question about device swap space

 
Wang,MinJie
Super Advisor

A question about device swap space

Hi all
I have a question
Can I extend device swap space and how?
Thx
7 REPLIES 7
Ivan Krastev
Honored Contributor

Re: A question about device swap space

Hi ,

Create new logical volume:
#lvcreate -L xxx /dev/vg00
insert in /etc/fstab:
/dev/vg00/lvolxx ... swap pri=2 0 0
Activate swap:
#swapon -a
Verify:
#swapinfo -mt

You can do it with SAM also.


regards,
ivan

Wang,MinJie
Super Advisor

Re: A question about device swap space

Hey Ivan
I appreciate your help
But what I mean is /dev/vg00/lvol2
Can I extend it?
Ivan Krastev
Honored Contributor

Re: A question about device swap space

/dev/vg00/lvol2 can be changed only with Ignite backup/restore.

Best way is to add additional swap volume.


regards,
ivan
Zeev Schultz
Honored Contributor

Re: A question about device swap space

Hi Wang,

3 ways -
- simpliest one
as mentioned earlier, additional swap volume

- harder
if you have additional disk,then can create on it vg00 with larger lv02 (swap)

OR
- sofisticated one

using ignite's make_tape_recovery and recovering vg00 with enlarged swap

Zeev
So computers don't think yet. At least not chess computers. - Seymour Cray
Bill Hassell
Honored Contributor

Re: A question about device swap space

There is no need to extend swap, just add another volume. Extending the primary swap area is very complicated and an error could destroy your system disk. To add more swap, simply use the swapon command - you'll need an empty lvol. Note that this is temporary and the extra swap disappears as soon as you reboot. Keep the new swap permanent by adding the new lvol to fstab as a swap device.


Bill Hassell, sysadmin
George Liu_4
Trusted Contributor

Re: A question about device swap space

It is not that hard to extend a swap space in the same volume. But you have to reboot your system to do it. Just extend the volume as normal filesystem, make it swap, and reboot.
DCE
Honored Contributor

Re: A question about device swap space



Swap should be contigous - that is why you should either create a new lvol or use ignite...........