Bug 607334

Summary: allocate log fault policy doesn't work for redundant mirrored logs losing one device
Product: Red Hat Enterprise Linux 6 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: Jonathan Earl Brassow <jbrassow>
Status: CLOSED ERRATA QA Contact: Corey Marthaler <cmarthal>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: agk, ddumas, dwysocha, heinzm, jbrassow, joe.thornber, mbroz, prajnoha, prockai
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: lvm2-2.02.82-1.el6 Doc Type: Bug Fix
Doc Text:
It is now possible for a mirror log to be converted from "disk" to "mirrored".
Story Points: ---
Clone Of:
: 644079 (view as bug list) Environment:
Last Closed: 2011-05-19 14:26:11 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:    
Bug Blocks: 644079    

Description Corey Marthaler 2010-06-23 20:23:31 UTC
Description of problem:
I had a redundant log mirror and failed the secondary leg of that log. The allocate fault policy doesn't work because that failure causes a down convert to a single disk log and upconverting logs isn't implemented yet.


Jun 23 20:00:02 taft-01 lvm[1950]: Monitoring mirror device helter_skelter-syncd_secondary_log_2legs_2logs_1 for events.
Jun 23 20:00:02 taft-01 lvm[1950]: Another thread is handling an event. Waiting...
Jun 23 20:00:02 taft-01 lvm[1950]: Trying to up-convert to 2 images, 2 logs.
Jun 23 20:00:02 taft-01 lvm[1950]: Adding log redundancy not supported yet.
Jun 23 20:00:02 taft-01 lvm[1950]: Try converting the log to 'core' first.
Jun 23 20:00:02 taft-01 lvm[1950]: Trying to up-convert to 2 images, 1 logs.
Jun 23 20:00:02 taft-01 lvm[1950]: Monitoring mirror device helter_skelter-syncd_secondary_log_2legs_2logs_1 for events.
Jun 23 20:00:02 taft-01 lvm[1950]: Another thread is handling an event. Waiting...
Jun 23 20:00:02 taft-01 lvm[1950]: WARNING: Failed to replace 1 of 2 logs in volume syncd_secondary_log_2legs_2logs_1
Jun 23 20:00:02 taft-01 lvm[1950]: Repair of mirrored LV helter_skelter/syncd_secondary_log_2legs_2logs_1 finished successfully.
Jun 23 20:00:02 taft-01 lvm[1950]: helter_skelter-syncd_secondary_log_2legs_2logs_1 is now in-sync.
Jun 23 20:00:02 taft-01 lvm[1950]: helter_skelter-syncd_secondary_log_2legs_2logs_1 is now in-sync.
Jun 23 20:00:02 taft-01 xinetd[1649]: EXIT: qarsh status=0 pid=27964 duration=3(sec)
Jun 23 20:00:02 taft-01 xinetd[1649]: START: qarsh pid=29386 from=::ffff:10.15.80.47
Jun 23 20:00:02 taft-01 qarshd[29386]: Talking to peer 10.15.80.47:58962
Jun 23 20:00:02 taft-01 qarshd[29386]: Running cmdline: dd if=/dev/zero of=/mnt/syncd_secondary_log_2legs_2logs_1/ddfile count=10 bs=4M
Jun 23 20:00:03 taft-01 xinetd[1649]: EXIT: qarsh status=0 pid=29386 duration=1(sec)
Jun 23 20:00:03 taft-01 xinetd[1649]: START: qarsh pid=29388 from=::ffff:10.15.80.47
Jun 23 20:00:03 taft-01 qarshd[29388]: Talking to peer 10.15.80.47:58963
Jun 23 20:00:03 taft-01 qarshd[29388]: Running cmdline: sync
Jun 23 20:00:03 taft-01 xinetd[1649]: EXIT: qarsh status=0 pid=29388 duration=0(sec)
Jun 23 20:00:04 taft-01 lvm[1950]: No longer monitoring mirror device helter_skelter-syncd_secondary_log_2legs_2logs_1_mlog for events.
Jun 23 20:00:06 taft-01 lvm[1950]: dm_task_run failed, errno = 22, Invalid argument
Jun 23 20:00:07 taft-01 lvm[1950]: No longer monitoring mirror device helter_skelter-syncd_secondary_log_2legs_2logs_1 for events.

Comment 1 Jonathan Earl Brassow 2010-06-30 13:31:14 UTC
Won't have time to fix in 6.0 - will wait til 6.1.  If a user wishes to maintain their mirrored log, they will have to convert to 'core' log and then to 'mirrored' log for now.

Comment 4 Jonathan Earl Brassow 2011-01-11 17:07:31 UTC
Fix checked in upstream:

Checking in WHATS_NEW;
/cvs/lvm2/LVM2/WHATS_NEW,v  <--  WHATS_NEW
new revision: 1.1876; previous revision: 1.1875
done
Checking in lib/metadata/lv_manip.c;
/cvs/lvm2/LVM2/lib/metadata/lv_manip.c,v  <--  lv_manip.c
new revision: 1.243; previous revision: 1.242
done
Checking in lib/metadata/mirror.c;
/cvs/lvm2/LVM2/lib/metadata/mirror.c,v  <--  mirror.c
new revision: 1.139; previous revision: 1.138
done
Checking in tools/lvconvert.c;
/cvs/lvm2/LVM2/tools/lvconvert.c,v  <--  lvconvert.c
new revision: 1.155; previous revision: 1.154
done
Checking in tools/lvcreate.c;
/cvs/lvm2/LVM2/tools/lvcreate.c,v  <--  lvcreate.c
new revision: 1.228; previous revision: 1.227
done

Comment 5 Jonathan Earl Brassow 2011-01-11 17:10:52 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
It is now possible for a mirror log to be converted from "disk" to "mirrored".

Comment 8 Corey Marthaler 2011-03-10 22:48:27 UTC
Fix verified in the latest rpms. All the helter_skelter test cases with mirror
leg as well as mirrored log leg failures have been turned back on and executed with the expectation that the log leg allocation policy will work.

2.6.32-118.el6.x86_64

lvm2-2.02.83-2.el6    BUILT: Tue Feb  8 10:10:57 CST 2011
lvm2-libs-2.02.83-2.el6    BUILT: Tue Feb  8 10:10:57 CST 2011
lvm2-cluster-2.02.83-2.el6    BUILT: Tue Feb  8 10:10:57 CST 2011
udev-147-2.34.el6    BUILT: Wed Feb 16 08:09:21 CST 2011
device-mapper-1.02.62-2.el6    BUILT: Tue Feb  8 10:10:57 CST 2011
device-mapper-libs-1.02.62-2.el6    BUILT: Tue Feb  8 10:10:57 CST 2011
device-mapper-event-1.02.62-2.el6    BUILT: Tue Feb  8 10:10:57 CST 2011
device-mapper-event-libs-1.02.62-2.el6    BUILT: Tue Feb  8 10:10:57 CST 2011
cmirror-2.02.83-2.el6    BUILT: Tue Feb  8 10:10:57 CST 2011

Comment 9 errata-xmlrpc 2011-05-19 14:26:11 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 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/RHBA-2011-0772.html