Operating System - HP-UX
1834051 Members
2400 Online
110063 Solutions
New Discussion

Re: Need to split a mirror to change a RAID chassis

 
SOLVED
Go to solution
Greg OBarr
Regular Advisor

Need to split a mirror to change a RAID chassis

We are running an Oracle database on 2 L2000s with Serviceguard and 2 dually attached arrays. The volume group for the oracle data contains both arrays and the logical volumes for the oracle data were created with 1 mirror copy. Does Mirror/UX automagically put the mirror copy on the second array?
5 REPLIES 5
Patrick Wallek
Honored Contributor
Solution

Re: Need to split a mirror to change a RAID chassis

Mirror Disk will put the mirror wherever you tell it to put the mirror. Mirroring can be done with several options with the lvcreate/lvextend. The '-s' option to lvcreate has several options to tell Mirror Disk how to behave:

-s y - Set a strict allocation policy. Mirrors of a logical extent cannot share the same physical volume. This is the default.

-s g - Set a PVG-strict allocation policy. Mirrors of a logical extent cannot share the same physical volume group. A PVG-strict allocation policy cannot be set on a logical volume in a volume group that does not have a physical volume group defined.

The easiest way to see how your LVs were created is to do an 'lvdisplay -v /dev/vg??/lvol?' and look at the output.

In the lvdisplay output you will see something like:
Allocation PVG-strict/distributed

That is showing up because I used the '-s g' policy when creating this lvol.

You can see how the logical extents are distributed between the mirrors further down in the lvdisplay output. Here is a sample of mine:

--- Logical extents ---
LE PV1 PE1 Status 1 PV2 PE2 Status 2
0000 /dev/dsk/c2t8d0 0288 current /dev/dsk/c5t8d0 0288 current
0001 /dev/dsk/c2t9d0 0288 current /dev/dsk/c5t9d0 0288 current
0002 /dev/dsk/c2t10d0 0288 current /dev/dsk/c5t10d0 0288 current
0003 /dev/dsk/c2t11d0 0288 current /dev/dsk/c5t11d0 0288 current
0004 /dev/dsk/c3t8d0 0288 current /dev/dsk/c7t8d0 0288 current
0005 /dev/dsk/c3t9d0 0288 current /dev/dsk/c7t9d0 0288 current


If you are using PVGs then you can see what physical volumes are in each PVG by doing a vgdisplay -v /dev/vg??. You will get someting like this:

--- Physical volume groups ---
PVG Name vgnewdt0
PV Name /dev/dsk/c2t8d0
PV Name /dev/dsk/c2t9d0
PV Name /dev/dsk/c2t10d0
PV Name /dev/dsk/c2t11d0
PV Name /dev/dsk/c3t8d0
PV Name /dev/dsk/c3t9d0
PV Name /dev/dsk/c3t10d0
PV Name /dev/dsk/c3t11d0
PV Name /dev/dsk/c4t8d0
PV Name /dev/dsk/c4t9d0
PV Name /dev/dsk/c4t10d0
PV Name /dev/dsk/c4t11d0

PVG Name vgnewdt1
PV Name /dev/dsk/c5t8d0
PV Name /dev/dsk/c5t9d0
PV Name /dev/dsk/c5t10d0
PV Name /dev/dsk/c5t11d0
PV Name /dev/dsk/c6t8d0
PV Name /dev/dsk/c6t9d0
PV Name /dev/dsk/c6t10d0
PV Name /dev/dsk/c6t11d0
PV Name /dev/dsk/c7t8d0
PV Name /dev/dsk/c7t9d0
PV Name /dev/dsk/c7t10d0
PV Name /dev/dsk/c7t11d0

Does this help?
James A. Donovan
Honored Contributor

Re: Need to split a mirror to change a RAID chassis

No, by default logical extents are mirrored on different physical volumes, but nothing says that those physical volumes can't be in the same array.

You can check where the logical extents of you're lvol's reside by using the lvdisplay command.

e.g.

# lvdisplay -v /dev/vg00/lvol1
--- Logical volumes ---
LV Name /dev/vg00/lvol1
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 84
Current LE 21
Allocated PE 42
Stripes 0
Stripe Size (Kbytes) 0
Bad block off
Allocation strict/contiguous
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c1t6d0 21 21
/dev/dsk/c2t6d0 21 21

Shows that my /stand (/dev/vg00/lvol1) partition is on /dev/dsk/c1t6d0 with a mirror on /dev/dsk/c2t6d0.
Remember, wherever you go, there you are...
Greg OBarr
Regular Advisor

Re: Need to split a mirror to change a RAID chassis

Looks like the arrays were setup to present only 1 LUN each, so each array is a PV. The allocation policy is "strict" and, at least on the LVs I've looked at so far, each side of the miror is on a different PV. Output:

--- Logical volumes ---
LV Name /dev/vg4000/lvol1
VG Name /dev/vg4000
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 4000
Current LE 1000
Allocated PE 2000
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c6t0d0 1000 1000
/dev/dsk/c4t0d0 1000 1000

--- Logical extents ---
LE PV1 PE1 Status 1 PV2 PE2 Status 2
00000 /dev/dsk/c6t0d0 00000 current /dev/dsk/c4t0d0 00000 current
00001 /dev/dsk/c6t0d0 00001 current /dev/dsk/c4t0d0 00001 current
00002 /dev/dsk/c6t0d0 00002 current /dev/dsk/c4t0d0 00002 current
00003 /dev/dsk/c6t0d0 00003 current /dev/dsk/c4t0d0 00003 current
00004 /dev/dsk/c6t0d0 00004 current /dev/dsk/c4t0d0 00004 current
00005 /dev/dsk/c6t0d0 00005 current /dev/dsk/c4t0d0 00005 current
00006 /dev/dsk/c6t0d0 00006 current /dev/dsk/c4t0d0 00006 current
00007 /dev/dsk/c6t0d0 00007 current /dev/dsk/c4t0d0 00007 current
00008 /dev/dsk/c6t0d0 00008 current /dev/dsk/c4t0d0 00008 current
00009 /dev/dsk/c6t0d0 00009 current /dev/dsk/c4t0d0 00009 current
00010 /dev/dsk/c6t0d0 00010 current /dev/dsk/c4t0d0 00010 current
00011 /dev/dsk/c6t0d0 00011 current /dev/dsk/c4t0d0 00011 current

The response that the default policy is to not create a mirror copy on the same PV is the answer to my question. Now, should I be able to split this mirror, shut down the RAID representing lun /dev/dsk/c4t0d0, replace the chassis, restart the RAID, and lvmerge while the Oracle package and cluster are running?
Patrick Wallek
Honored Contributor

Re: Need to split a mirror to change a RAID chassis

>>Now, should I be able to split this mirror, shut down the RAID >>representing lun /dev/dsk/c4t0d0, replace the chassis, restart the >>RAID, and lvmerge while the Oracle package and cluster are >>running?

Hmmmm........I think that should probably work, but I haven't ever tried anything like that.

In theory you could probably do everything without even splitting the mirrors. Your mirrors would go stale, you'd still run onthe other array, and when the array you are working on is back up, you vgsync and you are going again. The lvsplit is probably a cleaner solution though.
Jaimin Parikh
Frequent Advisor

Re: Need to split a mirror to change a RAID chassis

Hi,

A lot depends on how mirrored oracle data is stored on arrays.

If you have mirrored copies on different arrays than I think 'lvsplit' and 'lvmerge' is the best option.

Good luck.

Jaimin
JAIMIN PARIKH : Share your knowledge and help those who need your help!!