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
For me it doesn't work on even for upstream kernel & lvm2. And it seems to be a pretty old bug.
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.
Userspace lvm2 part (lvm2 should create properly sized log device) is tracked as bug 477040.
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.
Updating PM score.
Upstream commit is here http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=ac1f0ac22c7be908fd33407273b9808bfaedada4
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.
~~ 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.
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