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)
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.
Devel ACK
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
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.
Marking as modified given the above method for device placement.
Removed Cluster flag since this is in RHEL proper; though needed for cluster mirror.
Moved to 4.6 proposed. pm-ack provided and other flags cleared.
This isn't going to make 4.6. Still needs to be addressed though. modified -> assigned
Adding 'cc ecs-dev-list for tracking
*** Bug 234314 has been marked as a duplicate of this bug. ***
Removing automation notification
Moving to RHEL5, is it only documentation or still some code changes? Anyway, for RHEL4 are planned only approved fixes currently.
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