Bug 750613

Summary: unable to create mirror on 1K extent size VG due to dirty region log being too small
Product: Red Hat Enterprise Linux 5 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: Jonathan Earl Brassow <jbrassow>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: high Docs Contact:
Priority: high    
Version: 5.8CC: agk, dwysocha, heinzm, jbrassow, mbroz, prajnoha, prockai, thornber, zkabelac
Target Milestone: rcKeywords: Regression, TestBlocker
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: lvm2-2.02.88-4.el5 Doc Type: Bug Fix
Doc Text:
Do not document (bug in unreleased version).
Story Points: ---
Clone Of: 737125 Environment:
Last Closed: 2012-02-21 06:05:30 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:
Bug Depends On: 737125    
Bug Blocks: 743047    
Attachments:
Description Flags
Patch applicable to the RHEL5 repository none

Comment 1 Corey Marthaler 2011-11-01 18:44:29 UTC
This exist in the latest 5.8 rpms.


[root@hayes-02]# pvscan
  PV /dev/etherd/e1.1p1    VG mirror_sanity   lvm2 [1023.81 MB / 1023.81 MB free]
  PV /dev/etherd/e1.1p10   VG mirror_sanity   lvm2 [1023.81 MB / 1023.81 MB free]
  PV /dev/etherd/e1.1p2    VG mirror_sanity   lvm2 [1023.81 MB / 1023.81 MB free]
  PV /dev/etherd/e1.1p3    VG mirror_sanity   lvm2 [1023.81 MB / 1023.81 MB free]
  PV /dev/etherd/e1.1p4    VG mirror_sanity   lvm2 [1023.81 MB / 1023.81 MB free]
  PV /dev/etherd/e1.1p5    VG mirror_sanity   lvm2 [1023.81 MB / 1023.81 MB free]
  PV /dev/etherd/e1.1p6    VG mirror_sanity   lvm2 [1023.81 MB / 1023.81 MB free]
  PV /dev/etherd/e1.1p7    VG mirror_sanity   lvm2 [1023.81 MB / 1023.81 MB free]
  PV /dev/etherd/e1.1p8    VG mirror_sanity   lvm2 [1023.81 MB / 1023.81 MB free]
  PV /dev/etherd/e1.1p9    VG mirror_sanity   lvm2 [1023.81 MB / 1023.81 MB free]

[root@hayes-02]# lvcreate -m 1 -n mirror_on_1Kextent_vg -L 20M mirror_sanity
  device-mapper: reload ioctl failed: Invalid argument
  Failed to activate new LV.

device-mapper: dirty region log: log device 253:2 too small: need 1536 bytes
device-mapper: table: 253:5: mirror: Error creating mirror dirty log
device-mapper: ioctl: error adding target to table


2.6.18-274.el5

lvm2-2.02.88-2.el5    BUILT: Fri Oct 21 09:48:50 CDT 2011
lvm2-cluster-2.02.88-2.el5    BUILT: Fri Oct 21 09:49:24 CDT 2011
device-mapper-1.02.67-2.el5    BUILT: Mon Oct 17 08:31:56 CDT 2011
device-mapper-event-1.02.67-2.el5    BUILT: Mon Oct 17 08:31:56 CDT 2011
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 2 Jonathan Earl Brassow 2011-11-11 00:27:27 UTC
Created attachment 532950 [details]
Patch applicable to the RHEL5 repository

Comment 3 Jonathan Earl Brassow 2011-11-11 00:28:28 UTC
Upstream patches back-ported.

Comment 5 Milan Broz 2011-11-16 15:40:53 UTC
Fixed in lvm2-2.02.88-4.el5.

Comment 7 Corey Marthaler 2011-11-16 21:09:51 UTC
Fix verified in the latest rpms.

2.6.18-274.el5

lvm2-2.02.88-4.el5    BUILT: Wed Nov 16 09:40:55 CST 2011
lvm2-cluster-2.02.88-4.el5    BUILT: Wed Nov 16 09:46:51 CST 2011
device-mapper-1.02.67-2.el5    BUILT: Mon Oct 17 08:31:56 CDT 2011
device-mapper-event-1.02.67-2.el5    BUILT: Mon Oct 17 08:31:56 CDT 2011
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


SCENARIO - [create_mirror_on_1Kextent_vg]
Create a mirror on a VG with an extent size of only 1K
Recreating PVs/VG with smaller (1K) extent size
grant-01: pvcreate --setphysicalvolumesize 1G /dev/sdb1 /dev/sdb2 /dev/sdb3 /dev/sdb5 /dev/sdb6 /dev/sdc1 /dev/sdc2 /dev/sdc3 /dev/sdc5 /dev/sdc6
  Writing physical volume data to disk "/dev/sdb1"
  Writing physical volume data to disk "/dev/sdb2"
  Writing physical volume data to disk "/dev/sdb3"
  Writing physical volume data to disk "/dev/sdb5"
  Writing physical volume data to disk "/dev/sdb6"
  Writing physical volume data to disk "/dev/sdc1"
  Writing physical volume data to disk "/dev/sdc2"
  Writing physical volume data to disk "/dev/sdc3"
  Writing physical volume data to disk "/dev/sdc5"
  Writing physical volume data to disk "/dev/sdc6"
grant-01: vgcreate -s 1K mirror_sanity /dev/sdb1 /dev/sdb2 /dev/sdb3 /dev/sdb5 /dev/sdb6 /dev/sdc1 /dev/sdc2 /dev/sdc3 /dev/sdc5 /dev/sdc6
grant-01: lvcreate -m 1 -n mirror_on_1Kextent_vg -L 20M mirror_sanity
Deactivating mirror mirror_on_1Kextent_vg... and removing
Restoring VG to default extent size
  Writing physical volume data to disk "/dev/sdb1"
  Writing physical volume data to disk "/dev/sdb2"
  Writing physical volume data to disk "/dev/sdb3"
  Writing physical volume data to disk "/dev/sdb5"
  Writing physical volume data to disk "/dev/sdb6"
  Writing physical volume data to disk "/dev/sdc1"
  Writing physical volume data to disk "/dev/sdc2"
  Writing physical volume data to disk "/dev/sdc3"
  Writing physical volume data to disk "/dev/sdc5"
  Writing physical volume data to disk "/dev/sdc6"

Comment 8 Milan Broz 2011-12-06 23:32:44 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
When using striped mirrors, an improper and too restrictive divisibility requirements for extent count took effect. This might have ended up with a failure to create a striped mirror despite it was correct and possible. The condition that was checked counted in mirror and stripe count though only stripe count alone was satisfactory.

Comment 9 Milan Broz 2011-12-06 23:33:35 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-When using striped mirrors, an improper and too restrictive divisibility requirements for extent count took effect. This might have ended up with a failure to create a striped mirror despite it was correct and possible. The condition that was checked counted in mirror and stripe count though only stripe count alone was satisfactory.+Do not document (bug in unreleased version).

Comment 10 errata-xmlrpc 2012-02-21 06:05:30 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0161.html