Operating System - HP-UX
1836882 Members
2419 Online
110111 Solutions
New Discussion

Removing Primary Swap and Dump devices

 
SOLVED
Go to solution
Gene Matusovsky
Advisor

Removing Primary Swap and Dump devices

I am trying to move my swap partition. From /dev/vg00/lvol2 on Disk 1 to /dev/vg01/lvol6 on a new disk2 that we just installed.

I removed the partition in /etc/fstab and /etc/checklist. It took me a while but when I tried delete /dev/vg00/lvol2, HPUX suggested I run a lvrmboot -s /dev/vg00. I did this and it looks like everything went OK execpt when I run

swapinfo -mat

Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev - - - - -1 - 0 /dev/vg00/lvol3 disabled
dev 1780 0 1780 0% 0 - 1 /dev/vg01/lvol6
reserve - 470 -470
memory 1604 181 1423 11%
total 3384 651 2733 19% - 0 -

Why is /dev/vg00/lvol3 (my root / partition)listed in this output?
5 REPLIES 5
Michael Tully
Honored Contributor
Solution

Re: Removing Primary Swap and Dump devices

Hi,

To remove the /dev/vg00/lvol2 from swap you still have to reboot the system.

Did you run "lvlnboot -s /dev/vg01/lvol6" to
activate the new primary swap partition? and
"lnlvboot -d /dev/vg01/lvol6" for dump?

Also run 'lvlnboot -v' this will show something
like the below:

# lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c1t15d0 (0/0/1/1.15.0) -- Boot Disk
/dev/dsk/c3t15d0 (0/0/2/1.15.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c1t15d0
/dev/dsk/c3t15d0
Root: lvol3 on: /dev/dsk/c1t15d0
/dev/dsk/c3t15d0
Swap: lvol2 on: /dev/dsk/c1t15d0
/dev/dsk/c3t15d0
Dump: lvol2 on: /dev/dsk/c1t15d0, 0

HTH
-Michael
Anyone for a Mutiny ?
Steven Gillard_2
Honored Contributor

Re: Removing Primary Swap and Dump devices

Let me confirm - you are trying to completely remove your primary swap device and replace it with one secondary swap device. Although not a recommended configuration, this should work as long as swapmem_on is set to 1 (which is the default). I would strongly advise that you leave a primary swap device configured, however. Remember, configuring primary swap on your new vg01 volume will not work - primary swap must be in vg00. Your vg01 volume can only be used as secondary swap enabled via /etc/fstab which you appear to have correct.

As for why lvol3 appears in swapinfo output, this is strange. Double check that lvol3 is not listed as swap in lvlnboot -v output (it should be the root volume by default), and that no entry for swap in /etc/fstab has lvol3 listed. Then reboot your system so the lvrmboot takes effect. After the reboot lvol3 should have disappeared from the swapinfo output.

Regards,
Steve
Santosh Nair_1
Honored Contributor

Re: Removing Primary Swap and Dump devices

It's my understanding that you must have a primary swap device and that it must be on the root VG. So I would suggest creating a small primary swap (maybe lower the priority) and have larger secondary swaps on other VGs.


-Santosh
Life is what's happening while you're busy making other plans
Craig Rants
Honored Contributor

Re: Removing Primary Swap and Dump devices

I agree, you have to have some sort of swap in the root vg or you will not be able to boot because there will be not place to put things. Before you reboot please put some swap on vg00. Also remember that this swap has to be contiguous so don't increase the size of lvol's on vg00 until this swap is created becuase you may not be able to create it then.

GL,
C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Gene Matusovsky
Advisor

Re: Removing Primary Swap and Dump devices



You were all too late, I rebooted the server right after I removed the swap space with the lvrmboot -s /dev/vg00 command.

So the box came up without any primary swap device at all!!! And with out a dump device either. I lost both after I deleted /dev/vg00/lvol2.

The output of statinfo is in my previous post. Michael thanks for the lvlnboot -v command tip. That helped a lot!!! The output of which was...

# lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c1t2d0 (0/0/1/1.2.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c1t2d0
Root: lvol3 on: /dev/dsk/c1t2d0
No Swap Logical Volume configured
No Dump Logical Volume configured

Perhaps the reason was because I had over 4 GIG RAM of memory. And currently 0% of swap space is being used. Still it is strange why swapinfo -ma reported

dev - - - - -1 - 0 /dev/vg00/lvol3 disabled

/dev/vg00/lvol3 is my / root partition with only 80MB of which 50MB was free. Why would /dev/vg00/lvol3 be listed in the swapinfo command?

Because you are all much more experienced in HPUX then me, I decided to promptly. Create a small swap space partition on VG00. Currently I managed to reduce my swap partition on VG00 from 4 gigabyte to 2 gigabytes. Below is the current output of lvlnboot -v

# lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c1t2d0 (0/0/1/1.2.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c1t2d0
Root: lvol3 on: /dev/dsk/c1t2d0
Swap: lvolswap on: /dev/dsk/c1t2d0
Dump: lvolswap on: /dev/dsk/c1t2d0, 0

I think this looks normal.

I would like to thank everybody who replied to my post. I had great learning adventure reconfiguring HPUX Swap space. And I told my VP, "Oh sure I could do it, it's so easy, with SAM". That's the last time I will trust SAM again. In HP/UX defense I must say that the command line messages were great and informative. They always pointed me in the right direction to solve my task, or had me look at another command which solved my problem.

Thanks for all your suggestion it really helped!!!

-Gene Matusovsky