Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 502671

Summary: mirror creation asserts and core dumps if VG extent size and given log size are too small
Product: Red Hat Enterprise Linux 5 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: Milan Broz <mbroz>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: high Docs Contact:
Priority: high    
Version: 5.4CC: agk, dwysocha, edamato, heinzm, jbrassow, mbroz, prockai, pvrabec, syeghiay
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-02 11:56:42 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
core file from the create attempt none

Description Corey Marthaler 2009-05-26 20:27:32 UTC
Description of problem:
Saw this while verifying bug 477040. If your VG has an extent size of only 1K, and you don't specify any space for the log ( :0-0 ) then you'll see this assertion.

[root@grant-03 ~]# vgcreate -s 1K grant /dev/sdb1 /dev/sdb2 /dev/sdb3 
  Volume group "grant" successfully created

[root@grant-03 ~]# lvcreate -L 64M -m 1 -n mirror grant /dev/sdb1 /dev/sdb2 /dev/sdb3:0-0
lvcreate: metadata/pv_map.c:190: consume_pv_area: Assertion `to_go <= pva->count' failed.
Aborted (core dumped)

This is reproducible.
Everytime 

Version-Release number of selected component (if applicable):
lvm2-2.02.46-2.el5

Comment 1 Corey Marthaler 2009-05-26 20:34:26 UTC
Created attachment 345516 [details]
core file from the create attempt

Comment 2 Milan Broz 2009-05-27 11:20:20 UTC
I sent some patch here
https://www.redhat.com/archives/lvm-devel/2009-May/msg00220.html

(I cannot reproduce segfault, but it should not reach assert code anyway).

Comment 4 Milan Broz 2009-06-01 15:09:26 UTC
Fixed upstream, setting bug to POST for now.

Comment 5 Milan Broz 2009-06-01 19:01:48 UTC
Fixed in lvm2-2_02_46-3_el5.

Comment 8 Corey Marthaler 2009-06-03 20:59:54 UTC
Fix verified in lvm2-2.02.46-3.el5.

Comment 10 errata-xmlrpc 2009-09-02 11:56:42 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-2009-1393.html