Bug 237689 - pv size is invalid if size > 1TB and included in a vg
Summary: pv size is invalid if size > 1TB and included in a vg
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: lvm2
Version: 4.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Petr Rockai
QA Contact: Corey Marthaler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-04-24 19:34 UTC by Corey Marthaler
Modified: 2007-11-17 01:14 UTC (History)
5 users (show)

Fixed In Version: RHBA-2007-0753
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-11-15 15:58:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2007:0753 0 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2007-11-14 16:56:08 UTC

Description Corey Marthaler 2007-04-24 19:34:13 UTC
Description of problem:
[root@link-08 archive]# pvs -v -o+dev_size
    Scanning for physical volume names
  PV         VG         Fmt  Attr PSize  PFree  DevSize PV UUID                
               DevSize
  /dev/hda2  VolGroup00 lvm2 a-   74.41G 96.00M  74.43G
rwgI3X-wK75-vo7X-oXHT-udX9-Z3Ah-NfJgJI  74.43G
[root@link-08 archive]# pvcreate /dev/sda1
  Physical volume "/dev/sda1" successfully created
[root@link-08 archive]# pvs -v -o+dev_size
    Scanning for physical volume names
    Wiping cache of LVM-capable devices
  PV         VG         Fmt  Attr PSize  PFree  DevSize PV UUID                
               DevSize
  /dev/hda2  VolGroup00 lvm2 a-   74.41G 96.00M  74.43G
rwgI3X-wK75-vo7X-oXHT-udX9-Z3Ah-NfJgJI  74.43G
  /dev/sda1             lvm2 --    1.18T  1.18T   1.18T
5fp77U-cmpU-2Y6M-d0Gu-5h4A-7V4D-o2K1TV   1.18T
[root@link-08 archive]# vgcreate new /dev/sda1
  Volume group "new" successfully created
[root@link-08 archive]# pvs -v -o+dev_size
    Scanning for physical volume names
  PV         VG         Fmt  Attr PSize  PFree  DevSize PV UUID                
               DevSize
  /dev/hda2  VolGroup00 lvm2 a-   74.41G 96.00M  74.43G
rwgI3X-wK75-vo7X-oXHT-udX9-Z3Ah-NfJgJI  74.43G
  /dev/sda1  new        lvm2 a-    1.18T  1.18T   1.18T
5fp77U-cmpU-2Y6M-d0Gu-5h4A-7V4D-o2K1TV   1.18T
[root@link-08 archive]# pvdisplay
  --- Physical volume ---
  PV Name               /dev/hda2
  VG Name               VolGroup00
  PV Size               74.43 GB / not usable 22.62 MB
  Allocatable           yes
  PE Size (KByte)       32768
  Total PE              2381
  Free PE               3
  Allocated PE          2378
  PV UUID               rwgI3X-wK75-vo7X-oXHT-udX9-Z3Ah-NfJgJI

  --- Physical volume ---
  PV Name               /dev/sda1
  VG Name               new
  PV Size               8192.00 EB / not usable 8192.00 EB
  Allocatable           yes
  PE Size (KByte)       4096
  Total PE              309215
  Free PE               309215
  Allocated PE          0
  PV UUID               5fp77U-cmpU-2Y6M-d0Gu-5h4A-7V4D-o2K1TV


From #lvm: 

the value in struct physical_volume is wrong:
<mornfall> $3 = {id = {uuid = "UFTVcRcde82Ymoocw2fKUv576xCsrCGN"}, dev =
0x693500, fmt = 0x69af70, vg_name = 0x6ac5c8 "mirror_sanity", vgid = {
<mornfall>     uuid = "ou0KurgTOKDxarRjFtS95sevFDgjWOsl"}, status = 8, size =
18446744071947681390, pe_size = 8192, pe_start = 384, pe_count = 309215,
pe_alloc_count = 0,
<agk_> - we'll see if the lvmdump script works...
<mornfall>   segments = {n = 0x6ac5d8, p = 0x6ac5d8}, tags = {n = 0x6ac388, p =
0x6ac388}}


Version-Release number of selected component (if applicable):
device-mapper-1.02.17-3.0.1.el4
lvm2-2.02.21-5.el4

How reproducible:
everytime

Comment 1 Corey Marthaler 2007-04-24 20:03:18 UTC
Linux link-08 2.6.9-54.ELsmp #1 SMP Thu Apr 5 20:37:45 EDT 2007 x86_64 x86_64
x86_64 GNU/Linux


Here is what was in the archive file:
description = "Created *before* executing 'vgcreate new /dev/sda1'"

creation_host = "link-08"       # Linux link-08 2.6.9-54.ELsmp #1 SMP Thu Apr 5
20:37:45 EDT 2007 x86_64
creation_time = 1177428228      # Tue Apr 24 10:23:48 2007

new {
        id = "uLtIBx-cBMt-gXqc-G2yc-kqkc-0WsS-mKeEWC"
        seqno = 0
        status = ["RESIZEABLE", "READ", "WRITE"]
        extent_size = 8192              # 4 Megabytes
        max_lv = 0
        max_pv = 0

        physical_volumes {

                pv0 {
                        id = "YIHms1-IsCd-y7m9-43qi-NtMD-5AeJ-ePTfhm"
                        device = "/dev/sda1"    # Hint only

                        status = ["ALLOCATABLE"]
                        dev_size = 2533097070   # 1.17957 Terabytes
                        pe_start = 384
                        pe_count = 309215       # 1.17956 Terabytes
                }
        }

}


Comment 2 Alasdair Kergon 2007-04-24 21:28:16 UTC
Peter found the bug: lib/config 64-bit integer functions actually only handle
32-bit integers!  Value corruption occurs when reading the device size back from
text-format metadata.

Comment 3 RHEL Program Management 2007-05-09 04:37:14 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 6 Corey Marthaler 2007-07-27 18:41:08 UTC
fix verified in lvm2-2.02.27-1.el4.

Comment 8 errata-xmlrpc 2007-11-15 15:58:28 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 the 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-2007-0753.html



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