Friday, January 25, 2013

how to create SWAP online HP UX 11.31

Friends,

We got a call for increasing swap online two days back. i was not aware of this thta how to do it. so taken help of Great Mr. Google, and HP docs to read about it.

finally tried the same and got the result of swapinfo -tam proper or correct. we did it as swap was getting fully utilized and we need to add the swap. we made it like a file system and then mounted the same on swap with a priority of 2. as 1st was the priority of swap which was made at the time of installation of server.

#vgdisplay
#lvdisplay

before creation of swap space check whether you have space with you in any VG, as we can make swap on any VG (eg. if we have vg00 and vg01 only) then we can make swap on any of these VG. keeping in mind the performance of a VG and I/O also. so it is also good if we create swap file on second VG or VG which is not too much loaded.

#############

create an LV as required like 2 GB.

#lvcreate -L 2048 -n swap2 vg02

#swapon -p 2 /dev/vg02/swap2

now put an entry in /etc/fstab \, like below:-


/dev/vg02/swap2     swap2   pir=2  0 0

save the file using :wq!

and come out. now #mount -a or #mount swap2

now you can see the added space in swapinfo -tam output.

#swapinfo -tam

Thanks for the day,
Cheers love sharing
Thanks a lot for your visits.

 

No comments: