Bug 186104 - kernel dm mirror: lvs Copy% overs 100% by lvreduce/lvresize.
Summary: kernel dm mirror: lvs Copy% overs 100% by lvreduce/lvresize.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel
Version: 4.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Jonathan Earl Brassow
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 181409 186476
TreeView+ depends on / blocked
 
Reported: 2006-03-21 17:36 UTC by Kiyoshi Ueda
Modified: 2013-04-02 23:51 UTC (History)
6 users (show)

Fixed In Version: RHSA-2006-0575
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-08-10 22:51:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch to fix problem (1.06 KB, patch)
2006-03-21 22:31 UTC, Jonathan Earl Brassow
no flags Details | Diff
Patch to fix problem (1.06 KB, patch)
2006-03-22 15:02 UTC, Jonathan Earl Brassow
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2006:0575 0 normal SHIPPED_LIVE Important: Updated kernel packages available for Red Hat Enterprise Linux 4 Update 4 2006-08-10 04:00:00 UTC

Description Kiyoshi Ueda 2006-03-21 17:36:14 UTC
Description of problem:
"Copy%" information of 'lvs' overs 100% after lvreduce/lvresize.


Version-Release number of selected component:
lvm2-2.02.02-1.0.RHEL4 (Technical Preview Version)


How reproducible:
Always at certain resize


Steps to Reproduce:
 1. Prepare some PVs (more than 2) and create VG from them.
    Example)
      - /dev/sda, /dev/sdb, /dev/sdc as PVs
      - vg0 contains these 3 PVs
 2. Create a mirror LV from the VG.
      # lvcreate -L 52M -n lv0 -m 1 vg0
 3. Deactivate the mirror LV and reduce the size.
      # lvchange -an vg0/lv0
      # lvreduce -L 40M vg0/lv0
 4. Re-activate the mirror LV.
      # lvchange -ay vg0/lv0
 5. Check the "Copy%" of 'lvs' and sync status of 'dmsetup status'.
      # lvs vg0/lv0
      # dmsetup status vg0-lv0


Actual results:
The "Copy%" of lvs is "130.00".
The sync status of 'dmsetup status' is "104/80".


Expected results:
The "Copy%" of lvs should be "100.00".
The sync status of 'dmsetup status' should be "80/80".


Additional info:

Comment 1 Jonathan Earl Brassow 2006-03-21 21:44:08 UTC
Yeah, this is a problem for me too.  Mine actually shrinks a bit in size though:

[root@tng1-1 ~]# lvs vg/lv ; dmsetup status vg-lv
  LV   VG   Attr   LSize  Origin Snap%  Move Log     Copy%
  lv   vg   mwi-a- 52.00M                    lv_mlog 100.00
0 106496 mirror 2 253:3 253:4 104/104 1 AA 3 disk 253:2 A
[root@tng1-1 ~]# lvchange -an vg/lv ; lvreduce -L 40M vg/lv; lvchange -ay vg/lv
  Reducing logical volume lv to 40.00 MB
  Logical volume lv successfully resized
[root@tng1-1 ~]# lvs vg/lv ; dmsetup status vg-lv
  LV   VG   Attr   LSize  Origin Snap%  Move Log     Copy%
  lv   vg   mwi-a- 40.00M                    lv_mlog 120.00
0 81920 mirror 2 253:3 253:4 96/80 1 AA 3 disk 253:2 A


Not sure if this is user-space, kernel-space, or both yet...


Comment 2 Jonathan Earl Brassow 2006-03-21 21:49:32 UTC
looks like kernel problem because the table line looks good...


Comment 3 Jonathan Earl Brassow 2006-03-21 22:06:01 UTC
The problem is with the bitsets.  If you resize down to 32*region_size*n, it
works just fine.  Otherwise, the bits left at the end of the 32-bit field are
counted and the maximum count is surpassed.



Comment 4 Jonathan Earl Brassow 2006-03-21 22:31:18 UTC
Created attachment 126440 [details]
Patch to fix problem

I still have to test this patch.

Comment 5 Jonathan Earl Brassow 2006-03-22 15:02:15 UTC
Created attachment 126478 [details]
Patch to fix problem

Was clearing wrong bitset.  This one has been tested/verified.

Comment 7 Jonathan Earl Brassow 2006-04-01 20:38:49 UTC
This is an issue with the kernel no user-space.  Involves how the log device is
read.

Comment 8 Jason Baron 2006-05-04 17:31:06 UTC
committed in stream U4 build 35.1. A test kernel with this patch is available
from http://people.redhat.com/~jbaron/rhel4/


Comment 12 Red Hat Bugzilla 2006-08-10 22:51:53 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/RHSA-2006-0575.html



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