From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx07.extmail.prod.ext.phx2.redhat.com [10.5.110.11]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o9BIM4cZ013896 for ; Mon, 11 Oct 2010 14:22:04 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o9BILnng027285 for ; Mon, 11 Oct 2010 14:21:50 -0400 From: "Riches Jr, RobertX M" Date: Mon, 11 Oct 2010 11:21:47 -0700 Message-ID: <4BD43A85686FC34D819098DB1C3999D9B0C5CE17@orsmsx502.amr.corp.intel.com> Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_4BD43A85686FC34D819098DB1C3999D9B0C5CE17orsmsx502amrcor_" MIME-Version: 1.0 Subject: [linux-lvm] vgcreate fails with return value 5 Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: To: "Linux-Lvm, mailing list send-to address (linux-lvm@redhat.com)" --_000_4BD43A85686FC34D819098DB1C3999D9B0C5CE17orsmsx502amrcor_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 t= o create two PVs, then immediately calls vgcreate to create the VG. An exit code of 5 appears to indicate excessive numbers of VGs. However, t= here 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 t= o 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 --_000_4BD43A85686FC34D819098DB1C3999D9B0C5CE17orsmsx502amrcor_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

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 scri= pt 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.&nbs= p; 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?&= nbsp; 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

 

 

--_000_4BD43A85686FC34D819098DB1C3999D9B0C5CE17orsmsx502amrcor_-- From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx06.extmail.prod.ext.phx2.redhat.com [10.5.110.10]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id o9BL4Iic004110 for ; Mon, 11 Oct 2010 17:04:19 -0400 Received: from e31.co.us.ibm.com (e31.co.us.ibm.com [32.97.110.149]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o9BL45YQ019108 for ; Mon, 11 Oct 2010 17:04:06 -0400 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e31.co.us.ibm.com (8.14.4/8.13.1) with ESMTP id o9BKpSWA023802 for ; Mon, 11 Oct 2010 14:51:28 -0600 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o9BL45fw158636 for ; Mon, 11 Oct 2010 15:04:05 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o9BL44hr007870 for ; Mon, 11 Oct 2010 15:04:04 -0600 Received: from malahal (malahal-009047025235.beaverton.ibm.com [9.47.25.235]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id o9BL44Z2007839 for ; Mon, 11 Oct 2010 15:04:04 -0600 Date: Mon, 11 Oct 2010 14:04:03 -0700 From: Malahal Naineni Message-ID: <20101011210403.GA6334@us.ibm.com> References: <4BD43A85686FC34D819098DB1C3999D9B0C5CE17@orsmsx502.amr.corp.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4BD43A85686FC34D819098DB1C3999D9B0C5CE17@orsmsx502.amr.corp.intel.com> Content-Transfer-Encoding: 8bit Subject: Re: [linux-lvm] vgcreate fails with return value 5 Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: Content-Type: text/plain; charset="utf-8" To: linux-lvm@redhat.com 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. From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4CB5908D.4040602@redhat.com> Date: Wed, 13 Oct 2010 11:57:17 +0100 From: "Bryn M. Reeves" MIME-Version: 1.0 References: <4BD43A85686FC34D819098DB1C3999D9B0C5CE17@orsmsx502.amr.corp.intel.com> In-Reply-To: <4BD43A85686FC34D819098DB1C3999D9B0C5CE17@orsmsx502.amr.corp.intel.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [linux-lvm] vgcreate fails with return value 5 Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: Content-Type: text/plain; charset="iso-8859-1" To: LVM general discussion and development Cc: "Riches Jr, RobertX M" On 10/11/2010 07:21 PM, Riches Jr, RobertX M wrote: > I=EF=BF=BDm running into an odd problem in which vgcreate fails with a re= turn value or=20 > exit code of 5. It is called from a script that calls pvcreate twice to c= reate=20 > 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=20 > are no other VGs on the system prior to this call to vgcreate. Search eng= ine=20 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 create= d a few=20 > 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.