Operating System - HP-UX
1833460 Members
3044 Online
110052 Solutions
New Discussion

Re: vgimport and swap questions!

 
SOLVED
Go to solution
MAD_2
Super Advisor

vgimport and swap questions!

 
Contrary to popular belief, Unix is user friendly. It's just very particular about who it makes friends with
6 REPLIES 6
MAD_2
Super Advisor

Re: vgimport and swap questions!

Wow, somehow I posted the thread without the question. OK, this is my second attempt, and here is my question:

I am doing the cofiguration part after completing a cold install and was doing the vgimport of all my non vg00 volumes. My /etc/fstab looked like the attached file.

I used the following series of command to complete the import of the non vg00 volume groups:

For each volume group (total of 5)
#= volume group number
mkdir /dev/vg0#
mknod /dev/vg0#/group c 64 0x0#0000
vgimport -v -s -m /tmp/vg0#.rcsdhpmap /dev/vg0#
vgchange -a y /dev/vg0#
mkdir /filesystem
mount /dev/vg0#/lvolnumber_orname /filesystem

My question is, what do I need to do about swap space in the volume groups as shown within /etc/fstab????

I am little confused on that part.

Thanks!

Contrary to popular belief, Unix is user friendly. It's just very particular about who it makes friends with
steven Burgess_2
Honored Contributor

Re: vgimport and swap questions!

Adam

Nothing, the vgimport matches the lvol information against the vgid on each disk.

The lvm information is still on your disks, you are simply re importing them back into the correct volume group

HTH

Steve

take your time and think things through
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: vgimport and swap questions!

If I assume that your old non-vg00 VG's match your new non-vg00 VG'sd then it's very simple. After you have imported the VG's then edit your new /etc/fstab and add into the lines for your secondary swap. They should match your existing old entries. I would suggest that you set the priority on those entries to an equal value but not equal to 1. The primary swap entry is not listed in /etc/fstab and it has a priority of 1.

After making your changes, issue a swapon -a command to include the additional entries. You may have to increase the kernel parameter
maxswapchunks. By the way, you may not even need the additional swap in you are running pseudoswap.
If it ain't broke, I can fix that.
S.K. Chan
Honored Contributor

Re: vgimport and swap questions!

One little comment. After you have done all of the vgimport and "mkdir /filesystem", you may just want to run "mount -a" just to make sure fstab file is good. To answer your question, there is nothing you need to do with the swap entries in fstab, after you've done the vgimport and mount them all, run..
# swapinfo -tam
to make sure they are in. If they are not you may need to run ..
# swapon -p 1 /dev/vg04/lvol1
# swapon -p 2 /dev/vg03/lvol2
Check it again with "swapinfo".
James R. Ferguson
Acclaimed Contributor

Re: vgimport and swap questions!

Hi:

You don't really need to do anything special with the swap devices declared in '/etc/fstab'.

After making your directories, device files and 'vgimport'ing your volume groups you could do:

# mount -a # to mount all filesystems
# swapon -a # to activate all swap devices

Ignore the warnings from the 'mount -a' for filesystems already mounted.

Regards!

...JRF...
MAD_2
Super Advisor

Re: vgimport and swap questions!

Thanks everyone! A. Clay, you were right about a necessary change to my maxswapchunks kernel parameter. I will refer back to my old kernel parameters to make all necessary changes. This is what I got when trying swapon -a:

Enabling device paging on /dev/vg03/lvol2. swapon: The kernel tunable parameter "maxswapchunks" needs to be increased to add paging on device /dev/vg03/lvol2.

Enabling device paging on /dev/vg04/lvol1. swapon: The kernel tunable parameter "maxswapchunks" needs to be increased to add paging on device /dev/vg04/lvol1.
Contrary to popular belief, Unix is user friendly. It's just very particular about who it makes friends with