Bug 199580 - Mirror device placement needs to be easier
Mirror device placement needs to be easier
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: lvm2 (Show other bugs)
5.4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jonathan Earl Brassow
Corey Marthaler
: Documentation
: 234314 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-07-20 11:37 EDT by Dean Jansa
Modified: 2010-05-19 10:17 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-05-19 10:17:04 EDT
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 Dean Jansa 2006-07-20 11:37:56 EDT
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 16:06:18 EDT
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 16:08:46 EDT
Devel ACK
Comment 7 Jonathan Earl Brassow 2006-12-12 12:35:27 EST
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 14:07:15 EST
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 15:26:30 EST
Marking as modified given the above method for device placement.
Comment 12 Rob Kenna 2007-04-10 14:58:14 EDT
Removed Cluster flag since this is in RHEL proper; though needed for cluster mirror.
Comment 13 Rob Kenna 2007-04-12 10:15:07 EDT
Moved to 4.6 proposed.  pm-ack provided and other flags cleared.
Comment 14 Jonathan Earl Brassow 2007-04-16 13:17:04 EDT
This isn't going to make 4.6.  Still needs to be addressed though.

modified -> assigned
Comment 16 Michael Hideo 2007-06-06 00:46:36 EDT
Adding 'cc ecs-dev-list@redhat.com for tracking
Comment 17 Jonathan Earl Brassow 2007-07-27 12:09:10 EDT
*** Bug 234314 has been marked as a duplicate of this bug. ***
Comment 18 Michael Hideo 2007-10-22 22:51:59 EDT
Removing automation notification
Comment 19 Milan Broz 2010-05-18 04:59:18 EDT
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 10:17:04 EDT
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.