Operating System - HP-UX
1847248 Members
2616 Online
110263 Solutions
New Discussion

How to do mirroring In HP-UX 11i

 
SOLVED
Go to solution
Sanjay_19
Occasional Contributor

How to do mirroring In HP-UX 11i

Hi all
I am new to HP-UX11i. I have Three year experince in Sun Solaris & now my company had purchased two new HP rp 2470 server .I have to Installed HP-UX 11i in that machine & done mirroring of Hard disk by opearating system. So pls provide me document which can help me in mirroring. I am installing first time HP-UX11i so pls. provide document which have mention everything from start because I am new to HP-UX11i

Thanks & regards

Sanjay chahar
9 REPLIES 9
Steven E. Protter
Exalted Contributor

Re: How to do mirroring In HP-UX 11i

Mirroring is done with an add in paid product called mirror/ux.

You need to get it, put in a code word, install it and then:

lvextend -m 1 /dev/vg00/vgname /dev/dsk/c1t1d0

That makes a mirror copy of a logical volume named vgname on disk c1t1d0

Thats all it takes.

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
Rajeev  Shukla
Honored Contributor
Solution

Re: How to do mirroring In HP-UX 11i

Hi,
I guess you have installed Mirror UX first, which comes in the application CD, you need code word to unlock the mirror-ux s/w.

Mirroring root disk.
1. pvcreate the disk with -B option.
2. use mkboot to make it bootable
2. vgextend the /dev/vg00 to this new disk.
3. lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/
4. lvextend all lvols in vg00 to new disk as shown above.
5. update the LIF using /usr/sbin/diag/lif/updatediaglif2(for 64bit or use updatediaglif) -p ISL -p HPUX -p LABEL -p AUTO /dev/dsk/
use lvlnboot -b /dev/vg00/lvol1
lvlnboot -r /dev/vg00/lvol3
lvlnboot -s /dev/vg00/lvol2
lvlnboot -d /dev/vg00/lvol2

And to mirror other lvols in other vg(non root VG)
just vgextend to another disk and use lvextend with -m option to mirror accross to another disk

also you'll find a lot of information in forum
Michael Tully
Honored Contributor

Re: How to do mirroring In HP-UX 11i

You will need to install 'MirrorDIsk/UX'. This is not a free product. To mirror the operating system which is generally on /dev/vg00, the following procedure will help. First check to see if the product is installed.

# swlist -a revision | grep -i b2491 (This is the product code for the mirroring software.)

# pvcreate -B /dev/rdsk/cxtydz
# vgcreate /dev/vg00 /dev/dsk/cxtydz
# mkboot /dev/rdsk/cxtydz
# mkboot -a "hpux -lq(;0)/stand/vmunix" /dev/rdsk/cxtydz
# lvlnboot -R
# for LVOL in /dev/vg00/lv*
> do
> echo $LVOL
> lvextend -m 1 $LVOL
> done

Anyone for a Mutiny ?
Sanjay_19
Occasional Contributor

Re: How to do mirroring In HP-UX 11i

Hi Michael
Thanks for your reply.
I have purchased mirror/disk.
first you tell me how can I install that software.
Suppose I have created five slice in first disk
1. /
2. swap
3. /usr
4. /var
5. /stand
Michael can you tell me command which can mirror first disk partion to second disk
Can you give me brief discription of each command so that I can understand it better
Pls. provide me help. I am waiting for your
response



Victor BERRIDGE
Honored Contributor

Re: How to do mirroring In HP-UX 11i

Hi,
You would have to install the soft using swinstall cmd which will at a point ask you for the codeword...

Now as Michael has given you the script to mirror, I will just give you some explanations on whats going on...
pvcreate -B /dev/rdsk/cxtydz creates a LVM enabled disk
# vgcreate /dev/vg00 /dev/dsk/cxtydz #include the second disk to your root volume group
# mkboot /dev/rdsk/cxtydz
# mkboot -a "hpux -lq(;0)/stand/vmunix" /dev/rdsk/cxtydz
# lvlnboot -R
=> make the new disk a bootable one and update...

for i in 1 2 3 4 5 6 7 8 9
do
lvextend -m 1 /dev/vg00/lvol$i /dev/dsk/c2t2d0
echo "lvol$i has been mirrored"
done
bdf
# makes the mirror copies on the specified disk

Now DONT FORGET to update you boot path with the new disk:

#setboot

Good luck

All the best
Victor
Sanjay_19
Occasional Contributor

Re: How to do mirroring In HP-UX 11i

Hi victor

can You tell me
# pvcreat -B /dev/rdsk/CxTyDz
enable which drive LVm enable.Suppose I have two dive in my system
1. C0t0d0
2. C0t1d0


The c0t0d0 has Operating System installed & I want to mirror it with second drive C0t1d0
So pls. tell me pvcreat enable my first drive or second
#vgcreat
write all volume table of content from first disk to second disk
Am right or wrong, pls.tell me
I am waiting your reply

Thanks in advance

Sanjay chahar


Steven E. Protter
Exalted Contributor

Re: How to do mirroring In HP-UX 11i

You say:

1. C0t0d0 is the boot drive.

To mirror the whole os use the above process starting as follows:

# pvcreate -B /dev/rdsk/c0t1d0

Note that those drivers start with lower case c, not upper case C as you posted.

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
Jeff Schussele
Honored Contributor

Re: How to do mirroring In HP-UX 11i

Hi Sanjay,

Here's a link to the on-line LVM manual.
This will have everything you'll need.

http://us-support3.external.hp.com/iv/data/documents/DE_SW_UX_swrec_EN_01_E/LVM.pdf

Highly recommended.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Victor BERRIDGE
Honored Contributor

Re: How to do mirroring In HP-UX 11i

Hi Sanjay,
Sorry for not replying earlier our mail server was down...

I just noted another error in the previous mails, so I thought we should start all again:
You install you OS on a disk just to make my life easier its on c2t2d0 (1rst disk)
then you pvcreate, mkboot...you new disk: c1t2d0
Then you extend you volume group (vgextend) and start mirroring your logical volumes.
Read the docs at the link given previously.
Here is what you could use (adapt it to your usage, its the command I passed the last time I mirrored a vg00...) for a script with c1t2d0 as mirror:

pvcreate -B /dev/rdsk/c1t2d0
mkboot -l /dev/rdsk/c1t2d0
mkboot -a "hpux(;0)/stand/vmunix" /dev/rdsk/c1t2d0
vgextend /dev/vg00 /dev/dsk/c1t2d0
for i in 1 2 3 4 5 6 7 8 9 10 11 12 13
do
echo "Start /dev/vg00/lvol$i mirror "
lvextend -m 1 /dev/vg00/lvol$i /dev/dsk/c1t2d0
sleep 1
done
lifls /dev/rdsk/c1t2d0
lifls /dev/rdsk/c2t2d0
lvlnboot -r /dev/vg00/lvol1
lvlnboot -s /dev/vg00/lvol2
cd /usr/sbin/diag/lif
mkboot -b updatediaglif -p ISL -p HPUX -p LABEL -p AUTO /dev/rdsk/c1t2d0
lifls /dev/rdsk/c2t2d0
lifls /dev/rdsk/c1t2d0

Remember my previous mail about setboot?
octant # setboot
Primary bootpath : 0/0/2/0.2.0
Alternate bootpath : 0/0/2/0.2.0

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

#setboot -a 0/0/1/1.2.0
#ioscan -funC disk|more
octant:/home/vbe $ setboot
Primary bootpath : 0/0/2/0.2.0
Alternate bootpath : 0/0/1/1.2.0

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

octant:/home/vbe $

All the best
Victor