RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 619221 - log device splitting regression
Summary: log device splitting regression
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2
Version: 6.0
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Jonathan Earl Brassow
QA Contact: Corey Marthaler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-28 22:57 UTC by Corey Marthaler
Modified: 2010-11-10 21:08 UTC (History)
12 users (show)

Fixed In Version: lvm2-2.02.72-6.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-10 21:08:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Corey Marthaler 2010-07-28 22:57:30 UTC
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 Program Management 2010-07-28 23:27:32 UTC
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 22:24:32 UTC
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 22:55:20 UTC
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 15:56:12 UTC
Fix checked-in upstream.

Comment 9 Corey Marthaler 2010-08-12 16:20:13 UTC
[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 21:08:31 UTC
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.