Operating System - HP-UX
1820647 Members
2778 Online
109626 Solutions
New Discussion юеВ

to replace disk wiht swap device

 
Steve Jones_12
New Member

to replace disk wiht swap device

# >swapinfo -a
Kb Kb Kb PCT START/ Kb

TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME

dev 2097152 0 2097152 0% 0 - 1 /dev/vg00/lvol2

dev 14680064 0 14680064 0% 0 - 1 /dev/vgswap/swap1

reserve - 1982656 -1982656


/dev/vgswap/swap1 is on a Jamaica disk, the plan is to replace the Jamaica enclosure with XP512 array.

I made a procedure for this

1. add XP512 disk to vgswap
2. make lv on XP512 disk
3. use SAM to make swap device on XP512 disk
4. comment out the "/dev/vgswap/swap1" (on Jamaica) in /etc/fstab
5. reboot server
6. reduce the LV on Jamaica and remove Jamica disk from vgswap

I don't have the experience with HPUX swap setup, and would like to have the suggestions from HPUX gurus in this forum.

thanks in advanced.
4 REPLIES 4
Michael Steele_2
Honored Contributor

Re: to replace disk wiht swap device

Please use 'swapinfo -tam' and verify Total PCT USED. (* 0% ??? doesn't look right *)

You may need to adjust MAXSWAPCHUNKS by adding in more swap so why not reduce /dev/vgswap/swap1 before adding in the XP disk.

Also your XP may take care of Bad Block relocation so check, if so use the '-r n' option in lvcreate:

a) lvcreate -L #### -n lvol_name -C y -r n /dev/vg##

Note: -r is bad block relo.

So I am suggesting not to use SAM. Next command would be:

b) swapon -f -p 1 /dev/vg##/lvol_name

c) update /etc/fstab and reboot to verify.
Support Fatherhood - Stop Family Law
Steve Jones_12
New Member

Re: to replace disk wiht swap device

Michael,

you mentioned to reduce /dev/vgswap/swap1. is there any specific command instead of editing /etc/fstab ?
suki
Frequent Advisor

Re: to replace disk wiht swap device

Hi,
After rebooting,

If no other lvol is on the /dev/vgswap VG . You do vgexport by.

1.#vgchange -a n /dev/vgswap
2.#vgexport /dev/vgswap.

If some other Lvol is on /dev/vgswap VG. You need to remoive only the /dev/vgswap/swap1 lvol by.
1.# lvremove /dev/vgswap/swap1.


HTH.
Steven E. Protter
Exalted Contributor

Re: to replace disk wiht swap device

For the inexperienced, the best way to go is sam.

as root.

sam

disk and whatever it says.

swap.

you will see current swap information displayed.

Prior to doing the disk switch, deactivate the current swap and create a new swap area of reasonable size, preferably on a local disk.

Then once your disk array is in, everything is cool.

If you don't have local disk, then deactivate the current swap, shut the system down and create a new swap after booting the system. The boot may take some time and some apps might not open for lack of resources.

You don't have to deactivate the swap, but doing something about it will make your transitions smoother. Nothing bothers me more than thinking a system is hung because the swap area has gotten wacked. Except maybe for kernel panics. They suck pretty bad too.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com