1833784 Members
2195 Online
110063 Solutions
New Discussion

Mirror hpux 11i help

 
Umang Bhavsar
Occasional Advisor

Mirror hpux 11i help

I am trying to mirror two my drive on L3000 box. I have followed following steps. But having an error.

(1) vgextend /dev/vg00 /dev/dsk/c2t2d0
(2) mkboot /dev/rdsk/c2t2d0
There appear to be non-boot logical volumes on this device.
Overwriting them could destroy all the data on this device
Should the logical volumes be overwritten [y/n]? y
(3) # mkboot -a "hpux disc (0/0/2/0.2.0)/stand/vmunix" /dev/rdsk/c2t2d0
There appear to be non-boot logical volumes on this device.
Overwriting them could destroy all the data on this device
Should the logical volumes be overwritten [y/n]? y
(4) lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c2t2d0
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol1" has been successfully extended.
(5) # lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c2t2d0
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
Logical volume "/dev/vg00/lvol2" has been successfully extended.
lvlnboot: LIF information corrupt or not present on "/dev/dsk/c2t2d0".
Use the "mkboot" command to initialize the LIF area.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

Any Idea ? Am I missing some thing ?
STEP 5 GIVES AN ERROR.

Thanks in advance.

UB
Umang
9 REPLIES 9
Stefan Farrelly
Honored Contributor

Re: Mirror hpux 11i help

Did you do your pvcreate -B on the disk before adding it to a VG ? this is essential.

pvcreate -B /dev/rdsk/c....
mkboot /dev/rdsk/c.....
vgextend VGxx /dev/dsk/c.....
lvextend -m 1 ....

Remove it, do these steps, then try again.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Pete Randall
Outstanding Contributor

Re: Mirror hpux 11i help

UB,

First, I assume you did a pvcreate before starting this, right? pvcreate -B /dev/rdsk/c2t2d0

Then vgextend

Then mkboot /dev/rdsk/c2t2d0

Then mkboot -a "hpux -la" /dev/rdsk/c2t2d0
(repeat to update autofile on primary disk)

Then mirror /stand, root and swap
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c2t2d0
lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c2t2d0
lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c2t2d0
(repeat for all other logical volumes)

Then use setboot to modify your alternate boot path


Pete


Pete
Jeff Schussele
Honored Contributor

Re: Mirror hpux 11i help

Hi UB,

Your first step must be
pvcreate -B /dev/rdsk/c2t2d0

Step 2 should be
mkboot -l /dev/rdsk/c2t2d0

Step 3 can just be
mkboot -a "hpux -lq" /dev/rdsk/c2t2d0
Also do it on the other mirror drive as well

Step 4 can be a for loop like
for i in 1 2 3 4 5 6 7 8 9 #however many LVs you have
>do
>lvextend -m 1 /dev/vg00/lvol$i /dev/dsk/c2t2d0
>done

Don't forget to check the setup with
lvlnboot -v
You should see 2 root, boot & swap disks & just a single dump

Also you should check the LIF area on both disks with
lifls -l /dev/rdsk/c2t2d0

If the primary has ODE & the mirror doesn't, you can add it with

mkboot -b /usr/sbin/diag/lif/updatediaglif2 -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/c2t2d0

Then check them both again with the lifls command.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Stanimir
Trusted Contributor

Re: Mirror hpux 11i help

Hi!
Sound you have forgotten some steps :)
Look at this sucessfull example:

Creating a mirrored boot disk

In this example the disk to be used as an additional mirror copy will be /dev/dsk/c0t5d0 on which as well the root as the swap logical volume will be mirrored. The primary mirror copy will be on /dev/dsk/c0t6d0.
To mirror the root file system, add a bootable LVM disk. Create a physical volume using pvcreate with the -B option.
# pvcreate -B /dev/rdsk/c0t5d0
Add the physical volume to the existing root volume group with vgextend:
# vgextend /dev/vg00 /dev/dsk/c0t5d0
Use mkboot to place boot utilities in the boot area:
# mkboot -l /dev/rdsk/c0t5d0
Use mkboot to add an AUTO file in boot LIF area:
# mkboot -a "hpux" /dev/rdsk/c0t5d0
Or, use the -lq option to allow the system to boot in the event that one of the disks is unavailable, resulting in a loss of quorum.
# mkboot -a "hpux -lq" /dev/rdsk/c0t5d0
NOTE: Use the -lq option when the root volume group contains only 2 disks. If more than 2 disks are in the root volume group, the -lq option is not needed as quorum will be maintained even if 1 disk fails.
Check the contents of the AUTO file with
# lifcp /dev/rdsk/c0t5d0:AUTO -
Alternatively, one could set the alternate boot path variable according to e.g.
# setboot -a 8/0/19/0.5.0
The hardware address of the disk that will become the mirror disk can be determined with 'ioscan -fnC' disk. To check use setboot without any arguments.
Use pvdisplay -v to the order of the logical volumes on the primary disk.
# pvdisplay -v

