Bug 594525
Summary: | two device alloc anywhere leg placement has regressed | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Corey Marthaler <cmarthal> | |
Component: | lvm2 | Assignee: | Alasdair Kergon <agk> | |
Status: | CLOSED ERRATA | QA Contact: | Corey Marthaler <cmarthal> | |
Severity: | high | Docs Contact: | ||
Priority: | high | |||
Version: | 6.0 | CC: | agk, coughlan, ddumas, dwysocha, heinzm, jbrassow, joe.thornber, mbroz, prajnoha, prockai, syeghiay, tao | |
Target Milestone: | rc | Keywords: | Regression, TestBlocker | |
Target Release: | --- | |||
Hardware: | All | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | lvm2-2.02.86-1.el6 | Doc Type: | Bug Fix | |
Doc Text: |
Generally, placing mirror legs on different physical devices improves data availability. The command <command>lvcreate --alloc anywhere</command> does not guarantee placement of data on different physical devices. Consequently, the use of this option is not recommended. If this option is used, the location of the data placement must be manually verified.
|
Story Points: | --- | |
Clone Of: | ||||
: | 636991 (view as bug list) | Environment: | ||
Last Closed: | 2011-12-06 16:52:30 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: | 636991 |
Description
Corey Marthaler
2010-05-20 22:48:47 UTC
--alloc anywhere never guaranteed that. It just usually happened to work. As discussed elsewhere, a new alloc policy is required to guarantee the desired layout. *** Bug 606492 has been marked as a duplicate of this bug. *** So, it looks like we need a release note for 6.0, describing the current behavior, and this BZ should move to 6.1. Agreed? 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: Proposed 6.0 release note: As a general rule, you will want to place mirror legs on different physical devices, for improved data availability. The command "lvcreate --alloc anywhere" does not guarantee this placement of the data. Thus, the use of this command option is not recommended, or if it is used you are advised to check the resulting data placement. Alasdair, please review. Whoa, hold on here, this bug is not about the command not guaranteeing the placement of the data when used with 2 devices. This bug is that it flat out no longer works! It used to in RHEL5, and no longer does now. If all we're going to do is add a Tech note, then it needs to say "We no longer support 2 device mirrors in RHEL6, there's no way to create them." I think you could create a 2 device mirror by using a combination of 'lvcreate' and 'lvconvert'. ~> lvcreate -l 1 -n lv vg /dev/sdb1 ~> lvconvert -m1 vg/lv /dev/sdc1 That's probably what the release note would say, right? [root@taft-02 ~]# lvcreate -L 100M -n mirror taft /dev/sdb1 Logical volume "mirror" created [root@taft-02 ~]# lvconvert -m1 taft/mirror /dev/sdc1 Not enough PVs with free space available for parallel allocation. Consider --alloc anywhere if desperate. Unable to allocate extents for mirror(s). [root@taft-02 ~]# lvconvert -m1 --alloc anywhere taft/mirror /dev/sdc1 taft/mirror: Converted: 4.0% taft/mirror: Converted: 100.0% [root@taft-02 ~]# lvs -a -o +devices LV VG Attr LSize Log Copy% Devices mirror taft mwi-a- 100.00m mirror_mlog 100.00 mirror_mimage_0(0),mirror_mimage_1(0) [mirror_mimage_0] taft iwi-ao 100.00m /dev/sdb1(0) [mirror_mimage_1] taft iwi-ao 100.00m /dev/sdc1(0) [mirror_mlog] taft lwa-ao 4.00m /dev/sdc1(25) Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1,5 +1 @@ -Proposed 6.0 release note: +Generally, placing mirror legs on different physical devices improves data availability. The command <command>lvcreate --alloc anywhere</command> does not guarantee placement of data on different physical devices. Consequently, the use of this option is not recommended. If this option is used, the location of the data placement must be manually verified.- -As a general rule, you will want to place mirror legs on different physical devices, for improved data availability. The command "lvcreate --alloc anywhere" does not guarantee this placement of the data. Thus, the use of this command option is not recommended, or if it is used you are advised to check the resulting data placement. - -Alasdair, please review. That's at least accurate. Ryan, manually verifying the "lvcreate --alloc anywhere" command won't matter because it won't work, we know that. I thought the tech note would have something about the hack needed for it *too* work. The hack in comment #10. So, this is not just for mirrors, but any future segment type that depends on other invisible segments that get created internally (e.g. thin provisioning metadata). Propose we add this new policy between the existing 'normal' and 'anywhere' policies and then rename normal to "separated" (or some better name if we can think of one) and make the new policy the default 'normal'. *** Bug 500530 has been marked as a duplicate of this bug. *** Finally, I checked in some code. If it can't complete the log allocation, the code now attempts to place the logs on already-used devices. There are still some hopefully-obscure cases it doesn't handle, but I hope what it does now is adequate. There's an lvm.conf setting to (largely) disable the new behaviour. http://www.redhat.com/archives/lvm-devel/2011-February/msg00143.html Adding QA ack for 6.2. Devel will need to provide unit testing results however before this bug can be ultimately verified by QA. Fix verified in the latest rpms. SCENARIO - [alloc_anywhere] Create a mirror using only 2 physical devices lvcreate -m 1 -n alloc_anywhere --alloc anywhere -L 50M mirror_sanity /dev/sdh1:0-1500 /dev/sdg1:0-1500 image1 should be on /dev/sdh1 image2 should be on /dev/sdg1 log should be on either /dev/sdh1 or /dev/sdg1 Deactivating mirror alloc_anywhere... and removing 2.6.32-188.el6.x86_64 lvm2-2.02.87-1.el6 BUILT: Fri Aug 12 06:11:57 CDT 2011 lvm2-libs-2.02.87-1.el6 BUILT: Fri Aug 12 06:11:57 CDT 2011 lvm2-cluster-2.02.87-1.el6 BUILT: Fri Aug 12 06:11:57 CDT 2011 udev-147-2.37.el6 BUILT: Wed Aug 10 07:48:15 CDT 2011 device-mapper-1.02.66-1.el6 BUILT: Fri Aug 12 06:11:57 CDT 2011 device-mapper-libs-1.02.66-1.el6 BUILT: Fri Aug 12 06:11:57 CDT 2011 device-mapper-event-1.02.66-1.el6 BUILT: Fri Aug 12 06:11:57 CDT 2011 device-mapper-event-libs-1.02.66-1.el6 BUILT: Fri Aug 12 06:11:57 CDT 2011 cmirror-2.02.87-1.el6 BUILT: Fri Aug 12 06:11:57 CDT 2011 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-2011-1522.html |