Operating System - HP-UX
1850432 Members
4486 Online
104054 Solutions
New Discussion

Re: 10.20 and 11.00 on same machine

 
JJ_4
Frequent Advisor

10.20 and 11.00 on same machine

I have an up and running HP-UX 10.20 installation.

I have 3 physical disks.

I want to select my boot disk at startup.

How to install HP-UX 11i on my 3rd disk?

Is it as straight forward as :-

1. boot from HP-UX 11i install CD.
2. Select appropriate disk for install (currently totally empty i.e. no lvols etc.).
3. Install.

I would like to be able to use the existing 10.20 lvols in the new 11i installation - simple / straight forward??

JJ
Not enough Zappa makes you sad.
11 REPLIES 11
Patrick Wallek
Honored Contributor

Re: 10.20 and 11.00 on same machine

What you want to do should work fine.

After the installation, I would set your primary boot path to one of the OS disks (10.20 or 11) and the secondary boot path to the other OS disk. Then when you reboot you can interrupt the boot process and boot up on whichever OS version you want.

If you want to see your 10.20 VGs on the 11.0 installation you will need to:

On the 10.20 VG you want to see on 11.0:

vgexport -m mapfilename -p -v /dev/vg??

and make sure you get the mapfilename file somewhere that you can transfer it to the 11.0 disk when you finish the install.

On the 11.0 machine:


mkdir /dev/vg01
mknod c 64 0x0?0000 /dev/vg01/group
vgimport -m mapfilename -v /dev/vg01 /dev/dsk/c?t?d0

where /dev/dsk/c?t?d0 is the disk with the 10.20 VG that you want.

That should do it for you.
JJ_4
Frequent Advisor

Re: 10.20 and 11.00 on same machine

I will try that probably tommorow - and then submit points ;)
Not enough Zappa makes you sad.
boley janowski
Trusted Contributor

Re: 10.20 and 11.00 on same machine

JJ,

I did the same thing when I was upgrading my workstation to 11.0 and still have it set up. I also wrote a script and aliased it for shutdown purposes. Here is the script if you want it, its pretty basic:

#!/sbin/sh
#Title :swap_OS
#Date :05.02.2001
#Author :boley

disk1="/dev/dsk/c0t5d0"
disk2="/dev/dsk/c0t4d0"
mtp1="/play"
mtp2="/playagain"
vg1="/dev/vg01"
vg2="/dev/vg02"
vgmap1="/root/vg01.map"
vgmap2="/root/vg02.map"
os="`uname -r | cut -c 3-`"
newos=0


exp()
{
umount ${mtp1}
umount ${mtp2}
vgchange -a n ${vg1}
vgchange -a n ${vg2}
vgexport -v -m ${vgmap1} ${vg1}
vgexport -v -m ${vgmap2} ${vg2}
}


imp()
{
mkdir ${vg1} ${vg2}
mknod ${vg1}/group c 64 0x010000
mknod ${vg2}/group c 64 0x020000
vgimport -m ${vgmap1} ${vg1} ${disk1}
vgimport -m ${vgmap2} ${vg2} ${disk2}
vgchange -a y ${vg1}
vgchange -a y ${vg2}
vgcfgbackup ${vg1}
vgcfgbackup ${vg2}
mount -a
}


ext()
{
bdf | grep ${mtp1}
echo "Exiting"
}


xshut()
{
if [ ${newos} -eq "1" ]
then
case $os in
11.00)
setboot -p 2/0/7.6.0
echo "setboot -p 2/0/7.6.0"
;;
10.20)
setboot -p 2/0/1.3.0
echo "setboot -p 2/0/1.3.0"
;;
esac
fi

cd /
#shutdown -r -y now
}


mainin()
{
clear
echo "\n\n\n\tMenu For Handeling VG01 And VG02 At Bootup"
echo "\n\n\t\t1)\tvgimport '${disk1}' And '${disk2}'"
echo "\n\t\tx)\tExit"
echo "\n\n\t\tPlease Make Your Selection -> \c"
read ana
case $ana in
1)
imp
;;
e|E|EXIT|exit|x|X)
ext
;;
*)
mainin
;;
esac
}


mainout()
{
clear
echo "\n\n\n\tMenu For Handeling VG01 And VG02 At Shutdown"
echo "\n\n\t\t1)\tvgexport '${disk1}' And '${disk2}'"
echo "\n\t\tx)\tExit"
echo "\n\n\t\tPlease Make Your Selection -> \c"

read ans
case $ans in
1)
exp
;;
e|E|EXIT|exit|x|X)
ext
;;
*)
mainout
;;
esac
}


newmain()
{
clear
echo "\n\n\n\tMenu For Shutdown And Rebooting To A Different O/S"
echo "\n\t\tYou Are Currently On HP-UX ${os}"
case $os in
11.00)
echo "\n\t\t Do You Want To Reboot Into HP-UX 10.20? [y|n] -> \c"
;;
10.20)
echo "\n\t\t Do You Want To Reboot Into HP-UX 11.00? [y|n] -> \c"
;;
esac
read ans

case $ans in
y|Y|yes|YES)
newos=1
echo "\n\t\t Do You Want To 'export' The NON-VG00 Volume Group's? [y|n] -> \c"
read anx
case $anx in
y|Y|yes|YES)
mainout
xshut
;;
n|N|no|NO)
xshut
;;
esac
;;
n|N|no|NO)
ext
;;
*)
newmain
;;
esac
}


