linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] vgcreate fails with return value 5
@ 2010-10-11 18:21 Riches Jr, RobertX M
  2010-10-11 21:04 ` Malahal Naineni
  2010-10-13 10:57 ` Bryn M. Reeves
  0 siblings, 2 replies; 3+ messages in thread
From: Riches Jr, RobertX M @ 2010-10-11 18:21 UTC (permalink / raw)
  To: Linux-Lvm, mailing list send-to address (linux-lvm@redhat.com)

[-- Attachment #1: Type: text/plain, Size: 829 bytes --]

I'm running into an odd problem in which vgcreate fails with a return value or exit code of 5.  It is called from a script that calls pvcreate twice to create two PVs, then immediately calls vgcreate to create the VG.

An exit code of 5 appears to indicate excessive numbers of VGs.  However, there are no other VGs on the system prior to this call to vgcreate.  Search engine results indicate the PV might be corrupt.  However, the PV was just created a few milliseconds before calling vgcreate.

When calling vgcreate immediately after calling pvcreate, is there a need to wait for some after-effects of the pvcreate to settle out?  Is there some command to positively determine whether the PV is actually ready and open for business?

Any other suggestions?

Thank you,

Robert Riches
Azad Consultant at Intel



[-- Attachment #2: Type: text/html, Size: 3612 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-lvm] vgcreate fails with return value 5
  2010-10-11 18:21 [linux-lvm] vgcreate fails with return value 5 Riches Jr, RobertX M
@ 2010-10-11 21:04 ` Malahal Naineni
  2010-10-13 10:57 ` Bryn M. Reeves
  1 sibling, 0 replies; 3+ messages in thread
From: Malahal Naineni @ 2010-10-11 21:04 UTC (permalink / raw)
  To: linux-lvm

Riches Jr, RobertX M [robertx.m.riches.jr@intel.com] wrote:
>    An exit code of 5 appears to indicate excessive numbers of VGs.� However,
>    there are no other VGs on the system prior to this call to vgcreate.�
>    Search engine results indicate the PV might be corrupt.� However, the PV
>    was just created a few milliseconds before calling vgcreate.
> 
>    When calling vgcreate immediately after calling pvcreate, is there a need
>    to wait for some after-effects of the pvcreate to settle out?� Is there
>    some command to positively determine whether the PV is actually ready and
>    open for business?

I am not aware of any such issue, but you can run "pvs" and find out if
your newly created PV is listed in the output.

>    Any other suggestions?

If you can create a test script that creates two PV's out of two loop
mounted temporary files and re-create your bug, then someone in the
dm-devel forum would surely help.

Thanks, Malahal.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-lvm] vgcreate fails with return value 5
  2010-10-11 18:21 [linux-lvm] vgcreate fails with return value 5 Riches Jr, RobertX M
  2010-10-11 21:04 ` Malahal Naineni
@ 2010-10-13 10:57 ` Bryn M. Reeves
  1 sibling, 0 replies; 3+ messages in thread
From: Bryn M. Reeves @ 2010-10-13 10:57 UTC (permalink / raw)
  To: LVM general discussion and development; +Cc: Riches Jr, RobertX M

On 10/11/2010 07:21 PM, Riches Jr, RobertX M wrote:
> I�m running into an odd problem in which vgcreate fails with a return value or 
> exit code of 5. It is called from a script that calls pvcreate twice to create 
> two PVs, then immediately calls vgcreate to create the VG.

Exit status 5 just means "command failed":

$ grep -r ECMD_FAILED ~/cvs/LVM2/lib/commands/errors.h
#define ECMD_FAILED		5

> An exit code of 5 appears to indicate excessive numbers of VGs. However, there 
> are no other VGs on the system prior to this call to vgcreate. Search engine 

There are hundreds of possible reasons for this error:

$ grep -r ECMD_FAILED ~/cvs/LVM2/ | wc -l
271

> results indicate the PV might be corrupt. However, the PV was just created a few 
> milliseconds before calling vgcreate.

The tools normally output a more descriptive error indicating what went
wrong. If for some reason you are not getting anything helpful add more
verbosity (e.g. -vvvv) to try to understand where it's failing.

Regards,
Bryn.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-10-13 10:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-11 18:21 [linux-lvm] vgcreate fails with return value 5 Riches Jr, RobertX M
2010-10-11 21:04 ` Malahal Naineni
2010-10-13 10:57 ` Bryn M. Reeves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).