Bug 1419178

Summary: data corruption after the transient failure of a not in sync raid primary device
Product: Red Hat Enterprise Linux 6 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: Heinz Mauelshagen <heinzm>
lvm2 sub component: Mirroring and RAID (RHEL6) QA Contact: cluster-qe <cluster-qe>
Status: CLOSED WONTFIX Docs Contact:
Severity: high    
Priority: unspecified CC: agk, heinzm, jbrassow, msnitzer, prajnoha, prockai, zkabelac
Version: 6.9   
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-12-06 12:13:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Corey Marthaler 2017-02-03 19:59:31 UTC
Description of problem:
This appears to be a known issue with transient failures of raid1 primary images not yet in sync. Here after the data is written, verified, transiently failed, and refreshed back into the mirror. The data is then missing due to the secondary image syncing back onto the brought back primary image.


================================================================================
Iteration 0.5 started at Thu Feb  2 18:25:52 CST 2017
================================================================================
Scenario kill_primary_non_synced_raid1_3legs: Kill primary leg of NON synced 3 leg raid1 volume(s)

********* RAID hash info for this scenario *********
* names:              non_synced_primary_raid1_3legs_1
* sync:               0
* type:               raid1
* -m |-i value:       3
* leg devices:        /dev/sdd1 /dev/sdc1 /dev/sde1 /dev/sdg1
* spanned legs:       0
* manual repair:      1
* failpv(s):          /dev/sdd1
* failnode(s):        host-073
* lvmetad:            0
* raid fault policy:  warn
******************************************************

Creating raids(s) on host-073...
host-073: lvcreate --type raid1 -m 3 -n non_synced_primary_raid1_3legs_1 -L 3G black_bird /dev/sdd1:0-3600 /dev/sdc1:0-3600 /dev/sde1:0-3600 /dev/sdg1:0-3600

Current mirror/raid device structure(s):
  LV                                          Attr       LSize   Cpy%Sync Devices
  non_synced_primary_raid1_3legs_1            rwi-a-r---   3.00g 0.00     non_synced_primary_raid1_3legs_1_rimage_0(0),non_synced_primary_raid1_3legs_1_rimage_1(0),non_synced_primary_raid1_3legs_1_rimage_2(0),non_synced_primary_raid1_3legs_1_rimage_3(0)
  [non_synced_primary_raid1_3legs_1_rimage_0] Iwi-aor---   3.00g          /dev/sdd1(1)
  [non_synced_primary_raid1_3legs_1_rimage_1] Iwi-aor---   3.00g          /dev/sdc1(1)
  [non_synced_primary_raid1_3legs_1_rimage_2] Iwi-aor---   3.00g          /dev/sde1(1)
  [non_synced_primary_raid1_3legs_1_rimage_3] Iwi-aor---   3.00g          /dev/sdg1(1)
  [non_synced_primary_raid1_3legs_1_rmeta_0]  ewi-aor---   4.00m          /dev/sdd1(0)
  [non_synced_primary_raid1_3legs_1_rmeta_1]  ewi-aor---   4.00m          /dev/sdc1(0)
  [non_synced_primary_raid1_3legs_1_rmeta_2]  ewi-aor---   4.00m          /dev/sde1(0)
  [non_synced_primary_raid1_3legs_1_rmeta_3]  ewi-aor---   4.00m          /dev/sdg1(0)


Creating ext on top of mirror(s) on host-073...
mke2fs 1.41.12 (17-May-2010)
Mounting mirrored ext filesystems on host-073...

PV=/dev/sdd1
        non_synced_primary_raid1_3legs_1_rimage_0: 2
        non_synced_primary_raid1_3legs_1_rmeta_0: 2

Writing verification files (checkit) to mirror(s) on...
        ---- host-073 ----

<start name="host-073_non_synced_primary_raid1_3legs_1"  pid="22695" time="Thu Feb  2 18:26:10 2017 -0600" type="cmd" />
Verifying files (checkit) on mirror(s) on...
        ---- host-073 ----


Current sync percent just before failure
        ( 15.11% )

Disabling device sdd on host-073

