Operating System - HP-UX
1754321 Members
3111 Online
108813 Solutions
New Discussion юеВ

Re: boot vg from alt drive?

 
James Ho_2
New Member

boot vg from alt drive?


Hi everyone,

I have an hpux 11 system that I need to dual boot (pri to one network and alt to another). I cloned the root drive to the alt drive using dd. When I boot alt, I kept getting the pri drive, so I pulled out the pri drive. Now the system panics because the vg points to device c3t5d0. Can you tell me how to change the vg to point to c3t6d0?

Thanks!
4 REPLIES 4
Sridhar Bhaskarla
Honored Contributor

Re: boot vg from alt drive?

Hi James,

You cannot simply clone and boot from it. It's because dd will copy everything from the primary drive to the cloned one. Either you have to move the cloned drive to the primary slot or work on it a little bit to fix the issue. To fix the problem, you will need to boot in 'LV Maintenance mode'. Reboot the box. Once it is in BCH, adjust the boot paths and boot from this disk. Interact with ISL while the system is rebooting.

ISL> hpux -lm

Once you are in LV maintenance mode, export the VG and import it back using the correct device file. For ex., if c3t6d0 is the device file of the cloned drive, then

#vgchange -a n vg00
#vgexport -p -v -m /vg00.map vg00
#cat /vg00.map
Make sure it is there. Once it is confirmed, then do
#vgexport vg00
#mkdir /dev/vg00
#mknod /dev/vg00/group c 64 0x000000
#vgimport -v -m /vg00.map vg00 /dev/dsk/c3t6d0
#vgchange -a y vg00
From /etc/fstab, confirm that lvol1, lvol3 are stand and root filesystems. Otherwise note the correct ones.
#lvlnboot -b /dev/vg00/lvol1
#lvlnboot -s /dev/vg00/lvol2
#lvlnboot -r /dev/vg00/lvol3
#lvlnboot -d /dev/vg00/lvol2
#lvlnboot -v
Ensure that the information displayed is correct. Reboot the system.
#reboot -qs


-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Steven E. Protter
Exalted Contributor

Re: boot vg from alt drive?

Comprehensive procedure:

pvcreate -B /dev/rdsk/c1t0d0 #use real disk

mkboot -l /dev/rdsk/c1t0d0
mkboot -a "hpux -lq (;0)/stand/vmunix" /dev/rdsk/c1t0d0 # use real disk


# mkboot -b /usr/sbin/diag/lif/updatediaglif -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c?t?d?

If you are running 64-bit OS:

# mkboot -b /usr/sbin/diag/lif/updatediaglif2 -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c?t?d?


vgextend /dev/vg00 /dev/dsk/c1t0d0 # same thing
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c1t0d0

# real disk. repeat for other lvols

lvlnboot -r /dev/vg00/lvol3 # root fs /
lvlnboot -s /dev/vg00/lvol2 #swap
lvlnboot -d /dev/vg00/lvol2 #swap/dump
lvlnboot -b /dev/vg00/lvol1
lvlnboot -R
lvlnboot -v
setboot
setboot -a 52.1.0 # second disk

Use real disks. This is the one that I use.
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
Sundar_7
Honored Contributor

Re: boot vg from alt drive?

James,

When you use dd to clone PRI to ALT, everything including the LVM headers are duplicated in the ALT drive.

The system will now see two disks with the same PVID, so the ALT drive will inturn be "seen" as an alternate link to the primary disk.

BTW, did you add c3t6d0 to VG00 at all ?

# pvcreate -B -f /dev/rdsk/c3t6d0
# vgextend /dev/vg00 /dev/dsk/c3t6d0
# dd if=/dev/rdsk/c3t5d0 of=/dev/rdsk/c3t6d0 bs=1024k
# vgdisplay -v /dev/vg00

Now you would see c3t6d0 as the secondary link to the c3t5d0.

1) Reboot the system
2) Pull the PRI DISK
3) Interrupt the autoboot
4) Interact with ISL
5) Boot with quorum disabled. hpux -lq

This should work

- Sundar
Learn What to do ,How to do and more importantly When to do ?
James Ho_2
New Member

Re: boot vg from alt drive?


Thanks everyone. I tried Sri's solution because it was the only one there when I checked the thread. It worked great. Thank you very much Sri. I'll keep the other solutions for reference too. Many thanks to everyone who responded!