Bug 590017 - pvscan miscounts total TB
Summary: pvscan miscounts total TB
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: lvm2 (Show other bugs)
(Show other bugs)
Version: 5.4
Hardware: All Linux
low
low
Target Milestone: ---
: ---
Assignee: LVM and device-mapper development team
QA Contact: Corey Marthaler
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-07 14:24 UTC by Chris Pepper
Modified: 2011-01-13 22:41 UTC (History)
7 users (show)

Fixed In Version: lvm2-2.02.73-1.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-01-13 22:41:37 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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0052 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2011-01-12 17:15:25 UTC

Description Chris Pepper 2010-05-07 14:24:12 UTC
Description of problem:
pvscan's summary line shows incorrect total and in-use numbers. Here the correct totals would be about 64tb.

Version-Release number of selected component (if applicable):
[root@norimaki ~]# pvscan --version
  LVM version:     2.02.46-RHEL5 (2009-09-15)
  Library version: 1.02.32 (2009-05-21)
  Driver version:  4.11.5


How reproducible:
Create PVs totalling about 64tb (we used 2 SATABeasts, each with 42 1tb disks)

Steps to Reproduce:
1. pvscan
  
Actual results:
[root@norimaki ~]# pvscan
  PV /dev/dm-5   VG noribeast2dvg   lvm2 [7.28 TB / 0    free]
  PV /dev/dm-4   VG noribeast2cvg   lvm2 [7.28 TB / 0    free]
  PV /dev/dm-3   VG noribeast2bvg   lvm2 [7.28 TB / 0    free]
  PV /dev/dm-2   VG noribeast2avg   lvm2 [7.28 TB / 0    free]
  PV /dev/dm-1   VG noribeast1cd    lvm2 [16.37 TB / 382.12 GB free]
  PV /dev/dm-0   VG noribeast0vg    lvm2 [16.37 TB / 0    free]
  Total: 6 [5.85 TB] / in use: 6 [5.85 TB] / in no VG: 0 [0   ]
[root@norimaki ~]# pvdisplay /dev/dm-1
  --- Physical volume ---
  PV Name               /dev/dm-1
  VG Name               noribeast1cd
  PV Size               16.37 TB / not usable 1.25 MB
  Allocatable           yes 
  PE Size (KByte)       4096
  Total PE              4292125
  Free PE               97822
  Allocated PE          4194303
  PV UUID               06tZVI-8dUJ-MCDs-1sb1-lXOA-QWzb-MvYvEb
   
[root@norimaki ~]# uname -a
Linux norimaki.cbio.mskcc.org 2.6.18-164.15.1.el5 #1 SMP Wed Mar 17 11:30:06 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux


Expected results:
Total & used are both about 64tb.

Additional info:
Component description for lvm2 is wrong. It's not "A Powerful Multilingual File Viewer".

Comment 1 Alasdair Kergon 2010-05-07 14:42:23 UTC
That component description is from 'lv', the previous component in the list.  If you can reproduce the problem with it not refreshing correctly while selecting it from the list, report it as a bug against 'bugzilla' providing details of your browser etc.

Comment 2 Alasdair Kergon 2010-05-07 15:28:40 UTC
Thanks for spotting this.  When updating the total, the number of sectors in PVs inside VGs was being restricted to a 32-bit number.

Fix checked in upstream and will be included in our next releases.

Comment 3 Alasdair Kergon 2010-05-07 15:59:33 UTC
QA: This is easy to reproduce without needing lots of storage if you use pvcreate --setphysicalvolumesize to fake a multi-TB PV then put it into a VG and run pvscan.

Comment 4 Milan Broz 2010-08-30 10:39:28 UTC
Fix in lvm2-2.02.73-1.el5.

Comment 6 Corey Marthaler 2010-11-09 23:08:57 UTC
Fix verified in latest rpms.

[root@taft-01 ~]# pvscan
  PV /dev/sda2   VG VolGroup00      lvm2 [68.12 GB / 0    free]
  PV /dev/sdb1                      lvm2 [20.00 TB]
  PV /dev/sdc1                      lvm2 [20.00 TB]
  PV /dev/sdd1                      lvm2 [20.00 TB]
  PV /dev/sde1                      lvm2 [20.00 TB]
  PV /dev/sdf1                      lvm2 [20.00 TB]
  Total: 6 [100.07 TB] / in use: 1 [68.12 GB] / in no VG: 5 [100.00 TB]

[root@taft-01 ~]# vgcreate taft /dev/sd[bcdef]1
  Volume group "taft" successfully created

[root@taft-01 ~]# pvscan
  PV /dev/sdb1   VG taft         lvm2 [20.00 TB / 20.00 TB free]
  PV /dev/sdc1   VG taft         lvm2 [20.00 TB / 20.00 TB free]
  PV /dev/sdd1   VG taft         lvm2 [20.00 TB / 20.00 TB free]
  PV /dev/sde1   VG taft         lvm2 [20.00 TB / 20.00 TB free]
  PV /dev/sdf1   VG taft         lvm2 [20.00 TB / 20.00 TB free]
  PV /dev/sda2   VG VolGroup00   lvm2 [68.12 GB / 0    free]
  Total: 6 [100.07 TB] / in use: 6 [100.07 TB] / in no VG: 0 [0   ]

[root@taft-01 ~]# pvdisplay /dev/sdb1
  --- Physical volume ---
  PV Name               /dev/sdb1
  VG Name               taft
  PV Size               20.00 TB / not usable 4.00 MB
  Allocatable           yes
  PE Size (KByte)       4096
  Total PE              5242879
  Free PE               5242879
  Allocated PE          0
  PV UUID               1AkUf8-uG5b-WQhX-g9Jo-cdiz-Ysbz-EvUIyq


lvm2-2.02.74-2.el5    BUILT: Tue Nov  9 08:03:06 CST 2010
lvm2-cluster-2.02.74-3.el5    BUILT: Tue Nov  9 08:01:59 CST 2010
device-mapper-1.02.55-2.el5    BUILT: Tue Nov  9 06:41:00 CST 2010
cmirror-1.1.39-10.el5    BUILT: Wed Sep  8 16:32:05 CDT 2010
kmod-cmirror-0.1.22-3.el5    BUILT: Tue Dec 22 13:39:47 CST 2009

Comment 8 errata-xmlrpc 2011-01-13 22:41:37 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-0052.html


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