Operating System - HP-UX
1748285 Members
3643 Online
108761 Solutions
New Discussion юеВ

Mirror UX couldn't boot off Alternate drive.

 
Matt Bettinger
New Member

Mirror UX couldn't boot off Alternate drive.

I *think* I mirrored the root drive of an L-class machine and attempted to test it out by booting the alternate path and the machine just hangs.


HP-UX m2khpux B.11.00 U 9000/800 118901507unlimited-user license

/home (/dev/vg00/lvol5
/opt (/dev/vg00/lvol6
/roi (/dev/vg01/lvol1
/tmp (/dev/vg00/lvol4
/usr/redback (/dev/vg00/lvol10
/usr/ud52 (/dev/vg00/lvol9
/usr (/dev/vg00/lvol7
/var (/dev/vg00/lvol8
/stand (/dev/vg00/lvol1
/ (/dev/vg00/lvol3

The steps I took to mirror the drives:

pvcreate ├в B /dev/rdsk/c1t0d0
vgextend /dev/vg00 /dev/dsk/c1t0d0
pvdisplay ├в v /dev/dsk/c1t0d0
pvcreate ├в B /dev/rdsk/c1t0d0
vgextend /dev/vg00 /dev/dsk/c1t0d0
mkboot /dev/rdsk/c1t0d0
mkboot -a ├в hpux ├в lq (;0)/stand/vmunix├в /dev/rdsk/c1t0d0

lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c1t0d0

lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c1t0d0

lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c1t0d0

lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c1t0d0

lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c1t0d0

lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c1t0d0

lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/c1t0d0

lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c1t0d0

lvextend -m 1 /dev/vg00/lvol9 /dev/dsk/c1t0d0

lvextend -m 1 /dev/vg00/lvol10 /dev/dsk/c1t0d0

The above was done according to the sequence from the command pvdisplay -v /dev/dsk/c2t0d0

LVNBOOT INFO

#lvlnboot -v /dev/vg00
Current path "/dev/dsk/c4t1d1" is an alternate link, skip.
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c2t0d0 (0/0/2/0.0.0) -- Boot Disk
/dev/dsk/c4t0d1 (0/1/3/0.0.1)
/dev/dsk/c4t1d1 (0/1/3/0.1.1)
/dev/dsk/c1t0d0 (0/0/1/1.0.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c2t0d0
/dev/dsk/c1t0d0
Root: lvol3 on: /dev/dsk/c2t0d0
/dev/dsk/c1t0d0
Swap: lvol2 on: /dev/dsk/c2t0d0
/dev/dsk/c1t0d0
Dump: lvol2 on: /dev/dsk/c2t0d0, 0


--------------------------------------

#lvdisplay -v /dev/vg00/lvol1

--- Logical volumes ---
LV Name /dev/vg00/lvol1
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 300
Current LE 75
Allocated PE 150
Stripes 0
Stripe Size (Kbytes) 0
Bad block off
Allocation strict/contiguous
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c2t0d0 75 75
/dev/dsk/c1t0d0 75 75
----------------------------------------------
# setboot
Primary bootpath : 0/0/2/0.0.0
Alternate bootpath : 0/0/1/1.0.0

Autoboot is ON (enabled)
Autosearch is ON (enabled)


One command that I saw in some previous posts which I believe I may have left out is lvlnboot -R

Also, I am pretty sure the machine is automatically booting 64 bit kernel.

I am sorry for not having the console errors but please advise if the steps I took are correct for a mirror root disk.

Sorry I can't recall the exact error messageo nthe green screen console but when i tried to boot the alt disk it said something about copying 000000000000000 to xxxxxxxxxxxxxxx some other address. It just hangs at this point.

thank you and if more info is nee
9 REPLIES 9
Steven E. Protter
Exalted Contributor

Re: Mirror UX couldn't boot off Alternate drive.

Check your process of mirroring against this guide.

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

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
john kingsley
Honored Contributor

Re: Mirror UX couldn't boot off Alternate drive.

The root, boot, and swap volumes aren't defined for your mirror. You need to run the following commands:
lvlnboot -r /dev/vg00/lvol3 /dev/vg00
lvlnboot -b /dev/vg00/lvol1 /dev/vg00
lvlnboot -s /dev/vg00/lvol2 /dev/vg00
lvlnboot -d /dev/vg00/lvol2 /dev/vg00

Now rerun lvlnboot -v, and you should seen the 2nd disk listed as well.
Matt Bettinger
New Member

Re: Mirror UX couldn't boot off Alternate drive.

What is the difference between

lvlnboot -m /dev/vg00/lvol[1..10]

and

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

also, what lvlnboot command do you use for the rest of the lvols ? I have 10 and you suggestoin above have different flag for each one!

re,

-mb

john kingsley
Honored Contributor

Re: Mirror UX couldn't boot off Alternate drive.

lvextend -m is used to create the mirrored copy of each lvolume. It needs to be run for all of the lvols that you want to mirror.

The lvlnboot command is only run on your root, boot, dump, and swap volumes. This information needs to be written to each of the disks. Since this information was never saved to your mirrored disk, the boot loader doesn't know where to locate the kernel.
Patrick Wallek
Honored Contributor

Re: Mirror UX couldn't boot off Alternate drive.

But if you look back at his 'lvlnboot -v' output you will see that the mirrored disk IS defined for root, boot and swap. The /dev/dsk/c1t0d0 is at the beginning of the line below the primary value for root boot and swap. It should be displayed more like:

Boot: lvol1 on: /dev/dsk/c2t0d0
................/dev/dsk/c1t0d0

Root: lvol3 on: /dev/dsk/c2t0d0
................/dev/dsk/c1t0d0

Swap: lvol2 on: /dev/dsk/c2t0d0
................/dev/dsk/c1t0d0

So that the disks line up below each other. Regardless, the output of the command looks fine.

Your steps and your output look fine. Without knowing what errors you got when you tried to boot from the mirror, it is difficult to help much more.

If you can spare the time and attempt to boot from the mirror again and give us the errors then we can better help you.
Geoff Wild
Honored Contributor

Re: Mirror UX couldn't boot off Alternate drive.

Here's the step I do to mirror root:

Say /dev/dsk/c0t6d0 is the root disk and /dev/dsk/c3t6d0 is the disk you want to make a mirror of.

1. Create a bootable LVM disk to be used for the mirror.
pvcreate -B /dev/rdsk/c3t6d0
2. Add this disk to the current root volume group.
vgextend /dev/vg00 /dev/dsk/c3t6d0
3. Make the new disk a boot disk.
mkboot -l /dev/rdsk/c3t6d0
4. Copy the correct AUTO file into the new LIF area.
mkboot -a "hpux -lq (;0)/vmunix" /dev/rdsk/c3t6d0
5. Mirror the boot, root and primary swap logical volumes to the new
bootable disk. Ensure that all devices in vg00, such as /usr, /swap,
etc., are mirrored.
The following is an example of mirroring the boot logical volume:
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c3t6d0
The following is an example of mirroring the primary swap logical
volume:
lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c3t6d0
The following is an example of mirroring the root logical volume:
lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c3t6d0
6. Update the boot information contained in the BDRA for the mirror
copies of boot, primary swap and root.
/usr/sbin/lvlnboot -b /dev/vg00/lvol1
/usr/sbin/lvlnboot -s /dev/vg00/lvol2
/usr/sbin/lvlnboot -r /dev/vg00/lvol3
7. Check if the BDRA is correct.
/usr/sbin/lvlnboot -R /dev/vg00
8. Verify that the mirrors were properly created.
lvlnboot -v /dev/vg00
The output of this command is shown in a display like the following:
Boot Definitions for Volume Group /dev/vg00:
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c0t6d0 (1/0/0/3/0.6.0) -- Boot Disk
/dev/dsk/c3t6d0 (1/0/1/0/0/1/1.6.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c0t6d0
/dev/dsk/c3t6d0
Root: lvol3 on: /dev/dsk/c0t6d0
/dev/dsk/c3t6d0
Swap: lvol2 on: /dev/dsk/c0t6d0
/dev/dsk/c3t6d0
Dump: lvol2 on: /dev/dsk/c0t6d0, 0

vgdisplay -v vg00

Then lvextend for all other lvols:

lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol9 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol10 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol11 /dev/dsk/c3t6d0


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
John Palmer
Honored Contributor

Re: Mirror UX couldn't boot off Alternate drive.

Hi,

It looks as if you've done everything correctly to me. What's wrong is that your alternate bootpath is NOT pointing to your new root mirror disk.

Your setboot...
# setboot
Primary bootpath : 0/0/2/0.0.0
Alternate bootpath : 0/0/1/1.0.0

Primary is therefore c2t0d0
Alternate is c1t1d0 but you've used c1t0d0.

Try rebooting from 0/0/1/0.0 then run setboot -a 0/0/1/0.0 to change your alternate boot path.

Regards,
John
Raj D.
Honored Contributor

Re: Mirror UX couldn't boot off Alternate drive.

Hi John , Good answer , I hope now the problem get solve.

Regards ,

RAjib
" If u think u can , If u think u cannot , - You are always Right . "
Matt Bettinger
New Member

Re: Mirror UX couldn't boot off Alternate drive.

Good eye. I will make the adjustment and schedule some downtime to give it a shot. I will keep you posted folks. Thanks again. Points coming soon.