1826086 Members
4574 Online
109690 Solutions
New Discussion

Mirroring & Striping

 
Paul Mccleary_2
Occasional Advisor

Mirroring & Striping

Hi,

E.g. A HASS with 2 HBA connections and 4x18GB Disks. Say 2 disks are
cyt6d0/cyt5d0 and the other 2 are cxt6d0/cxt5d0.

I need to stripe between cyt6d0 and cyt5d0 of the disks and mirror these to
cxt6d0 and cxt5d0.

Can anyone provide the syntax and info to do this?

I know I need to use -D in the lvcreate command and not -i, and that I need to
use /etc/lvmpvg , but I'm not sure on it all.

What stripe size does it use?

Thanks in advance, Paul
3 REPLIES 3
Roger Pusey_2
New Member

Re: Mirroring & Striping

Hi Paul,

You don't mention which version of the O/S you are running, but this should
help :

At HP-UX 10.20 with the latest "LVM commands cumulative
patch" (PHCO_18563), A new option was added to lvcreate
to enable the fast setup of extent based stripes.

You need to make the LV PVG strict and thus must use
the 'lvmpvg' file.

By way of an example, if you wanted to have an
LV (logical volume) containing 20 LEs across 4 PVs,
such that the PEs were ordered:

PV0, PV1, PV2, PV3, PV0, PV1 etc...

1. Setup 'lvmpvg' file as follows:

VG /dev/vg03
PVG PV0
/dev/dsk/c0t2d0
/dev/dsk/c0t2d1
/dev/dsk/c0t2d2
/dev/dsk/c0t2d3

2. Create your LV.

# lvcreate -l 20 -D y -s g vg03 (See manpage)

If you wanted a mirrored extent stripe LV then you
would need to setup another PVG in the 'lvmpvg' file,
for example:

VG /dev/vg03
PVG PV0
/dev/dsk/c0t2d0
/dev/dsk/c0t2d1
/dev/dsk/c0t2d2
/dev/dsk/c0t2d3
PVG PV1
/dev/dsk/c1t2d0
/dev/dsk/c1t2d1
/dev/dsk/c1t2d2
/dev/dsk/c1t2d3

Then :

# lvcreate -l 20 -D y -s g -m 1 vg03

This should create an extent striped mirrored LV.

To ensure you have the allocation you desire you must
make sure you have enough free PEs on the PVs.
See the updated man page for lvcreate with the
latest LVM command patch (Detailed above).
Also check the layout, via an l"vdisplay -v", before
loading any data to make sure it is as you want it.

Regards,

Roger.
Andreas Voss
Honored Contributor

Re: Mirroring & Striping

Hi,

i have read your questions an the answers from Roger.
What Roger says is correct but he has forgotten to explain which sizes the stripes has.
Now, when you create the volume group you can set the physical extend size to 1 MB (default is 4MB) and that's the minimal stripe size for distributed striping.

Andrew
Dave Wherry
Esteemed Contributor

Re: Mirroring & Striping

Another thing to consider is what you are trying to accomplish here. You typically stripe for performance reasons. It is questionable as to whether striping to just two disks gives you a performance gain. I've been told and it is my experience that you really want to stripe across three or more disks, kind of like Raid-5 which requires 3 or more disks.
You mirror for data protection/integrity. In your scenario you can lose one disk or a controller and be OK.
With just four disks you're not talking about a lot of data. The striping may just overcomplicate things. If you need to extend a logical volume in the future you will not be able to if it is striped.
You may be better off just doing the mirroring as you described it. All of your writes will go down the first controller to your primary disks and then the mirrors. Reads will be serviced by either one so you can gain a little in performance there.
It's not exact and it all depends on how you use this data. Don't stress over it too much. The return is not that great.