Bug 199580 - Mirror device placement needs to be easier
Summary: Mirror device placement needs to be easier
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: lvm2   
(Show other bugs)
Version: 5.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Jonathan Earl Brassow
QA Contact: Corey Marthaler
URL:
Whiteboard:
Keywords: Documentation
: 234314 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-07-20 15:37 UTC by Dean Jansa
Modified: 2010-05-19 14:17 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-05-19 14:17:04 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Dean Jansa 2006-07-20 15:37:56 UTC
Description of problem:

Using 3 pvs in a vg, attempt to create single leg mirror.  The logs and legs
are place on different devices each time the cmdline is run.

The user must be able to derterministicaly lay out a mirror.

[root@taft-04 ~]# lvcreate -m 1 -n mirror -L 2G vg /dev/sd[b,d]1 /dev/sdc1
  Logical volume "mirror" created
[root@taft-04 ~]# lvs -a -o +devices
  LV                VG   Attr   LSize Origin Snap%  Move Log         Copy%  Devices
  mirror            vg   mwi-a- 2.00G                    mirror_mlog  13.48
mirror_mimage_0(0),mirror_mimage_1(0)
 [mirror_mimage_0] vg   iwi-ao 2.00G                                      
/dev/sdd1(0)
 [mirror_mimage_1] vg   iwi-ao 2.00G                                      
/dev/sdb1(0)
 [mirror_mlog]     vg   lwi-ao 4.00M                                      
/dev/sdc1(0)
[root@taft-04 ~]# lvremove /dev/vg/mirror
Do you really want to remove active logical volume "mirror"? [y/n]: y
 Logical volume "mirror" successfully removed

[root@taft-04 ~]# lvcreate -m 1 -n mirror -L 2G vg /dev/sd[b,c]1 /dev/sdd1
 Logical volume "mirror" created
[root@taft-04 ~]# lvs -a -o +devices
 LV                VG   Attr   LSize Origin Snap%  Move Log         Copy%  Devices
 mirror            vg   mwi-a- 2.00G                    mirror_mlog  11.33
mirror_mimage_0(0),mirror_mimage_1(0)
 [mirror_mimage_0] vg   iwi-ao 2.00G                                      
/dev/sdd1(0)
 [mirror_mimage_1] vg   iwi-ao 2.00G                                      
/dev/sdb1(0)
 [mirror_mlog]     vg   lwi-ao 4.00M                                      
/dev/sdc1(0)

[root@taft-04 ~]# lvremove /dev/vg/mirror
Do you really want to remove active logical volume "mirror"? [y/n]: y
 Logical volume "mirror" successfully removed
[root@taft-04 ~]# lvcreate -m 1 -n mirror -L 2G vg /dev/sd[c,d]1 /dev/sdb1
 Logical volume "mirror" created
[root@taft-04 ~]# lvs -a -o +devices
 LV                VG   Attr   LSize Origin Snap%  Move Log         Copy%  Devices
 mirror            vg   mwi-a- 2.00G                    mirror_mlog  17.38
mirror_mimage_0(0),mirror_mimage_1(0)
 [mirror_mimage_0] vg   iwi-ao 2.00G                                      
/dev/sdd1(0)
 [mirror_mimage_1] vg   iwi-ao 2.00G                                      
/dev/sdc1(0)
 [mirror_mlog]     vg   lwi-ao 4.00M                                      
/dev/sdb1(0)

Comment 2 Kiersten (Kerri) Anderson 2006-09-06 20:06:18 UTC
Defect fix requires a change to lvm2 in base rhel release.  Moving this to the
RHEL product and updating to lvm2 component.  Will also update the tags for the
proposed release.

Comment 3 Kiersten (Kerri) Anderson 2006-09-06 20:08:46 UTC
Devel ACK

Comment 7 Jonathan Earl Brassow 2006-12-12 17:35:27 UTC
This does not require any kernel changes.

In fact, if the user is willing to take the time, you _can_ have deterministic
mirror creation.  What we want is the following:

lvcreate -m 1 -L 500M -n lv vg /dev/sda1 /dev/sdb1 /dev/sdc1

Where the trailing three arguments would represent the first mirror device, the
second mirror device, and the log.  You can, however, acheive this if you also
specify the extent count as follows:

lvcreate -m 1 -L 500M -n lv vg /dev/sda1:0-500 /dev/sdb1:0-499 /dev/sdc1:0


Comment 10 Jonathan Earl Brassow 2007-02-21 19:07:15 UTC
A simple approach suggested by agk is to do a two phased create.

# Create linear device
lvcreate -L <size> -n LV VG <1st set of devices>
# Upconvert to mirror
lvconvert -m1 VG/LV <2nd set of devices>

I've tested this and it works nicely.

Comment 11 Jonathan Earl Brassow 2007-02-21 20:26:30 UTC
Marking as modified given the above method for device placement.


Comment 12 Rob Kenna 2007-04-10 18:58:14 UTC
Removed Cluster flag since this is in RHEL proper; though needed for cluster mirror.

Comment 13 Rob Kenna 2007-04-12 14:15:07 UTC
Moved to 4.6 proposed.  pm-ack provided and other flags cleared.

Comment 14 Jonathan Earl Brassow 2007-04-16 17:17:04 UTC
This isn't going to make 4.6.  Still needs to be addressed though.

modified -> assigned


Comment 16 Michael Hideo 2007-06-06 04:46:36 UTC
Adding 'cc ecs-dev-list@redhat.com for tracking

Comment 17 Jonathan Earl Brassow 2007-07-27 16:09:10 UTC
*** Bug 234314 has been marked as a duplicate of this bug. ***

Comment 18 Michael Hideo 2007-10-23 02:51:59 UTC
Removing automation notification

Comment 19 Milan Broz 2010-05-18 08:59:18 UTC
Moving to RHEL5, is it only documentation or still some code changes?
Anyway, for RHEL4 are planned only approved fixes currently.

Comment 20 Jonathan Earl Brassow 2010-05-19 14:17:04 UTC
Won't fix in rhel5.  The solution will either have to be:
1) specifying the devices at the end of the command and specifically denoting the log devices via a trailing ':x' (e.g. /dev/sdd1:0)
2) create a linear device and follow-up with an lvconvert - specifying which devices to use at each step


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