1837094 Members
2476 Online
110112 Solutions
New Discussion

Re: Mirror vg00

 
Jeffrey F. Goldsmith
Super Advisor

Mirror vg00

I need to mirror vg00 on my L2000 server. The current OS is HP-UX 11.0. Yes I have the mirror software installed. I am attaching some information I received as well as my vg00 information.
Please let me know if i follow the directions that i will be able to get a good/compleate mirror of my vg00.
Thanks.
9 REPLIES 9
Paul F. Carlson
Valued Contributor

Re: Mirror vg00

You will need to do some additional things to make your mirror bootable:

- pvcreate â B /dev/rdsk/c2t2d0
- vgextend /dev/vg00 /dev/dsk/c2t2d0
- mkboot â l /dev/rdsk/c2t2d0
- mkboot â a â hpuxâ /dev/rdsk/c2t0d0
- mkboot â a â hpux â lqâ /dev/rdsk/c2t2d0
- lifcp /dev/rdsk/c2t2d0:AUTO â
- lvlnboot â r /dev/vg00/lvol3
- lvlnboot â b /dev/vg00/lvol1
- lvlnboot â s /dev/vg00/lvol2
- lvlnboot â d /dev/vg00/lvol2
- lvlnboot â s /dev/vg00/lvol4
- lvlnboot -v

See:

man pvcreate
man mkboot
man lifcp
Link down -- cable problem?
Paul F. Carlson
Valued Contributor

Re: Mirror vg00

Looks like my post is jacked up a little. This is what I meant:

- pvcreate -B /dev/rdsk/c2t2d0
- vgextend /dev/vg00 /dev/dsk/c2t2d0
- mkboot -l /dev/rdsk/c2t2d0
- mkboot -a "hpux" /dev/rdsk/c2t0d0
- mkboot -a "hpux -lq" /dev/rdsk/c2t2d0
- lifcp /dev/rdsk/c2t2d0:AUTO -
- lvlnboot -r /dev/vg00/lvol3
- lvlnboot -b /dev/vg00/lvol1
- lvlnboot -s /dev/vg00/lvol2
- lvlnboot -d /dev/vg00/lvol2
- lvlnboot -v

See:

man pvcreate
man mkboot
man lifcp
man lvlnboot

Then you can do you lvextends.
Link down -- cable problem?
Nguyen Anh Tien
Honored Contributor

Re: Mirror vg00

First. I found command is not correct
====YOUR COMMENT
lvextend â l 50 /dev/vg00/lvol1 /dev/dsk/c1t2d0 /dev/dsk/c2t2d0
IT MEANS THAT YOU EXTEND logical extents to 50. IT DO NOT MEANS EXTEND 50 logical extents MORE.== PAY CARE ON..
========================
second. If you have Online JFS your can replace three command by one
==
umount /dev/vg00/lvol2
extendfs â F hfs /dev/vg00/rlvol2
mount /dev/vg00/lvol2
===by
fsadmin -F hfs -b number_of_block mountpoint
====


and you lack those:
Make the area for LIF and boot utilities
# pvcreate -B /dev/dsk/c2t2d0
Add the boot utilities
#mkboot /dev/dsk/c2t2d0
Add the new hardware path for added hard disk
#mkboot -a "hpux -lq (;0) /stand/vmunix" /dev/dsk/c2t2d0
Update BDRA of boot disk in root volume group
#lvlnboot -r lvol1 /dev/vg00
#lvlnboot -s lvol2 /dev/vg00


Check by :
#lvlnboot -v
Regard
HP is simple
bhavin asokan
Honored Contributor

Re: Mirror vg00

see attachment for full procedure
Andrew Pearce
Frequent Advisor

Re: Mirror vg00

Hi,

All the replies are missing one command that is crucial for recovery. (assuming you already have diagnostics installed.)
if you do a lifls of your original boot disk and your new boot disk and compare the output!

#lifls /dev/rdsk/c?t?d?

you will see that the output on your original boot disk contains lots of utilities, and your new boot disk contains only the bare essentials and no recovery/diagnostics.

For your own job security and recovery purposes you may want these utilities on both boot disks.

to put them on the disk you have just made bootable and mirrored. Use this lengthy command!

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

to check that it has worked ok. use the lifls command to compare both disks.

I hope that you never need these utilities but you if you don't put them on whilst the system is up & running. Sod's law says that you will need them!

Andrew
Geoff Wild
Honored Contributor

Re: Mirror vg00

Here's a procedure I use - that works.


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.
Florian Heigl (new acc)
Honored Contributor

Re: Mirror vg00

Geoff - one small thing that sometimes comes in handy:

Get the order of lvols from vgdisplay -v, not numeric.
i.e. lvols 1-20 in vg00
lvol10 of 100MB is deleted (deprecated software etc.)
a new lvol is created with 500MB
then You have 100MB at the old space of lvol10 and the rest after lvol20.

when simply mirroring lvol1 [...] lvol11
the mirror LEs of lvol11 will be in a different position as the original ones, which can cause some headache in emergency situations. (luckily /stand and friends are set contigous)

I usually do
for lvol in `vgdisplay -v | grep "LV Name"| awk '{print $3}'; do lvextend -m 1 $lv ; done
to keep things straight.
yesterday I stood at the edge. Today I'm one step ahead.
Yew Lee
Advisor

Re: Mirror vg00

Also, make sure the lvol which holds /stand is the first lvol on that disk. A "lvdisplay -v /dev/vg00/lvolX" should look similar to the following:
--- Logical extents ---
LE PV1 PE1 Status 1 PV2 PE2 Status 2
00000 /dev/dsk/c0t6d0 00000 current /dev/dsk/c4t6d0 00000 current
00001 /dev/dsk/c0t6d0 00001 current /dev/dsk/c4t6d0 00001 current
00002 /dev/dsk/c0t6d0 00002 current /dev/dsk/c4t6d0 00002 current
00003 /dev/dsk/c0t6d0 00003 current /dev/dsk/c4t6d0 00003 current
00004 /dev/dsk/c0t6d0 00004 current /dev/dsk/c4t6d0 00004 current
00005 /dev/dsk/c0t6d0 00005 current /dev/dsk/c4t6d0 00005 current
00006 /dev/dsk/c0t6d0 00006 current /dev/dsk/c4t6d0 00006 current
On the move....
Victor Fridyev
Honored Contributor

Re: Mirror vg00

Hi,
The attached script does exactly what you need.

HTH
Entities are not to be multiplied beyond necessity - RTFM