1834378 Members
2183 Online
110066 Solutions
New Discussion

Disk Striping with LVM

 
SOLVED
Go to solution
KPS
Super Advisor

Disk Striping with LVM

I'm trying to create a mountpoint of 20Gig striping across 4 8Gigabyte EMC Disk Hypervolumes. I've already ran a pvcreate to initialize the disks and also have run vgcreate command to create volgroups and specified the physical hypervols it will contain. I know I need to next run the lvcreate command and to define how many disks I'm striping across, and also define the stripe size.

ie: lvcreate -i(#of disks) -I(StripeSize)/dev/vg02

I'm not real familiar with this command, so I'm wondering if anyone has any good examples or logic on how I create my lvols striped across the 4 disks i'm working with here??
13 REPLIES 13
Sean OB_1
Honored Contributor
Solution

Re: Disk Striping with LVM

lvcreate -L 20480000 -i 4 -I 256 /dev/vg02


You'll want to determine the stripe size. I chose 256k as a default, but this is something you'll want to determine.
KPS
Super Advisor

Re: Disk Striping with LVM

That's a good example....I appreciate it.

One other question...Do i have to specify anything out of the ordinary when I run the newfs command after lvcreate? I was planning on just running the following command:

newfs -F vxfs /dev/vg02/lvol1 /u01

Thanks again for your help...
Sanjay_6
Honored Contributor

Re: Disk Striping with LVM

Hi,

You may want to use the -o largefiles option with the newfs command. This will allow the creation of files larger than 2GB on this filesystem.

newfs -F vxfs -o largefiles /dev/vg_name/rlv_name

also here is the lvm cookbook from itrc for more help.

http://us-support3.external.hp.com/iv/data/documents/DE_SW_UX_swrec_EN_01_E/LVM.pdf

Hope this helps.

Regds
unixdaddy
Trusted Contributor

Re: Disk Striping with LVM

This pdf is quite good: B2355-90672.pdf. it discuss stiping for 10.20. Search for it on the ITRC.
Sridhar Bhaskarla
Honored Contributor

Re: Disk Striping with LVM

Ken,

In my view, the best practice is to create a 0 sized logical volume and then extend it on selected disks for striped volumes.

lvcreate -i 4 -I 64 -n lvol2 /dev/vg02

Now extend it to the selective disks.

lvextend -L 20000 /dev/vg02/lvol2 /dev/dsk/c#t#d# /dev/dsk/c#t#d# /dev/dsk/c#t#d# /dev/dsk/c#t#d#.

If you specify the size in the first place and if you have more than 4 empty disks in the volume group, it might not take the disks that you are intending to use.


-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Ashwani Kashyap
Honored Contributor

Re: Disk Striping with LVM

Hi Ken ,

Everyone gave you good examples . How ever I have another solution . If you do LVM striping its just another software overhead .

Why don't you have EMC combine your four 8GB hyper volumes into one 32 GB Meta volume presnted to HPUX as one LUN . They can stripe the Meata volume across the four 8 GB hyper with your choice of stripe size or whatever they calculate the best value to be .

After that you can use the LUN as any other ordinary disks and don't have to bother about striping . There is no software overhead .


Ash
Rodney Hills
Honored Contributor

Re: Disk Striping with LVM

I agree with Sri, but I execute lvextend with in small increments in a round robin fashion for each physical disk.

lvextend -L 1 /dev/vg02/lvol2 /dev/dsk/c0t1d0
lvextend -L 2 /dev/vg02/lvol2 /dev/dsk/c0t2d0
lvextend -L 3 /dev/vg02/lvol2 /dev/dsk/c0t3d0
lvextend -L 4 /dev/vg02/lvol2 /dev/dsk/c0t1d0
lvextend -L 5 /dev/vg02/lvol2 /dev/dsk/c0t2d0
...etc

The manual calls this interleaving instead of striping, but it has the same effect. And like Sri said, LVM base striping has less control on where the stripes are put.

Hope this helps...

-- Rod Hills
There be dragons...
Craig Rants
Honored Contributor

Re: Disk Striping with LVM

One item of note the -I should be 32 for and EMC and 64 for an Autoraid.

GL,
C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Deshpande Prashant
Honored Contributor

Re: Disk Striping with LVM

Hi
I prefer to use distributed striping.
#vgcreate -p4 -s2 -g PVG0 /dev/vg01 /dev/dsk/cxtyd0 .... cxtyd3

#lvcreate -D y -s g -L -n lv1 /dev/vg01

This way each LV will be created with one extent on each PV in VG.

Thanks.
Prashant.
Take it as it comes.
Tim D Fulford
Honored Contributor

Re: Disk Striping with LVM

Just a quick comment on the above solutions

1 - No one has differentiated between kilobyte stripes
# lvcreate -i (N_LUN) -I (stripe size) -L -n vgxx
and extent based striping
# lvcreate -D y -s g -n -L vgxx

They are very different for two reasons
o Extent based striping can be mirrored, kilobyte cannot. Whilst the LV will is on mirrored EMC, If you ever need to migrate, to ne disks etc, mirroring is a good way of doing this
o stripe size. Extent based striping uses the PE size, usually 4MB. kilobyte striping uses the specified stripe size.

Regards

Tim
-
Tim D Fulford
Honored Contributor

Re: Disk Striping with LVM

oops me again. You cannot use kilobye striping (I assumed EMC was doing the mirroring!) You will need to do Extent based striping

create /etc/lvmpvg

# lvcreate -D y -s g -n -L 20480 vg02

# newfs -F vxfs -o largefiles /dev/vg02/r

mount /dev/vg02/ /
Tim
-
Tim D Fulford
Honored Contributor

Re: Disk Striping with LVM

ooops

# lvcreate -D y -s g -m 1 -L 20480 -n vg02

This will mirror the lvol

Tim
-
harry d brown jr
Honored Contributor

Re: Disk Striping with LVM

Ken,

you have about 40 posts you haven't responded to:

http://forums.itrc.hp.com/cm/TopSolutions/1,,CA667679!1!questions,00.html

live free or die
harry
Live Free or Die