Bug 619221 - log device splitting regression
log device splitting regression
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2 (Show other bugs)
6.0
All Linux
high Severity high
: rc
: ---
Assigned To: Jonathan Earl Brassow
Corey Marthaler
: Regression, RHELNAK, TestBlocker
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-28 18:57 EDT by Corey Marthaler
Modified: 2010-11-10 16:08 EST (History)
12 users (show)

See Also:
Fixed In Version: lvm2-2.02.72-6.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-10 16:08:31 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Corey Marthaler 2010-07-28 18:57:30 EDT
Description of problem:
In the previous lvm build (69-2), an attempt to split off a log device fails (like I assume it should). In the current build (72-3),  an attempt to split off a log device "works" however, the log device isn't even used. Lvm assumes you must mean the secondary device and chooses it instead.

[root@taft-01 ~]# lvcreate -m 1 -n split_log -L 300M split_image
  Logical volume "split_log" created

[root@taft-01 ~]# lvs -a -o +devices
  LV                   VG          Attr   LSize   Log            Copy%  Devices
  split_log            split_image mwi-a- 300.00m split_log_mlog  66.67 split_log_mimage_0(0),split_log_mimage_1(0)
  [split_log_mimage_0] split_image Iwi-ao 300.00m                       /dev/sdb1(0)
  [split_log_mimage_1] split_image Iwi-ao 300.00m                       /dev/sdc1(0)
  [split_log_mlog]     split_image lwi-ao   4.00m                       /dev/sdh1(0)

[root@taft-01 ~]# lvconvert --splitmirrors 1 --name new split_image/split_log /dev/sdh1
  Logical volume split_log converted.

[root@taft-01 ~]# lvs -a -o +devices
  LV        VG          Attr   LSize   Log Copy%  Devices
  new       split_image -wi-a- 300.00m            /dev/sdc1(0)
  split_log split_image -wi-a- 300.00m            /dev/sdb1(0)


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

lvm2-2.02.72-3.el6    BUILT: Wed Jul 28 15:39:43 CDT 2010
lvm2-libs-2.02.72-3.el6    BUILT: Wed Jul 28 15:39:43 CDT 2010
lvm2-cluster-2.02.72-3.el6    BUILT: Wed Jul 28 15:39:43 CDT 2010
udev-147-2.21.el6    BUILT: Mon Jul 12 04:55:00 CDT 2010
device-mapper-1.02.53-3.el6    BUILT: Wed Jul 28 15:39:43 CDT 2010
device-mapper-libs-1.02.53-3.el6    BUILT: Wed Jul 28 15:39:43 CDT 2010
device-mapper-event-1.02.53-3.el6    BUILT: Wed Jul 28 15:39:43 CDT 2010
device-mapper-event-libs-1.02.53-3.el6    BUILT: Wed Jul 28 15:39:43 CDT 2010
cmirror-2.02.72-3.el6    BUILT: Wed Jul 28 15:39:43 CDT 2010
Comment 3 RHEL Product and Program Management 2010-07-28 19:27:32 EDT
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **
Comment 5 Takahiro Yasui 2010-08-04 18:24:32 EDT
FYI: this issue was introduced by the following patch.

Fix reversal of LV list before performing a split mirror.
https://www.redhat.com/archives/lvm-devel/2010-July/msg00122.html

With this patch, PVs lists (lp->pvh) are not used when a mirror is split (lp->keep_images != 0) and work as if no PVs are specified in the command line. Therefore, lvconvert doesn't split off specified devices even if devices assigned to a mirror leg are requested.

This is an example.

vg00-lv00 (253:3)
 |-vg00-lv00_mimage_1 (253:2)
 |  `- (8:32)            <== /dev/sdb
 |-vg00-lv00_mimage_0 (253:1)
 |  `- (8:16)                     <== /dev/sdc
 `-vg00-lv00_mlog (253:0)
    `- (8:48)                     <== /dev/sdd

# lvconvert --mirrorlog disk --splitmirrors 1 --name new vg00/lv00 /dev/sdb
  Logical volume lv00 converted.

# dmsetup ls --tree -o ascii
vg00-new (253:2)
 `- (8:32)                        <== /dev/sdc is removed instead of /dev/sdb
vg00-lv00 (253:3)
 `- (8:16)

I read the description of the patch, but I couldn't get how this patch works.
I appreciate Jon's explanation.
Comment 6 Jonathan Earl Brassow 2010-08-04 18:55:20 EDT
The problem is worse than the subject implies.  All PVs specified on the command line are ignored when performing a split mirror operation.

So, in the case where you specify the log device, it is ignored and the last sub-lv is taken ([split_log_mimage_1]).  If you would have specified a valid device, it too would have been ignored and just chosen whatever devices are associated with the highest number mimage's.

Patch awaiting upstream review.
Comment 7 Jonathan Earl Brassow 2010-08-06 11:56:12 EDT
Fix checked-in upstream.
Comment 9 Corey Marthaler 2010-08-12 12:20:13 EDT
[root@taft-02 ~]# lvs -a -o +devices
  LV                   VG        Attr   LSize   Log            Copy%  Devices
  split_log            taft      mwi-a- 300.00m split_log_mlog 100.00 split_log_mimage_0(0),split_log_mimage_1(0)
  [split_log_mimage_0] taft      iwi-ao 300.00m                       /dev/sdb1(0)
  [split_log_mimage_1] taft      iwi-ao 300.00m                       /dev/sdc1(0)
  [split_log_mlog]     taft      lwi-ao   4.00m                       /dev/sdh1(0)

[root@taft-02 ~]# lvconvert --splitmirrors 1 --name new taft/split_log /dev/sdh1
  Insufficient removable PVs given to satisfy request

Fix verified in latest rpms.

2.6.32-59.1.el6.x86_64

lvm2-2.02.72-7.el6    BUILT: Wed Aug 11 17:12:24 CDT 2010
lvm2-libs-2.02.72-7.el6    BUILT: Wed Aug 11 17:12:24 CDT 2010
lvm2-cluster-2.02.72-7.el6    BUILT: Wed Aug 11 17:12:24 CDT 2010
udev-147-2.22.el6    BUILT: Fri Jul 23 07:21:33 CDT 2010
device-mapper-1.02.53-7.el6    BUILT: Wed Aug 11 17:12:24 CDT 2010
device-mapper-libs-1.02.53-7.el6    BUILT: Wed Aug 11 17:12:24 CDT 2010
device-mapper-event-1.02.53-7.el6    BUILT: Wed Aug 11 17:12:24 CDT 2010
device-mapper-event-libs-1.02.53-7.el6    BUILT: Wed Aug 11 17:12:24 CDT 2010
cmirror-2.02.72-7.el6    BUILT: Wed Aug 11 17:12:24 CDT 2010
Comment 10 releng-rhel@redhat.com 2010-11-10 16:08:31 EST
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

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