Bug 1125154

Summary: Remove possible spurious "Physical volume <pv_name> not found" messages during PV creation
Product: Red Hat Enterprise Linux 6 Reporter: Peter Rajnoha <prajnoha>
Component: lvm2Assignee: Peter Rajnoha <prajnoha>
lvm2 sub component: Devices, Filtering and Stacking (RHEL6) QA Contact: Cluster QE <mspqa-list>
Status: CLOSED ERRATA Docs Contact:
Severity: low    
Priority: medium CC: agk, cmarthal, heinzm, jbrassow, msnitzer, nperic, prajnoha, prockai, zkabelac
Version: 6.6   
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: lvm2-2.02.109-1.el6 Doc Type: Bug Fix
Doc Text:
Cause: A wrong check during handling vgcreate while using disks for new VG for which PVs were not yet created, hence vgcreate itself is responsible for automatic PV creation. Consequence: There was a misleading error issued: "Physical volume <pv name> not found" which may have been repeated several times during vgcreate. Fix: The check for existing PVs was fixed in vgcreate code to not issue any errors if the PV can't be found and it's just to be created by vgcreate itself. Result: No "Physical volume <pv name> found" error issued if vgcreate creates the PV as part of its process.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-14 08:25:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Peter Rajnoha 2014-07-31 08:22:06 UTC
Originally found while testing bug #997223:

https://bugzilla.redhat.com/show_bug.cgi?id=997223#c10

Nenad Peric 2014-07-30 14:52:21 CEST

Interesting error when md device is used:

[root@tardis-01 ~]# mdadm -S /dev/md0
mdadm: stopped /dev/md0
[root@tardis-01 ~]# vgcreate two /dev/sdd1 /dev/sde1 /dev/sdf1
  Physical volume /dev/sdd1 not found
  Physical volume /dev/sdd1 not found
WARNING: software RAID md superblock detected on /dev/sdd1. Wipe it? [y/n]: n
  Aborted wiping of software RAID md superblock.
  Aborting pvcreate on /dev/sdd1.
  Unable to add physical volume '/dev/sdd1' to volume group 'two'.



Although if you do answer yes to the questions it will happily create the VG. 

[root@tardis-01 ~]# vgcreate --yes two /dev/sdd1 /dev/sde1 /dev/sdf1
  Physical volume /dev/sdd1 not found
  Physical volume /dev/sdd1 not found
  Wiping software RAID md superblock on /dev/sdd1.
  Physical volume /dev/sde1 not found
  Physical volume /dev/sde1 not found
  Wiping software RAID md superblock on /dev/sde1.
  Physical volume "/dev/sdd1" successfully created
  Physical volume "/dev/sde1" successfully created
  Physical volume "/dev/sdf1" successfully created
  Volume group "two" successfully created




The fix:
https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=ef8599798069b2c49aa1c296e6f8b050458b6aeb

Comment 2 Nenad Peric 2014-08-11 10:52:45 UTC
[root@virt-064 ~]# vgcreate two /dev/sde1 /dev/sdd1 /dev/sdf1 
  Incorrect metadata area header checksum on /dev/sdd1 at offset 4096
  Incorrect metadata area header checksum on /dev/sde1 at offset 4096
WARNING: software RAID md superblock detected on /dev/sde1. Wipe it? [y/n]: y
  Wiping software RAID md superblock on /dev/sde1.
WARNING: software RAID md superblock detected on /dev/sdd1. Wipe it? [y/n]: y
  Wiping software RAID md superblock on /dev/sdd1.
  Incorrect metadata area header checksum on /dev/sdd1 at offset 4096
  Incorrect metadata area header checksum on /dev/sdd1 at offset 4096
  Incorrect metadata area header checksum on /dev/sde1 at offset 4096
  Incorrect metadata area header checksum on /dev/sde1 at offset 4096
  Physical volume "/dev/sde1" successfully created
  Physical volume "/dev/sdd1" successfully created
  Clustered volume group "two" successfully created
[root@virt-064 ~]# 


Marking VERIFIED with:

lvm2-2.02.109-1.el6    BUILT: Tue Aug  5 17:36:23 CEST 2014
lvm2-libs-2.02.109-1.el6    BUILT: Tue Aug  5 17:36:23 CEST 2014
lvm2-cluster-2.02.109-1.el6    BUILT: Tue Aug  5 17:36:23 CEST 2014
udev-147-2.57.el6    BUILT: Thu Jul 24 15:48:47 CEST 2014
device-mapper-1.02.88-1.el6    BUILT: Tue Aug  5 17:36:23 CEST 2014
device-mapper-libs-1.02.88-1.el6    BUILT: Tue Aug  5 17:36:23 CEST 2014
device-mapper-event-1.02.88-1.el6    BUILT: Tue Aug  5 17:36:23 CEST 2014
device-mapper-event-libs-1.02.88-1.el6    BUILT: Tue Aug  5 17:36:23 CEST 2014
device-mapper-persistent-data-0.3.2-1.el6    BUILT: Fri Apr  4 15:43:06 CEST 2014
cmirror-2.02.109-1.el6    BUILT: Tue Aug  5 17:36:23 CEST 2014

Comment 3 errata-xmlrpc 2014-10-14 08:25:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1387.html