Bug 683931 - worthless "0 physical volumes not changed" message when combining PV tag arguments
Summary: worthless "0 physical volumes not changed" message when combining PV tag argu...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2
Version: 6.1
Hardware: x86_64
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Alasdair Kergon
QA Contact: Corey Marthaler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-10 17:28 UTC by Corey Marthaler
Modified: 2011-06-09 14:56 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-09 14:56:47 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Corey Marthaler 2011-03-10 17:28:47 UTC
Description of problem:
It appears that no matter how I structure my multiple PV tag cmd, I'll see a message stating, "0 physical volumes not changed". This appears to be a worthless message, since shouldn't all devices not acted on be "not changed"? I have 8 PVs on this machine, so if I'm acting on one, shouldn't there be 7 not changed?


[root@taft-01 ~]# pvscan
  PV /dev/sdb1   VG test        lvm2 [135.66 GiB / 135.66 GiB free]
  PV /dev/sdc1   VG test        lvm2 [135.66 GiB / 135.66 GiB free]
  PV /dev/sdd1   VG test        lvm2 [135.66 GiB / 135.66 GiB free]
  PV /dev/sde1   VG test        lvm2 [135.66 GiB / 135.66 GiB free]
  PV /dev/sdf1   VG test        lvm2 [135.66 GiB / 135.66 GiB free]
  PV /dev/sdg1   VG test        lvm2 [135.66 GiB / 135.66 GiB free]
  PV /dev/sdh1   VG test        lvm2 [135.66 GiB / 135.66 GiB free]
  PV /dev/sda2   VG vg_taft01   lvm2 [67.75 GiB / 0    free]
  Total: 8 [1017.40 GiB] / in use: 8 [1017.40 GiB] / in no VG: 0 [0   ]

[root@taft-01 ~]# pvchange   --deltag 5 --deltag 6 --addtag 1 --addtag 2 /dev/sdc1
  Physical volume "/dev/sdc1" changed
  1 physical volume changed / 0 physical volumes not changed

[root@taft-01 ~]# pvchange   --deltag 5 --deltag 6 --addtag 1 --addtag 2 /dev/sdc1 /dev/sdd1
  Physical volume "/dev/sdc1" changed
  Physical volume "/dev/sdd1" changed
  2 physical volumes changed / 0 physical volumes not changed

[root@taft-01 ~]# pvchange   --deltag 5 --deltag 6 --addtag 1 --addtag 2 /dev/sdc1 /dev/sdd1 /dev/foobar
  Physical volume "/dev/sdc1" changed
  Physical volume "/dev/sdd1" changed
  /dev/foobar: Couldn't find device.  Check your filters?
  Failed to read physical volume /dev/foobar
  2 physical volumes changed / 0 physical volumes not changed


Version-Release number of selected component (if applicable):
2.6.32-94.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.31.el6    BUILT: Wed Jan 26 05:39:15 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


How reproducible:
Everytime

Comment 1 Corey Marthaler 2011-03-10 17:35:13 UTC
I found a case where the "not changed" number is > 0:

[root@taft-01 ~]# pvscan
  PV /dev/sda2   VG vg_taft01       lvm2 [67.75 GiB / 0    free]
  PV /dev/sdb1                      lvm2 [135.67 GiB]
  PV /dev/sdc1                      lvm2 [135.67 GiB]
  PV /dev/sdd1                      lvm2 [135.67 GiB]
  PV /dev/sde1                      lvm2 [135.67 GiB]
  PV /dev/sdf1                      lvm2 [135.67 GiB]
  PV /dev/sdg1                      lvm2 [135.67 GiB]
  PV /dev/sdh1                      lvm2 [135.67 GiB]
  Total: 8 [1017.41 GiB] / in use: 1 [67.75 GiB] / in no VG: 7 [949.66 GiB]

[root@taft-01 ~]# pvchange --deltag 1 --deltag 2 /dev/sdb1
  Can't change tag on Physical Volume /dev/sdb1 not in volume group
  0 physical volumes changed / 1 physical volume not changed

[root@taft-01 ~]# pvchange --deltag 1 --deltag 2 /dev/sdb1 /dev/sdc1
  Can't change tag on Physical Volume /dev/sdb1 not in volume group
  Can't change tag on Physical Volume /dev/sdc1 not in volume group
  0 physical volumes changed / 2 physical volumes not changed

I'd still argue that this message is worthless. All the pvs on this system were "not changed", regardless of how many were listed on the cmdline.

Comment 2 Milan Broz 2011-06-01 11:19:32 UTC
This is apparently not technical problem but question of wording and understandability.

Alasdair, please can you comment it?
Fix is either one liner (if you device to change it) or close as not-a-bug :-)

Comment 3 Milan Broz 2011-06-01 11:20:51 UTC
s/device/decide :)

Comment 4 Alasdair Kergon 2011-06-01 11:33:51 UTC
Check the exit status too: if any are 'not changed' that indicates an error.
Only the PVs specified on the cmdline are included - i.e. it's talking about "of the PVs you asked me to change, I changed X and didn't change Y".

So the first two cases look right.  The 3rd case could maybe be changed, but I'm not sure: Should we include /dev/foobar (which it discovered not to be a PV) in a total number of PVs?

Comment 5 Peter Rajnoha 2011-06-02 08:19:40 UTC
(In reply to comment #4)
> I'm not sure: Should we include /dev/foobar (which it discovered not to be a
> PV) in a total number of PVs?

/dev/foobar is not a PV - naming nonexistent device a PV would be more confusing than it is today, I think. It's OK as it is. So I'm proposing CLOSED/NOTABUG. Corey, Alasdair?


Note You need to log in before you can comment on or make changes to this bug.