1832877 Members
2624 Online
110048 Solutions
New Discussion

Re: how to do mirror

 
SOLVED
Go to solution
Olga_1
Regular Advisor

how to do mirror

I need to mirror /u04:

/dev/vg01/lv_u4 1024000 594188 403004 60% /u04
I was searching the net and could not get detail instructions.
How to do it? Please provide as much details as possible, as I am new to it.
Thank you for your help.
7 REPLIES 7
harry d brown jr
Honored Contributor
Solution

Re: how to do mirror

Olga,

providing you have the available extents in your VG - and on another disk - otherwise the mirroring isn't really mirroring (it's copying - The IDEA of mirroring is to mirror data to a different disk in case the disk fails. You can mirror to the same disk, but why?):

lvextend -m 1 dev/vg01/lv_u4

live free or die
harry
Live Free or Die
Mark Greene_1
Honored Contributor

Re: how to do mirror

if you have the mirror/ux software, you can do:

"vgextend /dev/vg01 /dev/dsk/cxxxxx"

to add the physical disk to the volume group, and then do:

"lvextend -m 1 /dev/vg01/lv_u4 /dev/dsk/cxxxxx"

to add the physical disk to the logical volume as a mirrored copy.

HTH
mark
the future will be a lot like now, only later
hpuxrox
Respected Contributor
Helen French
Honored Contributor

Re: how to do mirror

Hi Olga:

This document has complete steps (TKB #ULVMKBRC00008267):

http://us-support.external.hp.com/cki/bin/doc.pl/sid=fd8fce000f39f074f9/screen=ckiDisplayDocument?docId=200000058669767

HTH,
Shiju

Life is a promise, fulfill it!
Jeff Schussele
Honored Contributor

Re: how to do mirror

Hi Olga,

You first have to determine whether you have enough free space in vg01

vgdisplay -v /dev/vg01

If some free but less than what lv_u4 has now, you'll need the extend vg01 with a new disk

pvcreate /dev/rdsk/cxtydz # setup new drive - Note that you must use the raw disk (rdsk)
vgextend /dev/vg01 /dev/dsk/cxtydz # extends vg01

Then extend the LV using the mirror option

lvextend -m 1 /dev/vg01/lv_u4 #extend the LV using a mirror - NOTE this is all you'd have to do IF there is enough space in vg01

At the end check the LV

lvdisplay /dev/vg01/lv_u4

Should say mirror copies = 1

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
S.K. Chan
Honored Contributor

Re: how to do mirror

You need to add a disk to vg01 then you would mirror the LV to that disk, that way you can be sure that your mirror copy is sitting in a separate disk.
(say you add c2t2d2 to vg01)

dev/vg01/lv_u4 1024000 594188 403004 60% /u04

# pvcreate /dev/rdsk/c2t2d0
# vgextend vg01 /dev/dsk/c2t2d0
==> add c2t2d0 to vg01
# lvextend -m 1 /dev/vg01/lv_u4 /dev/dsk/c2t2d0
==> extend a copy of "lv_u4" to c2t2d0
# lvdisplay -v /dev/vg01/lv_u4
==> check it
Olga_1
Regular Advisor

Re: how to do mirror

Thank you all. As always this forum was very helpful.