1754906 Members
3647 Online
108827 Solutions
New Discussion юеВ

Re: Mirror and Striping

 
SOLVED
Go to solution
Germ├бn Orozco
Occasional Contributor

Mirror and Striping

Are there some way for use Mirror and Striping in the same LV ?
5 REPLIES 5
Mike Plunkett
New Member

Re: Mirror and Striping

HP-UX and the mirroring software do not allow you to stripe and mirror (RAID 10 (or 1+0)) at the same time. I don't think the software allows RAID 5, you have to get one of the RAID hardware units.

Also, you can't mirror to the same LV. You would use use one LV to mirror another LV on the same VG.

mp
Don't Panic!
Steven Sim Kok Leong
Honored Contributor

Re: Mirror and Striping

Hi,

A possible workaround is via using lvcreate -D together with the -m option for distributed allocation policy with mirroring enabled. This policy allows you to distribute logical extents across multiple physical volumes. The distributed allocation policy requires the PVG-strict allocation policy ( -s g ) to ensure that mirrors of distributed extents do not overlap (for maximum availability).

Regards.

Steven Sim.
Garrin Thompson
Advisor
Solution

Re: Mirror and Striping

The following is a script I used to create a "striped" VG (by mapping extents sequentially to separate PV's) that I later mirrored. I hope it shows up correctly...I attached it as a text document as well. This has proved to work very effectively in the arena of performance since we are spreading I/O access over 3 PV's instead of letting only 1 handle all of the reads and writes.

vextend -l 2 /dev/vg01/rims /dev/dsk/c1t1d0 /dev/dsk/c2t1d0
lvextend -l 3 /dev/vg01/rims /dev/dsk/c1t2d0 /dev/dsk/c2t2d0
lvextend -l 4 /dev/vg01/rims /dev/dsk/c1t3d0 /dev/dsk/c2t3d0
a=1
while
a=`expr $a + 4`
[ $a -lt 8700 ]
do
lvextend -A n -l $a /dev/vg01/rims /dev/dsk/c1t0d0 /dev/dsk/c2t0d0
lvextend -A n -l `expr $a + 1` /dev/vg01/rims /dev/dsk/c1t1d0 /dev/dsk/c
2t1d0
lvextend -A n -l `expr $a + 2` /dev/vg01/rims /dev/dsk/c1t2d0 /dev/dsk/c
2t2d0
lvextend -A n -l `expr $a + 3` /dev/vg01/rims /dev/dsk/c1t3d0 /dev/dsk/c
2t3d0
done
2 Years old on HP-UX 10.20 R9000 server
Garrin Thompson
Advisor

Re: Mirror and Striping

There are some points of interest about the script...just remember I used this to create a striped Logical Volume at a particular size and over 3 particular disks. It would be easier to explain and coach in its use through e-mail so don't hesitate to ask (GT@maa-tpa.com).

Chow,
Garrin
2 Years old on HP-UX 10.20 R9000 server
Dave Wherry
Esteemed Contributor

Re: Mirror and Striping

The methods Steven and Garrin gave do essentially the same thing. It is called extent stripping.
Something to watch when doing this. If you make any changes to the defaults when you create your volume group, the lvcreates will run very slowly using Garrin's method, which used to be the only way to do this. When I created my volume group I changed Max PV to some number greater than the default of 16. I did this in case down the road my volume group needed more than 16 disk devices. The only way to change it is when you create the volume group. I also changed Max PE. By default it is set to the size of the largest disk you add when you create the volume group. Next year I may want to add a larger disk, which I could. However, if I started with 9GB disks and added an 18GB later, I would only be able to use 9GB of that 18GB - the Max PE. I wanted to avoid these types of problems later so I changed the defaults.
The further I got away from the default values, the slower lvcreate ran. I had to go back to the defaults to create my LV's in a reasonable amount of time.
Later I found a post in the forum asking the same question you have. A reply was posted on 4/11/2000, check back it may still be there. It described the method Steven gave, using the distributed option. It works much faster and easier than the old way of mulitple lvextends. To me it should win some Enhancement of the Year Award. It works great. Read up on lvcreate using the distributed option or look for that earlier post. It has all the details.

Extent stripped volumes can be mirrored.
Remember, mirroring slows down writes because the data needs to be written twice. It can speed up reads as the reads will be serviced form the copy with the shorter queue. Consider how you use the data before mirroring. You can pay a big performance penalty on systems that do a lot of writes.