allmain()
{
clear
echo "\n\n\n\tReboot/Import VG's Main Menu"
echo "\n\t\t1)\t'reboot'"
echo "\n\t\t2)\t'vgimport' Volume Group's"
echo "\n\t\t3)\t'vgexport' Volume Group's"
echo "\n\t\tX)\tExit"
echo "\n\n\tPlease Make Your Selection -> \c"
read anz
case $anz in
1)
newmain
;;
2)
mainin
;;
3)
mainout
;;
e|E|EXIT|exit|x|X)
ext
;;
*)
allmain
;;
esac
}


allmain

you will need to modify your variables at the top and the h/w paths set under the "xshut" option.

Good luck
JJ_4
Frequent Advisor

Re: 10.20 and 11.00 on same machine

Thanks to both Patrick and Boley for their help so far.

I now have PRI set to my new 11i and ALT to 10.20.

However, (as always), the specific VG I want to share is ... /dev/vg00 from the 10.20 onto the 11i.

Ideally I would like to on 10.20
"vgexport -m -p 10.20_vg00.map -v /dev/vg00"

and on 11i

"vgimport -m 10.20_vg00.map -v /dev/vg01 /dev/dsk/c2t6d0".

All I need is one of the filesystems in vg00 to be visible under 11i (yep my 1 Gig home directory with mail).

However, as it is the root volume group it is always active! Is there away around this?

As an aside, Boley provided slightly different vgexport command syntax. Boleys' method will actually remove the VG from the system, whereas Patricks' version keeps it.
Not enough Zappa makes you sad.
boley janowski
Trusted Contributor

Re: 10.20 and 11.00 on same machine

JJ,

Sence you will not be able to export the vg00 and import it into the box at that point, I would suggest moving/copying the file system you want and putting it on a different vg so that you can export/import that disk. if you plan to continue to use both o/s's.
Patrick Wallek
Honored Contributor

Re: 10.20 and 11.00 on same machine

You can run the vgexport of your 10.20 vg00 any time. Even though you get the message 'vgexport: Volume group "/dev/vg00" is still active.' the mapfile will still be created and you can then get that mapfile to your 11.0 disk and do your import.
JJ_4
Frequent Advisor

Re: 10.20 and 11.00 on same machine

Thanks again Boley and Patrick (points to Patrick).

I ran the vgexport command and didn't believe that it contained so little; it does produce the mapfile (I searched and found a previous forum answer detailing to boot into maintenance mode and then run the vgexport .. the same output was produced).

I have two questions remaining :-

1. By vgimporting my vg00 from 10.20 into vg01 on 11i, will I have any issues when I go back into 10.20 (i.e. as it is on 11i with vg01 VG name, will this be cause 10.20 issues)?

2. The mknod command requires the minor number :-

mknod c 64 0x0?0000 /dev/vg01/group

I assume that this could be just about any number, but would have thought that :-

mknod c 64 0x010000 /dev/vg01/group

(which matches my second VG under 10.20) would be preferable.
Not enough Zappa makes you sad.
boley janowski
Trusted Contributor

Re: 10.20 and 11.00 on same machine

pretty cool patrick,

I didn't think that it would work that way, now I know, first oppertunity I get to try it out, I will.

Man I love this forum!!
Patrick Wallek
Honored Contributor

Re: 10.20 and 11.00 on same machine

1) If the only part of your 10.20 vg that you are touching with 11i is your home directory stuff, then I think you should be OK. Just make sure that when you are booted on 11i that you don't mess up any of the other 10.20 LVs, like /stand, /var, /usr, etc. If you want to be really safe, after you import the 10.20 VG, just mount your /home LV and don't even mount the others. That way you can't mess them up.

2) The minor number really doesn't make any difference. I usually just increment by one when I'm creating a new VG. I don't think it will really make a difference what number it is on your 10.20 setup.
JJ_4
Frequent Advisor

Re: 10.20 and 11.00 on same machine

Hi,

For completeness this is the actual route I took and it so far appears to have been succesful - although 11i has hung on me several times;).

On the 10.20 machine :-

vgexport -m mapfilename -p -v /dev/vg00
this appears to error with
"Volume group still active", but does produce the required (11i gives the same error but produces no output), but relatively simple mapfile :-

1 lvol1
2 lvol2
3 lvol3
4 lvol4
5 lvol5
6 lvol6
7 lvol7
8 lvol8

I copied the mapfile to another location for subsequent locating on 11i.

Then booted up into 11i and did the following:

mkdir /dev/vg02
mknod /dev/vg02/group c 64 0x020000
vgimport -m mapfilename -v /dev/vg02 /dev/dsk/c0t6d0
vgchange -a -y /dev/vg02

Change the fstab entry for the required filesystem (note that the filesystem type maybe hfs not vxfs).
mountall

and there you have it.

Thanks for all the help from the forum.

JJ
Not enough Zappa makes you sad.
Simon Evans_1
New Member

Re: 10.20 and 11.00 on same machine

This is exactly what I want to do but whenever I perform the import I get:

2x boot disks (both HPUX10.20)

Boot from 1 and then import the other vg00 as vg01 to enable me to mount the other system filesystems but...

# vgimport -s -p -v -m /dev/vg01

Beginning the import process on Volume Group "/dev/vg01".
Volume group "/dev/vg01" is still active.

I't can't be active. This is the other OS boot disk and isn't mounted anywhere. There is no mention of it in the lvmtab.

What am I missing ??? Is there something I have to do when booted from the alternate disk ?

Any help appreciated.