Bug 623218

Summary: odd " No physical volume label" message when removing multiple --metadatacopies=0 devices
Product: Red Hat Enterprise Linux 6 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: LVM and device-mapper development team <lvm-team>
Status: CLOSED ERRATA QA Contact: Corey Marthaler <cmarthal>
Severity: low Docs Contact:
Priority: low    
Version: 6.0CC: agk, bmr, dwysocha, heinzm, jbrassow, joe.thornber, mbroz, prajnoha, prockai
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: lvm2-2.02.82-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 14:26:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
-vvvv from the pvremove none

Description Corey Marthaler 2010-08-11 16:11:21 UTC
Description of problem:
This is really only for my own curiosity, why do these messages get printed out when removing multiple devices but not when removing just one?


[root@taft-02 ~]# pvcreate --metadatacopies=0 /dev/sdd1
  Physical volume "/dev/sdd1" successfully created
[root@taft-02 ~]# pvremove  /dev/sdd1
  Labels on physical volume "/dev/sdd1" successfully wiped


[root@taft-02 ~]# pvcreate --metadatacopies=0 /dev/sdh1
  Physical volume "/dev/sdh1" successfully created
[root@taft-02 ~]# pvremove  /dev/sdh1
  Labels on physical volume "/dev/sdh1" successfully wiped


[root@taft-02 ~]# pvcreate --metadatacopies=0 /dev/sdd1 /dev/sdh1
  Physical volume "/dev/sdd1" successfully created
  Physical volume "/dev/sdh1" successfully created
[root@taft-02 ~]# pvremove  /dev/sdh1 /dev/sdd1
  Labels on physical volume "/dev/sdh1" successfully wiped
  No physical volume label read from /dev/sdh1
  Labels on physical volume "/dev/sdd1" successfully wiped


[root@taft-02 ~]#  pvcreate --metadatacopies=0 /dev/sdd1 /dev/sdh1 /dev/sde1
  Physical volume "/dev/sdd1" successfully created
  Physical volume "/dev/sdh1" successfully created
  Physical volume "/dev/sde1" successfully created
[root@taft-02 ~]# pvremove  /dev/sdh1 /dev/sdd1 /dev/sde1
  Labels on physical volume "/dev/sdh1" successfully wiped
  No physical volume label read from /dev/sdh1
  Labels on physical volume "/dev/sdd1" successfully wiped
  No physical volume label read from /dev/sdh1
  No physical volume label read from /dev/sdd1
  Labels on physical volume "/dev/sde1" successfully wiped


Version-Release number of selected component (if applicable):
2.6.32-52.el6.x86_64

lvm2-2.02.72-4.el6    BUILT: Wed Aug  4 14:38:58 CDT 2010
lvm2-libs-2.02.72-4.el6    BUILT: Wed Aug  4 14:38:58 CDT 2010
lvm2-cluster-2.02.72-4.el6    BUILT: Wed Aug  4 14:38:58 CDT 2010
udev-147-2.21.el6    BUILT: Mon Jul 12 04:55:00 CDT 2010
device-mapper-1.02.53-4.el6    BUILT: Wed Aug  4 14:38:58 CDT 2010
device-mapper-libs-1.02.53-4.el6    BUILT: Wed Aug  4 14:38:58 CDT 2010
device-mapper-event-1.02.53-4.el6    BUILT: Wed Aug  4 14:38:58 CDT 2010
device-mapper-event-libs-1.02.53-4.el6    BUILT: Wed Aug  4 14:38:58 CDT 2010
cmirror-2.02.72-4.el6    BUILT: Wed Aug  4 14:38:58 CDT 2010


How reproducible:
Everytime

Comment 1 Bryn M. Reeves 2010-08-11 16:21:29 UTC
Can you run that with some more -v? I haven't looked at any of this for a loooong time but there are a few parts of label_read that look kinda suspicious - hopefully debug output will help to suggest where.

Comment 2 Corey Marthaler 2010-08-11 18:38:35 UTC
Created attachment 438257 [details]
-vvvv from the pvremove

Comment 3 Alasdair Kergon 2010-11-23 00:33:33 UTC
Each PV is processed independently.

Before removing each PV the system checks that no other visible PVs have VG metadata referencing the PV that is to be removed.

Basic information about every PV is always cached internally.

The first PV is removed, but the cache is not told that the device is no longer a PV.

When the second PV is processed, the cache still thinks that the first device is a PV and when it checks it for VG metadata it unexpectedly finds it is no longer a PV and issues that message.

Comment 4 Alasdair Kergon 2010-11-23 01:58:16 UTC
There's already an internal option to suppress that message - using it on the pvremove code paths too.

Comment 6 Corey Marthaler 2011-03-16 21:45:45 UTC
Fix verified in the latest rpms.

2.6.32-118.el6.x86_64

lvm2-2.02.83-2.el6    BUILT: Tue Feb  8 10:10:57 CST 2011
lvm2-libs-2.02.83-2.el6    BUILT: Tue Feb  8 10:10:57 CST 2011
lvm2-cluster-2.02.83-2.el6    BUILT: Tue Feb  8 10:10:57 CST 2011
udev-147-2.34.el6    BUILT: Wed Feb 16 08:09:21 CST 2011
device-mapper-1.02.62-2.el6    BUILT: Tue Feb  8 10:10:57 CST 2011
device-mapper-libs-1.02.62-2.el6    BUILT: Tue Feb  8 10:10:57 CST 2011
device-mapper-event-1.02.62-2.el6    BUILT: Tue Feb  8 10:10:57 CST 2011
device-mapper-event-libs-1.02.62-2.el6    BUILT: Tue Feb  8 10:10:57 CST 2011
cmirror-2.02.83-2.el6    BUILT: Tue Feb  8 10:10:57 CST 2011


[root@hayes-02 ~]#  pvcreate --metadatacopies=0 /dev/etherd/e1.1p1
  Physical volume "/dev/etherd/e1.1p1" successfully created
[root@hayes-02 ~]# pvremove /dev/etherd/e1.1p1
  Labels on physical volume "/dev/etherd/e1.1p1" successfully wiped

[root@hayes-02 ~]#  pvcreate --metadatacopies=0 /dev/etherd/e1.1p1 /dev/etherd/e1.1p2
  Physical volume "/dev/etherd/e1.1p1" successfully created
  Physical volume "/dev/etherd/e1.1p2" successfully created
[root@hayes-02 ~]# pvremove /dev/etherd/e1.1p1 /dev/etherd/e1.1p2
  Labels on physical volume "/dev/etherd/e1.1p1" successfully wiped
  Labels on physical volume "/dev/etherd/e1.1p2" successfully wiped

[root@hayes-02 ~]#  pvcreate --metadatacopies=0 /dev/etherd/e1.1p1 /dev/etherd/e1.1p2 /dev/etherd/e1.1p3
  Physical volume "/dev/etherd/e1.1p1" successfully created
  Physical volume "/dev/etherd/e1.1p2" successfully created
  Physical volume "/dev/etherd/e1.1p3" successfully created
[root@hayes-02 ~]# pvremove  /dev/etherd/e1.1p1 /dev/etherd/e1.1p2 /dev/etherd/e1.1p3
  Labels on physical volume "/dev/etherd/e1.1p1" successfully wiped
  Labels on physical volume "/dev/etherd/e1.1p2" successfully wiped
  Labels on physical volume "/dev/etherd/e1.1p3" successfully wiped

Comment 7 errata-xmlrpc 2011-05-19 14:26:24 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0772.html