Operating System - HP-UX
1834714 Members
2094 Online
110069 Solutions
New Discussion

How to get vg01 from HP-UX 10.2 to 11

 
SOLVED
Go to solution
Gael Lickindorf
New Member

How to get vg01 from HP-UX 10.2 to 11

in my 9000, I have:
one disk where HP-UX 10.20 is installed (vg00)
one disk where HP-UX 11.00 has been installed
several disks of data with mirroring on vg01

I can see the data (vg01) when I boot with 10.20 but not with 11.

How to access vg01 from HP-UX 11 ?
I think about using vgcfgbackup / vgcfgrestore

How to see/copy some files from one system to the other one ?

How to copy some accounts (login/password) from one system to the other one ?

note: the target is to go for HP-UX 11,
but I'd like to keep the disk with 10.2 just in case

Gael
9 REPLIES 9
James R. Ferguson
Acclaimed Contributor

Re: How to get vg01 from HP-UX 10.2 to 11

Hi Gael:

Take a look at the man pages for 'vgexport' and 'vgimport'. Essentially:

...on 10.20:

# vgexport -p -v -s -m /tmp/vgXY.mapfile

...on 11.x:

# mkdir /dev/vgXY
# mknod /dev/vgXY/group c 64 0xXY0000
# vgimport -s -m /tmp/vgXY.mapfile vgXY
# vgchange -a y vgXY
# vgcfgbackup vgXY

The key is to copy the mapfile to a place where you can get it on both systems. A tape is always fine.

Regards!

....JRF...
Ajitkumar Rane
Trusted Contributor

Re: How to get vg01 from HP-UX 10.2 to 11

I agree with the previous reply except you might want to backup the /tmp/vgXY.mapfile and restore the mapfile after booting from 11.0 if the /tmp is not common filesystem for both 10.x and 11.x.

Goodluck
Amidsts difficulties lie opportunities
Peggy Fong
Respected Contributor
Solution

Re: How to get vg01 from HP-UX 10.2 to 11

In addition to what James posted, you can also import each root disk to the other release so that you have access to the files (passwd, home, etc) in an offline mode.
You can have the root disk for 10.X available on you 11.x system and vice versa.

In fact, if you do this first it makes it easier to import vg01 to 11.x

Boot to 10.20 and export the map file for vg00
(you actually can create a map file manually but we'll save that for another day)
10.20
# vgexport -p -v -s -m /tmp/vg1020.mapfile
it should be a small ascii file so just save it to another system or print out so you can recreate it in vi on 11.X
Using -p will prevent any real export, as will the fact the the vg is activated.


...on 11.x:

# mkdir /dev/vg1020
# mknod /dev/vg1020/group c 64 0xXY0000
# vgimport -s -m /tmp/vg1020.mapfile vg1020
# vgchange -a y vg1020
# vgcfgbackup vg1020

You need to copy the map file from to the 11.X system or recreate the file based on your printout.

You will need mount point for your 10.20 file systems (or whatever you previous version was). I used vg1020 so I would know that is the root disk for the old release.

You could make mount points like:
mkdir /vg1020
mkdir -p /vg1020/root /vg1020/stand /vg1020/tmp
etc until all your mount points for your old release os are there.

Mount all the old file systems.
You can put them in fstab so they are always available when you boot to 11.X or leave them unmounted and mount them when you need them. I left mine up so that I knew there was data on the disks....

You can do the same for 11.X to 10.20 just reverse everything above
on 11.X create the map for vg00 and save the file or print it out.
boot to 10.20
Follow the steps above to create the vg for 11.X (eg. /dev/vg11.X)
Make mountpoints, mount filesystems, put in fstab.

Whenever you boot to an os, the other os will be available to you so that you can sync files up, look at old files to migrate from the old to the new, etc. The old os will not run anything.

Once this is done, then the steps that James listed easier because you now have a file system available to both os's. But even if you don't do this first, the steps are great.

I like having access to the old os right after an upgrade to catch files that need to be updated. Or if needing both environments, having a way to update passwd, home, cron files, etc.

Bill Hassell
Honored Contributor

Re: How to get vg01 from HP-UX 10.2 to 11

One of the easiest methods to import existing volumes is SAM. The LVM commands work well but if you are not comfortable with import/export of volume groups, run SAM, go to Disks, then Volume groups and select Action->Import

From that menu, you will be presented with all the volumes that exist but are unknown to the current system. Even if the volume has multiple disks, they will be shown as a single entity...just pick a name (ie, vg01) and that's it. All the device files will be created automatically.

The logical volumes will have the default names (lvol1, lvol2, etc). If you need non-standard names, you can either rename the device files using mv (be sure you rename the 'r' names too, rlvol1, rlvol2, etc), or you can create a simple map file with just the lvol names, 1 per line in the same order as they were on the original system.

SAM will import all LVM disks including volumes created on 9.04 systems.


Bill Hassell, sysadmin
KapilRaj
Honored Contributor

Re: How to get vg01 from HP-UX 10.2 to 11

hi ,
it's very easy.......
01. boot 11.X ; login as root
02. mkdir /dev/vgXX
03. mknod /dev/vgXX/group c 64 0xXX0000
04. vgimport /dev/vgXX cXtXdX ..........(if you hv more disks in vg put all of them into this list)
05. vgcfgbackup vgXX (optional)
06. vgchange -a y /dev/vgXX

it's ready now........

just mount filesystems accordingly , only diff. is that the device files will have standered names. lvol1 ,lvol2 etc etc.

good luck

kaps
Nothing is impossible
Gael Lickindorf
New Member

Re: How to get vg01 from HP-UX 10.2 to 11

No such device !!!

Here is what I have done:
by the way note the volume group is mandatory at the end of vgexport:
#vgexport -p -v -s -m /tmp/vg1020.mapfile vg00
Beginning the export process on Volume Group "vg00".
Volume group "vg00" is still active.
/dev/dsk/c1t4d0

I transfered the mapfile by ftp from 10.20 to my PC and from my PC to 11 then:

# cp /tmp/vg1020.mapfile /tmp/vg10.mapfile
# mkdir /dev/vg10
# mknod /dev/vg10/group c 64 0x100000
# vgimport -s -m /tmp/vg10.mapfile vg10
vgimport: Cannot open the control file "/dev/vg10/group":
No such device
# ll /dev/vg10
total 0
crw-rw-rw- 1 root sys 64 0x100000 Jun 6 17:53 group

is 0x100000 correct ?
Any suggestion ?
Wieslaw Krajewski
Honored Contributor

Re: How to get vg01 from HP-UX 10.2 to 11

Hi,

Max number of VG is by default equal to 10.
Therefore major number should be between
0x000000 and 0x09000000

Rgds.
Permanent training makes master
Wieslaw Krajewski
Honored Contributor

Re: How to get vg01 from HP-UX 10.2 to 11

Hi again,

Of course the upper limit in my previous answer should be 0x090000.
Next as I well understood your problem you should
export and import vg01, whereas in your last question I have noticed exporting vg00.

Rgds.
Permanent training makes master
Bill McNAMARA_1
Honored Contributor

Re: How to get vg01 from HP-UX 10.2 to 11

You may want to change the maxvgs parameter in the kernel if you want more than 10 VGs.
You want to
ll /dev/*/group
to identify a unique id for the vg.
then
mknod /dev/vgnumber/group c 64 0x(unique.number)0000

Later,
Bill
It works for me (tm)