Bug 247331 - pvs --segments <PV> doesn't show correct information
Summary: pvs --segments <PV> doesn't show correct information
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: lvm2   
(Show other bugs)
Version: 11
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Alasdair Kergon
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords: Patch
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-07-07 02:47 UTC by Andrew Ryan
Modified: 2010-06-28 10:39 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-06-28 10:25:55 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch to correct the problem (342 bytes, patch)
2007-07-07 02:47 UTC, David Robinson
no flags Details | Diff
script to test for regressions (10.27 KB, application/x-shellscript)
2007-07-07 02:48 UTC, David Robinson
no flags Details
alternative patch - check whether extents completely cover the PV (657 bytes, patch)
2007-07-09 05:39 UTC, David Robinson
no flags Details | Diff

Description David Robinson 2007-07-07 02:47:01 UTC
Description of problem:
pvs shows an extra extent that spans the entire PV. The bug only shows itself
when a PV is specified on the commandline, if you do not specify a PV the output
is correct.

Version-Release number of selected component (if applicable):
# rpm -q lvm2
lvm2-2.02.24-1.fc7
# lvm version
  LVM version:     2.02.24 (2007-03-19)
  Library version: 1.02.17 (2007-01-29)
  Driver version:  4.11.0

How reproducible:
100%

Steps to Reproduce:
1. dd if=/dev/zero of=/tmp/test.img bs=1M seek=100 count=0
2. losetup /dev/loop0 /tmp/test.img 
3. pvcreate /dev/loop0
4. vgcreate testvg /dev/loop0
5. lvcreate -n testlv -l 10%VG testvg
6. pvs --segments /dev/loop0
or
6. pvs -o +pvseg_start,pvseg_size /dev/loop0
  
Actual results:
# pvs --segments /dev/loop0
  PV         VG     Fmt  Attr PSize  PFree  Start SSize
  /dev/loop0 testvg lvm2 a-   96.00M 88.00M     0     2
  /dev/loop0 testvg lvm2 a-   96.00M 88.00M     2    22
  /dev/loop0 testvg lvm2 a-   96.00M 88.00M     0    24

Expected results:
# pvs --segments /dev/loop0
  PV         VG     Fmt  Attr PSize  PFree  Start SSize
  /dev/loop0 testvg lvm2 a-   96.00M 88.00M     0     2
  /dev/loop0 testvg lvm2 a-   96.00M 88.00M     2    22
# note the expected result doesn't show an extent that spans the entire PV

Additional info:
patch that corrects the problem is attached. a script that runs some tests is
also attached - the script tests a wide scope of LVM commands to check for
regressions. it can also be used to check LVM1 metadata. I haven't encountered
any regressions.

Comment 1 David Robinson 2007-07-07 02:47:01 UTC
Created attachment 158708 [details]
patch to correct the problem

Comment 2 David Robinson 2007-07-07 02:48:03 UTC
Created attachment 158709 [details]
script to test for regressions

Comment 3 Alasdair Kergon 2007-07-08 18:14:57 UTC
Yes, there's a bug here *upstream*.

But we can't take a patch like that until there's been a proper analysis of the
code to prove  that it is the correct way to fix the problem.  (The test script
doesn't cover all the cases the patch may affect.)

Comment 4 David Robinson 2007-07-09 05:39:46 UTC
Created attachment 158746 [details]
alternative patch - check whether extents completely cover the PV

Comment 5 Bug Zapper 2008-04-04 13:21:37 UTC
Based on the date this bug was created, it appears to have been reported
during the development of Fedora 8. In order to refocus our efforts as
a project we are changing the version of this bug to '8'.

If this bug still exists in rawhide, please change the version back to
rawhide.
(If you're unable to change the bug's version, add a comment to the bug
and someone will change it for you.)

Thanks for your help and we apologize for the interruption.

The process we're following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.

Comment 7 Bug Zapper 2008-11-26 07:33:51 UTC
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '8'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 8's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 8 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 8 David Robinson 2008-11-29 01:12:58 UTC
This still exists in Fedora 10.

# cat /etc/redhat-release 
Fedora release 10 (Cambridge)
# lvm version
  LVM version:     2.02.39 (2008-06-27)
  Library version: 1.02.27 (2008-06-25)
  Driver version:  4.14.0
# pvs --segments /dev/mapper/luks-blah
  PV         VG     Fmt  Attr PSize  PFree  Start SSize
  /dev/dm-0  laptop lvm2 a-   55.69G 32.00M     0   250
  /dev/dm-0  laptop lvm2 a-   55.69G 32.00M     0  1782
  /dev/dm-0  laptop lvm2 a-   55.69G 32.00M   250  1499
  /dev/dm-0  laptop lvm2 a-   55.69G 32.00M  1749    32
  /dev/dm-0  laptop lvm2 a-   55.69G 32.00M  1781     1

This line shouldn't appear:
  /dev/dm-0  laptop lvm2 a-   55.69G 32.00M     0  1782

Comment 9 Bug Zapper 2009-06-09 09:16:11 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 10 Bug Zapper 2010-04-27 11:44:36 UTC
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 11 Bug Zapper 2010-06-28 10:25:55 UTC
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 12 Alasdair Kergon 2010-06-28 10:39:59 UTC
I think actually this got fixed - at least I can't reproduce it today.


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