1833792 Members
2284 Online
110063 Solutions
New Discussion

How to mirror vg00?

 
SOLVED
Go to solution
joe_91
Super Advisor

How to mirror vg00?

Team:

We have 2 36 Gig internal disks on nclass and we need to mirror it. I reinstalled 11.0 and configured the vg00. Now i need to mirror all the lvols. How do i do it? There are 13 lvols. Please Help.

Thanks

Joe.
7 REPLIES 7
Pete Randall
Outstanding Contributor
Solution

Re: How to mirror vg00?

James R. Ferguson
Acclaimed Contributor

Re: How to mirror vg00?

Hi Joe:

# pvcreate ???B /dev/rdsk/cXtYdZ
# vgextend /dev/vg00 /dev/dsk/cXtYdZ
# mkboot /dev/rdsk/cXtYdZ
# mkboot ???a "hpux ???lq" /dev/rdsk/cXtYdZ
# for LV in 1 2 3 4 5 6 7 8 ...
> do
> lvextend ???m 1 /dev/vg00/lvol${LV} /dev/dsk/cXtYdZ
> done
# lvlnboot ???v

# mkboot ???a "hpux ???lq" /dev/rdsk/cXtYdZ #...for original volume, too...
# setboot ???a [alternate_path] #...for new mirror...
# lifcp /dev/rdsk/xCtYdZ:AUTO - #...copy to stdout for verification...

Regards!

...JRF...
Uday_S_Ankolekar
Honored Contributor

Re: How to mirror vg00?

Well, This VG00 has all the 13 Lvols??

Any way Here is the process
If the second disk is not yet used in any of the VG then you need to add this to existing vg00, It is good to have a mirrored boot disk


In this example, the disk to be used as an additional mirror copy will be /dev/dsk/c0t5d0, which will include root and the swap logical volumes. The primary mirror copy will be on /dev/dsk/c0t6d0.

# pvcreate -B /dev/rdsk/diskname (c0t7d0)

# vgextend /dev/vg00 /dev/dsk/c0t7d0

# mkboot -l /dev/rdsk/c0t7d0

# mkboot -a "hpux" /dev/rdsk/c0t7d0

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/c0t7d0

# lifcp /dev/rdsk/c0t5d0:AUTO -

# 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.

If desired, activate autosearch and autoboot by

# setboot -s on -b on

Use pvdisplay -v to the order of the logical volumes on the primary disk.

# pvdisplay -v /dev/dsk/c0t7d0

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/c0t7d0
# lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c0t7d0
# lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c0t7d0
# lvextend -m 1 (additional LV)



# 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

# lvlnboot -v

Both disks must be listed for root, boot and swap definitions.

-Goodluck

-USA..
Good Luck..
S.K. Chan
Honored Contributor

Re: How to mirror vg00?

To echo Uday's comment .. (not to side step but) .. are you putting non-root FS in vg00 as well which is why you got so many lvols ? If yes in you may want to consider moving them out of vg00 before you do the mirroring.
There are a lot of references for the procedure so you should be getting that. I just wanted to add one more step (this may be optional .. ie only if you have ODE installed on your server - 11.x). After all the mirroring is done ..

Installing ODE (Offline Diagnostics)
# ll /usr/sbin/diag/lif/updatediaglif
=> Check if you got "updatediag" file on your system. If yes continue, if no you can skip all of these.
# lifls -l /dev/rdsk/
=> List content of LIF dir (you should have at least ISL,AUTO,HPUX,PAD,LABEL). If you see more LIF files other that those 5, you probably need to install ODE on your mirror disk.
# mkboot -b /usr/sbin/diag/lif/updatediaglif -p ISL -p AUTO -p HPUX -p PAD -p LABEL /dev/rdsk/
=> Install ODE LIF files while "protecting" the existing LIF files.
=> Use the file updatediaglif2 if you're running 64-bit.
# lifls -l /dev/rdsk/
=> Should now see the additional LIF files.
Adisuria Wangsadinata_1
Honored Contributor

Re: How to mirror vg00?

Hi Joe,

To mirror your disk on your system you need Mirror/UX software. Check your system with the command below :

# swlist |grep Mirror

If the Mirror/UX software on your system, I refer you to use the knowledge mine document (# LVMKBRC00005103). You can see the same document at the url below :

http://itrc.hp.com/cki/bin/doc.pl/screen=ckiSearchResults?mode=id&searchString=LVMKBRC00005103

Hope this information can help you.

Best Regards,
AW
now working, next not working ... that's unix
Tim Sanko
Trusted Contributor

Re: How to mirror vg00?

I am lazy and assume you would have Mirrordisk-UX installed.

Here is a script I use
Boot into singleuser mode and have fun

pvcreate -B /dev/rdsk/c2t6d0
vgextend /dev/vg00 /dev/dsk/c2t6d0
mkboot /dev/rdsk/c2t6t0
mkboot -a "hpux -lq(;0)/stand/vmunix" /dev/rdsk/c2t6d0
lvlnboot -R
for LVOL in /dev/vg00/lv*
do
echo $LVOL
lvextend -m 1 $LVOL
done
Mark Treen_1
Advisor

Re: How to mirror vg00?

Hi Joe

Try this base script - it can be totally customised by you as you need...

pvcreate -f -B /dev/rdsk/c1t6d0
mkboot /dev/rdsk/c1t6d0
mkboot -b /usr/sbin/diag/lif/updatediaglif -p ISL -p HPUX -p LABEL /dev/rdsk/c1t6d0
mkboot -a "hpux (8/4.6.0;0)/stand/vmunix" /dev/rdsk/c1t6d0
vgextend /dev/vg00 /dev/dsk/c1t6d0
for i in 1 2 3 4 5 6 7 8
do
lvextend -m 1 /dev/vg00/lvol$i /dev/dsk/c1t6d0
done
lvlnboot -R


Hope it helps

Mark
Mark Treen