Bug 867009

Summary: segfault in dmeventd, lvremove, vgreduce when removing part of an LV on a missing PV with issue_discards enabled
Product: Red Hat Enterprise Linux 6 Reporter: RHEL Program Management <pm-rhel>
Component: lvm2Assignee: LVM and device-mapper development team <lvm-team>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: high Docs Contact:
Priority: high    
Version: 6.3CC: agk, cmarthal, dwysocha, heinzm, jbrassow, jentrena, jpallich, msnitzer, pm-eus, prajnoha, prockai, thornber, zkabelac
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: lvm2-2.02.95-10.el6_3.2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-10-23 11:30:10 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: 857554    
Bug Blocks:    

Description RHEL Program Management 2012-10-16 14:27:21 UTC
This bug has been copied from bug #857554 and has been proposed
to be backported to 6.3 z-stream (EUS).

Comment 5 Corey Marthaler 2012-10-18 21:12:26 UTC
The device failure regression test (helter_skelter) that found this regression now passes with discards turned on. Marking Verified.

lvm2-2.02.95-10.el6_3.2    BUILT: Tue Oct 16 10:56:31 CDT 2012
lvm2-libs-2.02.95-10.el6_3.2    BUILT: Tue Oct 16 10:56:31 CDT 2012
lvm2-cluster-2.02.95-10.el6_3.2    BUILT: Tue Oct 16 10:56:31 CDT 2012
udev-147-2.41.el6    BUILT: Thu Mar  1 13:01:08 CST 2012
device-mapper-1.02.74-10.el6_3.2    BUILT: Tue Oct 16 10:56:31 CDT 2012
device-mapper-libs-1.02.74-10.el6_3.2    BUILT: Tue Oct 16 10:56:31 CDT 2012
device-mapper-event-1.02.74-10.el6_3.2    BUILT: Tue Oct 16 10:56:31 CDT 2012
device-mapper-event-libs-1.02.74-10.el6_3.2    BUILT: Tue Oct 16 10:56:31 CDT 2012
cmirror-2.02.95-10.el6_3.2    BUILT: Tue Oct 16 10:56:31 CDT 2012


[root@taft-04 ~]# pvscan
  PV /dev/sdb1   VG test   lvm2 [135.66 GiB / 135.66 GiB free]
  PV /dev/sdc1   VG test   lvm2 [135.66 GiB / 135.66 GiB free]
  PV /dev/sdd1   VG test   lvm2 [135.66 GiB / 135.66 GiB free]

[root@taft-04 ~]# lvcreate -m 1 -n mirror -L 100M test
  Logical volume "mirror" created
[root@taft-04 ~]# lvs -a -o +devices
  LV                VG     Attr     LSize   Log         Copy%  Devices
  mirror            test   mwi-a-m- 100.00m mirror_mlog 100.00 mirror_mimage_0(0),mirror_mimage_1(0)
  [mirror_mimage_0] test   iwi-aom- 100.00m                    /dev/sdb1(0)
  [mirror_mimage_1] test   iwi-aom- 100.00m                    /dev/sdc1(0)
  [mirror_mlog]     test   lwi-aom-   4.00m                    /dev/sdd1(0)

[root@taft-04 ~]# echo offline > /sys/block/sdc/device/state
[root@taft-04 ~]# lvs -a -o +devices
  /dev/sdc1: read failed after 0 of 512 at 145669554176: Input/output error
  [...]
  /dev/sdc1: read failed after 0 of 2048 at 0: Input/output error
  Couldn't find device with uuid EKRAen-O2ge-ObPq-WjyK-c8P4-lcd9-guKeZD.
  LV                VG     Attr     LSize   Log         Copy%  Devices
  mirror            test   mwi-a-m- 100.00m mirror_mlog 100.00 mirror_mimage_0(0),mirror_mimage_1(0)
  [mirror_mimage_0] test   iwi-aom- 100.00m                    /dev/sdb1(0)
  [mirror_mimage_1] test   iwi-aom- 100.00m                    unknown device(0)
  [mirror_mlog]     test   lwi-aom-   4.00m                    /dev/sdd1(0)

[root@taft-04 ~]# vgreduce --removemissing --force test
  /dev/sdc1: read failed after 0 of 512 at 145669554176: Input/output error
  [...]
  /dev/sdc1: read failed after 0 of 2048 at 0: Input/output error
  Couldn't find device with uuid EKRAen-O2ge-ObPq-WjyK-c8P4-lcd9-guKeZD.
  Wrote out consistent volume group test

Comment 7 errata-xmlrpc 2012-10-23 11:30:10 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-1399.html