Operating System - HP-UX
1752788 Members
6321 Online
108789 Solutions
New Discussion юеВ

lvcreate: Couldn't create PVG-strict LV

 
SOLVED
Go to solution
Tapas Jha
Valued Contributor

lvcreate: Couldn't create PVG-strict LV

Hi,

I am facing one problem while creating logical volume on vg00
on hp-ux 11.00.

It is giving below error. I want strict allocation policy with
mirror.

We follow below procedure and never faces problem but this time.

# lvcreate -D y -s g -m 1 -L 350 /dev/vg00

lvcreate: Couldn't create PVG-strict LV because
VG "/dev/vg00" is not defined in "/etc/lvmpvg".


Below is /etc/lvmpvg

VG /dev/vg01
PVG pvg1
/dev/dsk/c6t8d0
/dev/dsk/c6t9d0
/dev/dsk/c6t10d0
/dev/dsk/c6t11d0
PVG pvg2
/dev/dsk/c7t8d0
/dev/dsk/c7t9d0
/dev/dsk/c7t10d0
/dev/dsk/c7t11d0

Rgds
Tapas
Tapas Jha
9 REPLIES 9
Steven E. Protter
Exalted Contributor

Re: lvcreate: Couldn't create PVG-strict LV

You might find the following process will get you around your issue, which is difficult to discern without some lvdipslay reports.

lvcreate the logical volume without space allocation.

lvcreate logical volume name

lvextend /dev/vg00/lvmpvg -L /dev/dsk/c6t#d0

lvextend -m 1 /dev/vg00/lvmpvg /dev/dsk/c7t#d0

lvcreate probably isn't smart enough to figure out what disk to set up the space on. The multi step process achieves the same result and allows you to tell the system exactly where to allocate the first copy and then the mirror copy.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Shaikh Imran
Honored Contributor

Re: lvcreate: Couldn't create PVG-strict LV

hi,
I think you have to use lvcreate first and then for mirroring you have to use lvextend.

see man lvcreate & lvextend for more details.

Regards,

I'll sleep when i am dead.
Dietmar Konermann
Honored Contributor

Re: lvcreate: Couldn't create PVG-strict LV

Tapas,

I'm a little bit confused. The error message seems to describe *exactly* what the problem is: VG "/dev/vg00" is not defined in "/etc/lvmpvg".

You used '-s g' for 'PVG-strict' allocaton policy in vg00, but you haven't defined any PVG for /dev/vg00.

Either you leave the '-s g' option (and use the default 'strict' policy) or you create at least two PVGs for vg00.

Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Dietmar Konermann
Honored Contributor

Re: lvcreate: Couldn't create PVG-strict LV

I forgot to mention... a possibility to extend or add a physical volume group is to edit the /etc/lvmpvg file as described in vgcreate(1M). See lvmpvg(4) man page for format details.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Tapas Jha
Valued Contributor

Re: lvcreate: Couldn't create PVG-strict LV

Hi Dietmar,

I think you are right. I think from below findings you can explain clearly to me.

In VG00 some(3) logical volumes allocation are showing strict/contiguous and some are showing strict.
But for VG01 all logical volumes allocation policy are showing PVG-strict/distributed.

After creating entry in /etc/lvmpvg as below
VG /dev/vg00
PVG pvg1
/dev/dsk/c1t2d0
PVG pvg2
/dev/dsk/c2t2d0

While creating it gives
# lvcreate -D y -s g -m 1 -L 10 /dev/vg00
Warning: rounding up logical volume size to extent boundary at size "12" MB.
Logical volume "/dev/vg00/lvol11" has been successfully created with characterdevice "/dev/vg00/rlvol11".
lvcreate: Not enough free physical extents
available.
Logical volume "/dev/vg00/lvol11" could not be extended.
Failure possibly caused by PVG-Strict or Distributed allocation policies.

But without -D y -s g i am able to create logical volume.
So space is not a problem since we have 2GB free space.

Can you explain pl. ?

Rgds
Tapas
Tapas Jha
Bharat Katkar
Honored Contributor

Re: lvcreate: Couldn't create PVG-strict LV

Tapas,
Have a look at this doc.
That should help.
Regards,
You need to know a lot to actually know how little you know
Dietmar Konermann
Honored Contributor
Solution

Re: lvcreate: Couldn't create PVG-strict LV

Tapas,

you created 2 PVGs in vg00 now, each containing a single PV.

Now you try to create a distributed (-D y) lvol... that does not make sense, since each PVG only contains on PV. How should LVM distribute?

For the distributed allocation policy you need at least two PVs in a PVG. With mirroring you need at least two PVs in two PVGs.

BTW, does your vg00 only consist of these two PVs? If this is the case, then the defaul "strict" is all you need. Don't worry about all these options... it's the default that will suffice perfectly.

Best regards...
Dietmar
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
Tapas Jha
Valued Contributor

Re: lvcreate: Couldn't create PVG-strict LV

Hi Dietmar,

Thanx a lot.

One more clarification.
If i creat one PVG in VG00 containing two PVs then will it be distributed?

Why lvol1,lvol2 and lvol3 are showing strict/contiguous and rest are showing strict allocation policy?
How do i change rest from strict to strict/contiguous policy?

Bharat: I am using HP-UX11.00. But your document is a good one.
Thanx for your document.

Rgds
Tapas


Tapas Jha
Dietmar Konermann
Honored Contributor

Re: lvcreate: Couldn't create PVG-strict LV

Tapas,

you should really have a look at the lvcreate(1M) man page... the allocaton policies are described in detail there.

The default is "strict"... however, the vg00/lvol1..3 are created "strict/contiguous" during cold installation (-C y). This is required, since the early steps during bootup need to be done without LVM driver... e.g. the boot loader has no LVM, but needs to read /stand to load the the kernel. Another example is a dump volume, since dumpsys() dumps without LVM also.

Concerning you other question. If you have a single PVG containing 2 PVs in vg00 then you you could use -D y. But only without mirroring.

Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)