Operating System - HP-UX
1833788 Members
2506 Online
110063 Solutions
New Discussion

Re: 2 logical vols within a volume grp

 
SOLVED
Go to solution
Azieh Ndangoh
Occasional Contributor

2 logical vols within a volume grp

I guess this question has already been asked X times, but the answers I have found so far haven't solved my problem.

I have already created a volume group containing 8 physical volumes, and I had one logical volume striping all 8 PEs. I realize however that I'll need 2 logical volumes within this volume group, each striping a set of 4 PEs.
I am lazy, and don't wanna create a new volume grp, and I guess I should be able to create multiple logical volumes within a single volume grp and specify the disks I wanna stripe.

I have read about /etc/lvmpvg, but don't know how it is read during lvcreate. Maybe I'm just stupid

help will be appreciated

inno
live and let die
4 REPLIES 4
Sandip Ghosh
Honored Contributor
Solution

Re: 2 logical vols within a volume grp

James R. Ferguson
Acclaimed Contributor

Re: 2 logical vols within a volume grp

Hi:

Fisst, you cannot 'stripe' but rather must use distributed extents. See the man pages for 'lvcreate' and 'lvmpvg' for more information.

That said, the 'etc/lvmpvg' file can be created *before* or *after* you have created a logical volume. It is easist to create the mapping beforehand. To do this, 'lvcreate' a zero-size logical volume, and then use 'lvextend' with the 'pvg_name' argument to actually allocate your extents according to the 'lvmpvg' file you created.

Regards!

...JRF...
Ashwani Kashyap
Honored Contributor

Re: 2 logical vols within a volume grp

Since you already have an LV striped on all 8 PV 's , you will have to back up any data on that lv , then remove it and recreate it with 4 PV's then restore the data .

Use the following to create the LV's
#lvcreate -n -i -I VG_NAME .
then do the following .
#lvextend -L /dev/vg_name/lv_name /dev/dsk/c.t.d.( your preffered 4 PV's )

Do the same for the other LV and use the other 4 disks .

I guess you wanted to use extent based mirroring using /etc/lvmpvg but according to my experience I never had better performance using it . I always got better performance when I chose my stripe size myself .
Eric Hess
Advisor

Re: 2 logical vols within a volume grp

I Think you mean all 8 PV's. If this is the case you will need to do a lvreduce on that current lv. lvreduce -l 0 "lvname" Then lvextend that lv to the 4 pv's and then create another lv to the other 4 pv's. Are you using all the pe within the volume group?
I didn't do it. He did!