Attempting I/O to cause mirror down conversion(s) on host-073
dd if=/dev/zero of=/mnt/non_synced_primary_raid1_3legs_1/ddfile count=10 bs=4M
10+0 records in
10+0 records out
41943040 bytes (42 MB) copied, 0.181764 s, 231 MB/s

HACK TO KILL XDOIO...
<fail name="host-073_non_synced_primary_raid1_3legs_1"  pid="22695" time="Thu Feb  2 18:26:29 2017 -0600" type="cmd" duration="19" ec="143" />
ALL STOP!
Unmounting ext and removing mnt point on host-073...

Verifying proper "D"ead kernel status state for failed raid images(s)
black_bird-non_synced_primary_raid1_3legs_1: 0 6291456 raid raid1 4 DAAA 1317888/6291456 resync 0

Reactivaing the raids containing transiently failed raid images
lvchange -an black_bird/non_synced_primary_raid1_3legs_1
  /dev/sdd1: read failed after 0 of 2048 at 0: Input/output error
  /dev/sdd1: read failed after 0 of 1024 at 22545367040: Input/output error
  /dev/sdd1: read failed after 0 of 1024 at 22545448960: Input/output error
  /dev/sdd1: read failed after 0 of 1024 at 0: Input/output error
  /dev/sdd1: read failed after 0 of 1024 at 4096: Input/output error
  Couldn't find device with uuid 9NqF7Q-Mv1E-LP6Z-Nbid-u9Dr-RId2-j9o8wD.
  Couldn't find device for segment belonging to black_bird/non_synced_primary_raid1_3legs_1_rimage_0 while checking used and assumed devices.


lvchange -ay  black_bird/non_synced_primary_raid1_3legs_1
  /dev/sdd1: open failed: No such device or address
  Couldn't find device with uuid 9NqF7Q-Mv1E-LP6Z-Nbid-u9Dr-RId2-j9o8wD.

Verifying proper kernel table state of failed image(s)
Verifying proper "D"ead kernel status state for failed raid images(s)
black_bird-non_synced_primary_raid1_3legs_1: 0 6291456 raid raid1 4 Daaa 0/6291456 resync 0

Enabling device sdd on host-073 Running vgs to make LVM update metadata version if possible (will restore a-m PVs)

Refreshing raids now that transiently failed raid images should be back
lvchange --refresh black_bird/non_synced_primary_raid1_3legs_1
HACK: additional refresh as outlined in bug 1265191#c22: lvchange --refresh black_bird/non_synced_primary_raid1_3legs_1

Verifying current sanity of lvm after the failure
Waiting until all mirror|raid volumes become fully syncd...
   0/1 mirror(s) are fully synced: ( 39.49% )
   0/1 mirror(s) are fully synced: ( 61.03% )
   0/1 mirror(s) are fully synced: ( 78.61% )
   1/1 mirror(s) are fully synced: ( 100.00% )
Verifying proper "A"ctive kernel status state for raid image(s)

Current mirror/raid device structure(s):
  LV                                          Attr       LSize   Cpy%Sync Devices
  non_synced_primary_raid1_3legs_1            rwi-a-r---   3.00g 100.00   non_synced_primary_raid1_3legs_1_rimage_0(0),non_synced_primary_raid1_3legs_1_rimage_1(0),non_synced_primary_raid1_3legs_1_rimage_2(0),non_synced_primary_raid1_3legs_1_rimage_3(0)
  [non_synced_primary_raid1_3legs_1_rimage_0] iwi-aor---   3.00g          /dev/sdd1(1)
  [non_synced_primary_raid1_3legs_1_rimage_1] iwi-aor---   3.00g          /dev/sdc1(1)
  [non_synced_primary_raid1_3legs_1_rimage_2] iwi-aor---   3.00g          /dev/sde1(1)
  [non_synced_primary_raid1_3legs_1_rimage_3] iwi-aor---   3.00g          /dev/sdg1(1)
  [non_synced_primary_raid1_3legs_1_rmeta_0]  ewi-aor---   4.00m          /dev/sdd1(0)
  [non_synced_primary_raid1_3legs_1_rmeta_1]  ewi-aor---   4.00m          /dev/sdc1(0)
  [non_synced_primary_raid1_3legs_1_rmeta_2]  ewi-aor---   4.00m          /dev/sde1(0)
  [non_synced_primary_raid1_3legs_1_rmeta_3]  ewi-aor---   4.00m          /dev/sdg1(0)


