1837016 Members
2272 Online
110111 Solutions
New Discussion

LVM RAID 0+1

 
SOLVED
Go to solution
Ranjith_5
Honored Contributor

LVM RAID 0+1

Hi Gurus,

What is the step by step procedure to create a striping with mirroring in LVM ( RAID 0+1).I understand that there is somthing called EXTENT BASED MIRRORED STRIPES which can be achieved with Distributed allocation policy in LVM.

For understanding this I request you to explain about the following.
1. About PVGs & how to go ahead and create it.
2. What is the advantage of Extent based mirrored stripes.
3. A practical application of this kind of mirroring.


I am waiting for your expert answers.
Regards,
Syam
5 REPLIES 5
Tim Nelson
Honored Contributor
Solution

Re: LVM RAID 0+1

create volume group and specify physical disk group in command or edit /etc/lvmpvg
vgcreate /dev/vgabc disk1 disk2 disk3 -g pvg1
vgextend /dev/vgabc disk4 disk5 disk6 -g pvg2
/etc/lvmpvg looks like this:
VG /dev/vgabc
PVG pvg1
/dev/dsk/c9t0d0
/dev/dsk/c9t2d0
/dev/dsk/c9t4d0
/dev/dsk/c9t6d0
PVG pvg2
/dev/dsk/c5t0d0
/dev/dsk/c5t2d0
/dev/dsk/c5t4d0
/dev/dsk/c5t6d0
lvcreate -L 2048 -D y -s g -m -n mylvol /dev/vgabc

newfs /dev/vgabc/rmylvol
mount /dev/vgabc/mylvol /mydir
Leif Halvarsson_2
Honored Contributor

Re: LVM RAID 0+1

Hi,

In addition to the previous reply I would recommend you to look at the graphical tool in SAM. You can do almost any LVM configuration task from the GUI. There is also a terminal-based "semi-grapichal" version of SAM.

start sam and select "Disk and Filesystem".
Ranjith_5
Honored Contributor

Re: LVM RAID 0+1

Hi,

Thanks for all your reply , But I am waiting for the answers of my other questions as well as some explanation on how EXTENT BASED MIRRORED STRIPES works.

2. What is the advantage of Extent based mirrored stripes.
3. A practical application of this kind of mirroring.


Regards,
Syam
Patrick Wallek
Honored Contributor

Re: LVM RAID 0+1

How they work:

With the '-D' option anything written to disk is striped across all disks in the PVG according to the 'PE SIZE' that the VG was created with. The problem with distributed striping is that your stripe size is quite large, default of 4MB, compared to normal striping. When these writes occur, the writes are done to the appropriate disks in both PVGs, thus keeping the mirrors in sync.

The advantage -- If you don't have a RAID array and want some redundency, but also want to stripe, then this allows you to do that. LVM does NOT allow you to do "normal striping", with the '-i' and '-I' options to lvcreate, and mirroring.

A practical application -- I used this with an application that worked with a Unidata DB in a previous job. It apparently did help. At one point I had problems and had to lay the LV back down non-striped. Users complained about performance until I re-did the LV with the distributed stripe during my next maintenacne window.
Ranjith_5
Honored Contributor

Re: LVM RAID 0+1

Patrick,

I think that was a great experience you had. Thanks for sharing the same.

Regards,
Syam