NOTE: In the following, the standard sequence lvol1, lvol2, lvol3, and so forth, is assumed.
Mirror the boot logical volume, primary swap logical volume, root logical volume and other logical volumes as needed, to the mirror disk in the correct sequence

# lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c0t5d0
# lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c0t5d0
# lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c0t5d0
# lvextend -m 1 (additional LV)
Use pvdisplay -v to the order of the logical volumes on the mirror disk to insure they are in the correct order.
# pvdisplay -v
Update all physical volumes in the volume group so that the logical volume become the root, boot, primary swap, or a dump volume when the system is next booted:
For HP-UX 10.20 (not updated to) and 11.X only:
# 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
For HP-UX 10.01, 10.10, and updates to 10.20 only:
# lvlnboot -r /dev/vg00/lvol1 /dev/vg00
# lvlnboot -s /dev/vg00/lvol2 /dev/vg00
# lvlnboot -d /dev/vg00/lvol2 /dev/vg00
Check with
# lvlnboot -v
Both disks must be listed for root, boot and swap definitions.

NOTE: If forgotten, it often occurs that the system has to be booted in LVM maintenance mode. If you need to know how to boot systems in LVM maintenance mode or other mode, please refer to document OZBEKBRC00000607.

In order to test the mirror configuration, shut down the system and boot from the mirror disk.
# shutdown -ry 0
The system will shut down and reboot. As the system starts to come back up, look for the message (system's output may vary):
TO INTERRUPT THE BOOT SEQUENCE, PRESS ...
Interrupt the boot sequence. This will display the Boot Admin display. At the boot_admin> prompt type:
bo Mirror_disk_hardware_address or
bo alt
if the alternate boot device has been configured. The system will prompt to interact with IPL, answer 'no', and the system will boot from the mirror root disk.
Pete Randall
Outstanding Contributor

Re: Mirror hpux 11i help

Sorry -

"Then mkboot -a "hpux -la" /dev/rdsk/c2t2d0"
should read
"hpux -lq"


Pete


Pete
Todd McDaniel_1
Honored Contributor

Re: Mirror hpux 11i help

I would suggest that you need to remove the mirror and redo it...

You successfully extended the mirror but you need to use mkboot to update the LIF info on the mirror...

However, this disk will not be bootable if your primary fails. Did you pvcreate -B ??? it must be bootable...

also, in your mkboot command you should have used -lq so that it will boot without a quorum for the mirrored disk... b/c you will be using it when your primary fails.

That should be enough to get it updated...

You also need to run lvlnboot -b and setboot -a for the mirror to add it to the bootable devices.
Unix, the other white meat.
Umang Bhavsar
Occasional Advisor

Re: Mirror hpux 11i help

Thanks all for quick reply.

Yes i did pvcreate -B /dev/rdsk/c2t2d0 first before vgextend.

Stefan : Do i need to run mkboot before vgextend or after vgextend ?

All , Seen the output of step 4 lvol1 successfully created. Without pvcreate would not be possible.

Now do i need to reduce first lvol using lvreduce command ? then run the procedure again ?

Thanks
Umang
Steven E. Protter
Exalted Contributor

Re: Mirror hpux 11i help

Perhaps this procedure. Skip steps not relevant.


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
Joshua Scott
Honored Contributor

Re: Mirror hpux 11i help

OK,

pvcreate -f /dev/rdsk/c2t2d0
pvcreate -B /dev/rdsk/c2t2d0
vgextend /dev/vg00 /dev/dsk/c2t2d0
mkboot /dev/rdsk/c2t2d0
mkboot -a "hpux -lq(;0)/stand/vmunix" /dev/rdsk/c2t2d0
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c0t0d0
(repeat for other volumes)
vgchange -a y /dev/vg00
lvlnboot -R

-Josh
What are the chances...