Checking for leftover '-missing_0_0' or 'unknown devices'
Verifying FAILED device /dev/sdd1 *IS BACK* in the volume(s)
Verifying IMAGE device /dev/sdc1 *IS* in the volume(s)
Verifying IMAGE device /dev/sde1 *IS* in the volume(s)
Verifying IMAGE device /dev/sdg1 *IS* in the volume(s)
Verify the rimage/rmeta dm devices remain after the failures
DM:non_synced_primary_raid1_3legs_1_rimage_0
DM:non_synced_primary_raid1_3legs_1_rmeta_0
Verify the rimage/rmeta dm devices remain after the failures
Checking EXISTENCE and STATE of non_synced_primary_raid1_3legs_1_rimage_0 on: host-073 
Checking EXISTENCE and STATE of non_synced_primary_raid1_3legs_1_rmeta_0 on: host-073 

Verify the raid image order is what's expected based on raid fault policy
EXPECTED ORDER IS JUST THE ORIGINAL LEG LIST: /dev/sdd1 /dev/sdc1 /dev/sde1 /dev/sdg1
ACTUAL LEG ORDER: /dev/sdd1 /dev/sdc1 /dev/sde1 /dev/sdg1
/dev/sdd1 ne /dev/sdd1
/dev/sdc1 ne /dev/sdc1
/dev/sde1 ne /dev/sde1
/dev/sdg1 ne /dev/sdg1
Verifying proper kernel table state of failed image(s)

Mounting mirrored ext filesystems on host-073...
Verifying files (checkit) on mirror(s) on...
        ---- host-073 ----

Can not cd to /mnt/non_synced_primary_raid1_3legs_1/checkit: No such file or directory


[root@host-073 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/black_bird-non_synced_primary_raid1_3legs_1
                      3.0G   69M  2.8G   3% /mnt/non_synced_primary_raid1_3legs_1

# data is missing
[root@host-073 ~]# ls /mnt/non_synced_primary_raid1_3legs_1
lost+found





Version-Release number of selected component (if applicable):
2.6.32-688.el6.x86_64

lvm2-2.02.143-12.el6    BUILT: Wed Jan 11 09:35:04 CST 2017
lvm2-libs-2.02.143-12.el6    BUILT: Wed Jan 11 09:35:04 CST 2017
lvm2-cluster-2.02.143-12.el6    BUILT: Wed Jan 11 09:35:04 CST 2017
udev-147-2.73.el6_8.2    BUILT: Tue Aug 30 08:17:19 CDT 2016
device-mapper-1.02.117-12.el6    BUILT: Wed Jan 11 09:35:04 CST 2017
device-mapper-libs-1.02.117-12.el6    BUILT: Wed Jan 11 09:35:04 CST 2017
device-mapper-event-1.02.117-12.el6    BUILT: Wed Jan 11 09:35:04 CST 2017
device-mapper-event-libs-1.02.117-12.el6    BUILT: Wed Jan 11 09:35:04 CST 2017
device-mapper-persistent-data-0.6.2-0.1.rc7.el6    BUILT: Tue Mar 22 08:58:09 CDT 2016
cmirror-2.02.143-12.el6    BUILT: Wed Jan 11 09:35:04 CST 2017

Comment 2 Jan Kurik 2017-12-06 12:13:21 UTC
Red Hat Enterprise Linux 6 is in the Production 3 Phase. During the Production 3 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available.

The official life cycle policy can be reviewed here:

http://redhat.com/rhel/lifecycle

This issue does not meet the inclusion criteria for the Production 3 Phase and will be marked as CLOSED/WONTFIX. If this remains a critical requirement, please contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification. Note that a strong business justification will be required for re-evaluation. Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL:

https://access.redhat.com/