1753528 Members
5369 Online
108795 Solutions
New Discussion

Re: Mirroring

 
SOLVED
Go to solution
Sajjad Sahir
Honored Contributor

Mirroring

I have two disk c0t0d0 and c1t1d0 in the volume group /dev/vg00
also I have seven logical volumes I want to do mirroring in my all logical volumes. including root volume.
5 REPLIES 5
Matti_Kurkela
Honored Contributor
Solution

Re: Mirroring

http://docs.hp.com/en/5991-1236/When_Good_Disks_Go_Bad.pdf

See Appendix A.
Choose one of the two procedures, according to whether your machine is a PA-RISC or an Itanium.

MK
MK
Steven E. Protter
Exalted Contributor

Re: Mirroring

Shalom,

How I do it PA-RISC....

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

Thanks to all that made this doc right.

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
aneez
Regular Advisor

Re: Mirroring


Create a bootable LVM disk to be used for the mirror.


# pvcreate -f â B /dev/rdsk/cxtyd0 Return


Add this disk to the current root volume group.


# vgextend /dev/vg00 /dev/dsk/cxtyd0 Return


Make the new disk a boot disk.


# mkboot /dev/rdsk/cxtyd0 Return


Copy the correct AUTO file into the new LIF area.


# mkboot -a "hpux â lq (;0)/stand/vmunix" /dev/rdsk/cxtyd0 Return


Mirror the 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 root logical volume:


# lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/cxtyd0 Return


The following is an example of mirroring the primary swap logical volume:


# lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/cxtyd0 Return




NOTE: The root logical volume must be done first to ensure that it occupies the first contiguous set of extents on the new disk.




Update the boot information contained in the BDRA for the mirror copies of root and primary swap.


# /usr/sbin/lvlnboot -b /dev/vg00/lvol1 Return
# /usr/sbin/lvlnboot -r /dev/vg00/lvol3 Return
# /usr/sbin/lvlnboot -s /dev/vg00/lvol2 Return
# /usr/sbin/lvlnboot -d /dev/vg00/lvol2 Return


Check if the BDRA is correct.


# /usr/sbin/lvlnboot -R /dev/vg00 Return


Verify that the mirror was properly created.


# lvlnboot -v Return


# setboot â a

Torsten.
Acclaimed Contributor

Re: Mirroring

Now you know how to do this on a PA-RISC system.

But do you have a PA-RISC system?

run

# model

if you see "9000" it is PA-RISC, if you see
"ia64 ..." it is an Integrity!

In this case you have to the the manual mentioned in the first post!

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
yulianto piyut
Valued Contributor

Re: Mirroring

Hi sajjad,

I have a script to mirroring disk. you can see at attachment.