Operating System - HP-UX
1835238 Members
2594 Online
110078 Solutions
New Discussion

Extent Based Striping-LVM

 
roadrunner_1
Regular Advisor

Extent Based Striping-LVM

1. Can we convert a non-extent based striping to a extent based striping and then mirror to another extent based striped group.

2. Whats the max no of PV that go into a /etc/lvmpvg(Is it equal to the number of max PVs in a vg).

3. Which one of the following is better when we have 10GB x 100 devices=1TB capacity in a volume group
a. Non-extent based striping with -i=4 and I=128 for lvol creation
b. Extend based striping with 4 devices in each PVG under each VG in /etc/lvmpvg OR all the 100 devices in 1 PVG
8 REPLIES 8
Donny Jekels
Respected Contributor

Re: Extent Based Striping-LVM

tweet tweet. slow down chap

so many questions.

1. sure you can convet non-extent lv to entent base.

create another logical volume on and use either dd if=/dev/XXX/lvol1 of=/dev/XXX/lvol2

or

newfs

mount


and use

cd /copyfromdir; tar cvf - . | (cd /copytodir; tar xvf -)

that should take care of question #1
asuming you know how to create a extent base LV!!!
"Vision, is the art of seeing the invisible"
Donny Jekels
Respected Contributor

Re: Extent Based Striping-LVM

brakes in flames yet?

/etc/lvmpvg is just a text file indicating which disk belong to which group. sort of nice to have to keep your head clear for better things in life.

It has no relation to the max PV.

I reffer to groups as (i) mirror disks or (ii) disk on different devices i.e. XP and EMC.

Physical Volume Groups is a method of keeping track of the disks.

you can delete the file and your VG will still be intact---

peace
Donny
"Vision, is the art of seeing the invisible"
Tim D Fulford
Honored Contributor

Re: Extent Based Striping-LVM

1 - No.. not on-line, any way.. back-up & restore. You can rename new LV's though
# off-line..
#
# lvcreate -D y -s g ... -n newlv
#
# lvremove -f /dev/vgxx/oldlv
# mv /dev/vgxx/newlv /dev/vgxx/oldlv
# mv /dev/vgxx/rnewlv /dev/vgxx/roldlv

2 - default is 16.. using this you can have a maximum of 16 PV's in the VG (so 8 mirrored pairs if you wish). You can increaee the max PV's per vg at the vgcreation time ONLY.

3 - I prefere extent striped LV as it is..
o more flexible (you can use mirroring, pvmove etc)
o generally provides quite a good and even IO distribution to the individual disks/LUNS
o Does not massively enforce a particular block size, so improving IO efficiency.

you can find circumstances where one or all of the above are better serviced by kB striping, but for things like OLTP databases I have found the above a good rule of thumb... opionions will differ...

Regards

Tim
-
Donny Jekels
Respected Contributor

Re: Extent Based Striping-LVM

Tim is right, you cannot do it online. but my procedure will work online if you kick every one off your system and close all your apps without breaking anything.

3rd. do yourself a favor and create 3 LV's with different sizes 128, 64 and 32.

perform copy tests to and from those LV's and test the speed. for your environment.

then choose the best one for your environment.

peace
Donny
"Vision, is the art of seeing the invisible"
Donny Jekels
Respected Contributor

Re: Extent Based Striping-LVM

FYI:

use timex for your testing it works best.

#timex dd if=/dev/vgtest/lv128 of=/dev/null bs=10k

record speed, do same for each LV. remember this is read speed only.

to perform write speed test reverse from a large file

#tiemx dd if=/tmp/my2gigfile of=/dev/vgtest/lv128 bs=10k

enjoy
"Vision, is the art of seeing the invisible"
Donny Jekels
Respected Contributor

Re: Extent Based Striping-LVM

pretty sad for points.
"Vision, is the art of seeing the invisible"
Sridhar Bhaskarla
Honored Contributor

Re: Extent Based Striping-LVM

Hi,

1. No you cannot. You will need to recreate a filesystem and then restore. Or create a new filesystem with extent based striping and then copy the data from the non-striped filesystem.

2. If you are talking about *real* PVs then you are right. However, you can also specify the alternate path. So, the number of *devices* listed in there can be more than 255 just like /etc/lvmtab.

3. Non-extent based striping will be much superior to extent based striping. However, it depends on your application needs. In extent based striping the stripe size is equal to your extent size which may not be really fruitful. However, extent based striping allows you to mirror which means you may get better availability at the cost of performance. There are certain limitations to any striping that you will need to keep adding 4 more disks if you want to extend. With both extent and LVM striping, failure of one disk means losing data. So, I would suggest you create multiple filesystems if your application allows. If this is a database, I would create multiple filesystems (LVM striped not extent based) using different sets of disks. Seperate datafiles, indices, redologs etc., on seperate sets so that they don't fight with each other.

-Sri

You may be disappointed if you fail, but you are doomed if you don't try
Sridhar Bhaskarla
Honored Contributor

Re: Extent Based Striping-LVM

Hi (Again),

Little more clarification on my point 2. I meant it per VG. /etc/lvmpvg holds information for all the VGs that are configured with LVMPVGs.

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