LVM and VxVM

Is it possible to create a LV in two PVGS?

 
Sreer
Valued Contributor

Is it possible to create a LV in two PVGS?

Hi Gurus...
Is it posible to create an LV in the following way?

My existing PVG is :
# strings /etc/lvmpvg
VG /dev/vg05
PVG pvga
/dev/dsk/c2t0d0
PVG pvgb
/dev/dsk/c3t2d0
[rx260-05]/
#

Iam trying to create an LV which has to be ditributed in the disks /dev/dsk/c2t0d0 and /dev/dsk/c3t2d0 both disks in different pvgs...

# lvcreate -n lvdata -D y -s g -l 4 /dev/vg05
Logical volume "/dev/vg05/lvdata" has been successfully created with
character device "/dev/vg05/rlvdata".
lvcreate: Not enough free physical extents available.
Logical volume "/dev/vg05/lvdata" could not be extended.
Failure possibly caused by PVG-Strict or Distributed allocation policies.
[rx260-05]/

# lvdisplay /dev/vg05/lvdata
--- Logical volumes ---
LV Name /dev/vg05/lvdata
VG Name /dev/vg05
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 0
Current LE 0
Allocated PE 0
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation PVG-strict/distributed
IO Timeout (Seconds) default

[rx260-05]/

Could you pls support?

rgds Sree
10 REPLIES 10
Michal Kapalka (mikap)
Honored Contributor

Re: Is it possible to create a LV in two PVGS?

hi,

at first, check with vgdisplay -v /dev/vg05,

if you have a free PE to create a new L-vol.

mikap
Bulent ILIMAN
Trusted Contributor

Re: Is it possible to create a LV in two PVGS?

You may try to use lvcreate -s n parameter to disable strict allocation

Also another workaround may be to create lv in only one pvg and then extend the lv to the second pv.

you can find man pages for lvcreate here:
http://docs.hp.com/en/B2355-60127/lvcreate.1M.html#d0e366925

lvextend :
http://docs.hp.com/en/B2355-60127/lvextend.1M.html#d0e368613
Bill Costigan
Honored Contributor

Re: Is it possible to create a LV in two PVGS?

You could edit the /etc/lvmpvg file to put both disk in the same group, create the LV and then put the /etc/lvmpvg group back the way it was.
Johnson Punniyalingam
Honored Contributor

Re: Is it possible to create a LV in two PVGS?

>>>>>lvcreate: Not enough free physical extents available.
Logical volume "/dev/vg05/lvdata" could not be extended.
Failure possibly caused by PVG-Strict or Distributed allocation policies.<<<<<<<<<<

vgdisplay -v /dev/vg05 |more -> look for Free PE * PE Size = ?

the above error shows clear you d'not have enough "Physical Extents" = PE to extend your logical volume.

possibilities, you override "PVG-Strict or Distributed allocation policies"

As per above post mentioned"

Better options is to "vgextend" for /dev/vg05
add additional disks and proceed to "lvextend"

Thanks,
Johnson
Problems are common to all, but attitude makes the difference
Sreer
Valued Contributor

Re: Is it possible to create a LV in two PVGS?

Hi All,

There is enough PEs available in both disks.
It is working If Iam putting both disks in same pvg eg. pvga!!!

But not in the mentioned way as in mail.

please proceed your valuable support!!

rgds Sree

Vivek_Pendse
Valued Contributor

Re: Is it possible to create a LV in two PVGS?

Try this:
1. Create LV without giving size:
lvcreate -n lvdata vg01
2. Now, extend the LV on specific disk, which you want:
lvextend -L 500 /dev/vg01/lvdata /dev/dsk/c4t2d0
& then mention the other disk.

Regards,
Vivek
Bill Costigan
Honored Contributor

Re: Is it possible to create a LV in two PVGS?

What do you mean by -

It is working If Iam putting both disks in same pvg eg. pvga!!!

"But not in the mentioned way as in mail."

If it does work by putting both disks in the same PVG then you should be able to stripe the extents across both disks. Of course you will only be able to stripe the extents util the disk with the least number of free extents run out.

In my experience the PVGs are only used while the extents are being allocated. Once that is done, changes to the PVGs do not effect the lvol at all.
sujit kumar singh
Honored Contributor

Re: Is it possible to create a LV in two PVGS?

Hi


-D y means Extent Based Striping in a Distributed manner that allocates the PEs in a round Robin fashion from the available disks belonging to the same PVG.
Note that there must be more than 1 disk if that is intended.

-s g means PVG strict policy that is the mirror of an LV that is on one PVG can only reside in another PVG.

What you wish can work if your /etc/lvmpvg is like this

VG /dev/vgXX
PVG pvga
/dev/dsk/c0t1d0
/dev/dsk/c0t2d0
PVG pvgb
/dev/dsk/c0t3d0
/dev/dsk/c0t4d0


can refer for more to man 4 lvmpvg as well as the -D option of man lvcreate.

The following command creates a logical volume in vgtest with EXTENT-
BASED MIRRORED STRIPES:

lvcreate -D y -s g -m 1 -l 5 /dev/vgtest

The distributed allocation proceeds as follows:
+ A free extent is allocated from the 1st pvol in pvg1.
+ A free extent is allocated from the 2nd pvol in pvg1.
+ A free extent is allocated from the 1st pvol in pvg1.
+ A free extent is allocated from the 2nd pvol in pvg1.
+ A free extent is allocated from the 1st pvol in pvg1.
+ Mirrors for the five extents are then allocated from the free
extents in pvg2 in a similar manner.

regards
sujit
Rita C Workman
Honored Contributor

Re: Is it possible to create a LV in two PVGS?

Your question was:
>>Iam trying to create an LV which has to be ditributed in the disks /dev/dsk/c2t0d0 and /dev/dsk/c3t2d0 both disks in different pvgs...


A volume group contains it's own disk. The volume group is divided into logical volumes. A volume group can not contain it's disks and another volume group's disks.

So, my answer (in my opinion) is No .. you can not extend your /dev/vgx/lvolx to disk owned by another volume group.

If you need more space, either add more disk, or remove that disk from that second volume group and give it to the first one.

Kindest regards,
Rita