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:
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...
looks like kernel problem because the table line looks good...
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.
Created attachment 126440 [details] Patch to fix problem I still have to test this patch.
Created attachment 126478 [details] Patch to fix problem Was clearing wrong bitset. This one has been tested/verified.
This is an issue with the kernel no user-space. Involves how the log device is read.
committed in stream U4 build 35.1. A test kernel with this patch is available from http://people.redhat.com/~jbaron/rhel4/
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