Bug 471565 - Creation of mirrored logical volume with VG extent-size of 1K fails
Creation of mirrored logical volume with VG extent-size of 1K fails
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
5.2
i386 Linux
medium Severity medium
: rc
: ---
Assigned To: Milan Broz
Cluster QE
:
Depends On:
Blocks: 490021
  Show dependency treegraph
 
Reported: 2008-11-14 05:02 EST by Mario Eckl
Modified: 2013-02-28 23:07 EST (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 490021 (view as bug list)
Environment:
Last Closed: 2009-09-02 04:50:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Mario Eckl 2008-11-14 05:02:46 EST
Description of problem:
Creation of a mirrored LV with disk log fails, if the VG extent-size is 1K (2K and bigger works as expected).


Version-Release number of selected component (if applicable):
$ lvm version
  LVM version:     2.02.32-RHEL5 (2008-03-04)
  Library version: 1.02.24 (2007-12-20)
  Driver version:  4.11.5 


How reproducible:
Create a volume group with extent size of 1K and a mirrored logical volume with a disk based mirror log.


Steps to Reproduce:
$ dd if=/dev/zero of=/test/image[1,2,3] bs=1024k count=128
$ losetup /dev/loop0 /test/image1
$ losetup /dev/loop1 /test/image2
$ losetup /dev/loop2 /test/image3
$ pvcreate /dev/loop[0,1,2]
  Physical volume "/dev/loop[0,1,2]" successfully created
$ vgcreate -s 1K vg_mirror_test /dev/loop0 /dev/loop1 /dev/loop2
  Volume group "vg_mirror_test" successfully created
$ lvcreate -L 64M -m 1 -n lv_mirror1 vg_mirror_test /dev/loop0 /dev/loop1 /dev/loop2:0-0
  /dev/cdrom: open failed: Read-only file system
 
No more output shown.

  
Actual results:
dmesg and /var/log/messages shows this:
 
===
Nov  4 17:43:17 nagtest-web1 lvm[16895]: Log device, 253:2, has failed.  
Nov  4 17:43:17 nagtest-web1 lvm[16895]: Device failure in vg_mirror_test-lv_mirror1
Nov  4 17:43:17 nagtest-web1 lvm[16895]: WARNING: dev_open(/etc/lvm/lvm.conf) called while suspended
Nov  4 17:43:16 nagtest-web1 kernel: attempt to access beyond end of device
Nov  4 17:43:22 nagtest-web1 kernel: dm-2: rw=16, want=3, limit=2
Nov  4 17:43:22 nagtest-web1 kernel: device-mapper: mirror log: Failed to read header on mirror log device, 253:2
Nov  4 17:43:22 nagtest-web1 kernel: attempt to access beyond end of device
Nov  4 17:43:22 nagtest-web1 kernel: dm-2: rw=17, want=3, limit=2
Nov  4 17:43:22 nagtest-web1 kernel: device-mapper: mirror log: Failed to write header on mirror log device, 253:2
Nov  4 17:43:22 nagtest-web1 kernel: device-mapper: raid1: log resume failed
Nov  4 17:43:22 nagtest-web1 kernel: attempt to access beyond end of device
Nov  4 17:43:22 nagtest-web1 kernel: dm-2: rw=17, want=3, limit=2
Nov  4 17:43:22 nagtest-web1 kernel: attempt to access beyond end of device
Nov  4 17:43:22 nagtest-web1 kernel: dm-2: rw=17, want=3, limit=2
Nov  4 17:43:22 nagtest-web1 kernel: attempt to access beyond end of device
===
'top' lists the kmirrord process with high cpu utilization:
PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
5541 root      20  -5     0    0    0 R 95.9  0.0  12:30.75 kmirrord
===
 
The errors continue forever ...
It seems that a 1K mirror log (because the size of the mirror log is equal to the size of the VG phsical extend) isn't big enough to hold the log information!


Expected results:
$ lvcreate -L 64M -m 1 -n lv_mirror1 vg_mirror_test /dev/loop0 /dev/loop1 /dev/loop2:0-0
  /dev/cdrom: open failed: Read-only file system
  Logical volume "lv_mirror1" created 


Additional info:
This also works on Fedora 10 (Rawhide)!

$ lvm version
  LVM version:     2.02.39-RHEL5 (2008-06-27)
  Library version: 1.02.27 (2008-06-25)
  Driver version:  4.14.0
Comment 1 Milan Broz 2008-11-14 09:12:36 EST
For me it doesn't work on even for upstream kernel & lvm2.
And it seems to be a pretty old bug.
Comment 3 Milan Broz 2008-12-18 15:09:18 EST
kernel patch queued for 2.6.29
http://www.kernel.org/pub/linux/kernel/people/agk/patches/2.6/editing/dm-log-ensure-log-bitmap-fits-on-log-device.patch

I'll add git commit id when upstream, will be backported to RHEL5.4.
Comment 4 Milan Broz 2008-12-18 15:16:27 EST
Userspace lvm2 part (lvm2 should create properly sized log device) is tracked as bug 477040.
Comment 5 RHEL Product and Program Management 2009-01-27 15:42:41 EST
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 RHEL Product and Program Management 2009-02-16 10:40:34 EST
Updating PM score.
Comment 9 Don Zickus 2009-03-23 11:53:02 EDT
in kernel-2.6.18-136.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5

Please do NOT transition this bugzilla state to VERIFIED until our QE team
has sent specific instructions indicating when to do so.  However feel free
to provide a comment indicating that this fix has been verified.
Comment 11 Chris Ward 2009-07-03 14:13:23 EDT
~~ Attention - RHEL 5.4 Beta Released! ~~

RHEL 5.4 Beta has been released! There should be a fix present in the Beta release that addresses this particular request. Please test and report back results here, at your earliest convenience. RHEL 5.4 General Availability release is just around the corner!

If you encounter any issues while testing Beta, please describe the issues you have encountered and set the bug into NEED_INFO. If you encounter new issues, please clone this bug to open a new issue and request it be reviewed for inclusion in RHEL 5.4 or a later update, if it is not of urgent severity.

Please do not flip the bug status to VERIFIED. Only post your verification results, and if available, update Verified field with the appropriate value.

Questions can be posted to this bug or your customer or partner representative.
Comment 13 errata-xmlrpc 2009-09-02 04:50:38 EDT
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/RHSA-2009-1243.html

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