Hide Forgot
Description of problem: This is a regression of the following test case (and my be related to bug 737125): SCENARIO - [redundant_log_on_small_extent_vg] Create a redundant logged mirror on a VG with small extents Recreating VG with smaller (256K) extent size taft-01: vgcreate -s 256k mirror_sanity /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1 /dev/sdg1 /dev/sdh1 taft-01: lvcreate -n mirrored_log_on_256kextent_vg -L 200M -m 1 --mirrorlog mirrored mirror_sanity device-mapper: reload ioctl failed: Invalid argument Aborting. Failed to activate mirror log. Failed to initialise mirror log. couldn't create mirror on small extent VG device-mapper: dirty region log: invalid region size 1024 device-mapper: table: 253:5: mirror: Error creating mirror dirty log device-mapper: ioctl: error adding target to table Version-Release number of selected component (if applicable): 2.6.32-193.el6.bz735124.1.x86_64 lvm2-2.02.87-2.el6 BUILT: Fri Sep 9 09:35:36 CDT 2011 lvm2-libs-2.02.87-2.el6 BUILT: Fri Sep 9 09:35:36 CDT 2011 lvm2-cluster-2.02.87-2.el6 BUILT: Fri Sep 9 09:35:36 CDT 2011 udev-147-2.37.el6 BUILT: Wed Aug 10 07:48:15 CDT 2011 device-mapper-1.02.66-2.el6 BUILT: Fri Sep 9 09:35:36 CDT 2011 device-mapper-libs-1.02.66-2.el6 BUILT: Fri Sep 9 09:35:36 CDT 2011 device-mapper-event-1.02.66-2.el6 BUILT: Fri Sep 9 09:35:36 CDT 2011 device-mapper-event-libs-1.02.66-2.el6 BUILT: Fri Sep 9 09:35:36 CDT 2011 cmirror-2.02.87-2.el6 BUILT: Fri Sep 9 09:35:36 CDT 2011 How reproducible: Everytime
FWIW, the following dm devices are created during the failed mirror create attempt. [root@taft-01 ~]# dmsetup ls mirror_sanity-mirrored_log_on_256kextent_vg_mlog_mimage_1 (253, 4) mirror_sanity-mirrored_log_on_256kextent_vg_mlog_mimage_0 (253, 3) mirror_sanity-mirrored_log_on_256kextent_vg_mlog (253, 5)
Once 737125 is eliminated, this problem remains. It is due to the fact that the kernel also imposes this restriction on mirrors: static int _check_region_size(struct dm_target *ti, uint32_t region_size) { if (region_size < 2 || region_size > ti->len) return 0; if (!is_power_of_2(region_size)) return 0; return 1; } Specifically, that the region_size be less than the length of the target. The mirror log is extremely small - normally 4MiB w/ 512kiB region_size. However, with the pe_size setting in this bug, we get a 2kiB log with 512kiB region_size. The region_size will have to be adjusted to the power of 2 that is less than the size of the log.
The other (and easier solution) is to make the log at least the size of a region. This may cause the log to be larger than it would otherwise have to be, but this will not happen when PE sizes are normal.
Solution in comment 6 checked in upstream in Version 2.02.89
git commit ID: 39feace42ecc87743b42a0ff46ebc9718502774e
proof of solution... [root@bp-01 ~]# !vgs vgs -o name,vg_extent_size vg VG Ext vg 1.00k [root@bp-01 ~]# lvcreate -m 1 --mirrorlog mirrored -L 20M -n lv vg Logical volume "lv" created [root@bp-01 ~]# lvs -a -o name,size vg LV LSize lv 20.00m [lv_mimage_0] 20.00m [lv_mimage_1] 20.00m [lv_mlog] 512.00k [lv_mlog_mimage_0] 512.00k [lv_mlog_mimage_1] 512.00k
I no longer see this issue either on the latest scratch built rpms. ============================================================ Iteration 10 of 10 started at Thu Sep 15 11:05:25 CDT 2011 ============================================================ SCENARIO - [redundant_log_on_small_extent_vg] Create a redundant logged mirror on a VG with small extents Recreating VG with smaller (256K) extent size taft-01: vgcreate -s 256k mirror_sanity /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1 /dev/sdg1 /dev/sdh1 taft-01: lvcreate -n mirrored_log_on_256kextent_vg -L 200M -m 1 --mirrorlog mirrored mirror_sanity Deactivating mirror mirrored_log_on_256kextent_vg... and removing Restoring VG to default extent size 2.6.32-195.el6.x86_64 lvm2-2.02.87-2.1.el6 BUILT: Wed Sep 14 09:44:16 CDT 2011 lvm2-libs-2.02.87-2.1.el6 BUILT: Wed Sep 14 09:44:16 CDT 2011 lvm2-cluster-2.02.87-2.1.el6 BUILT: Wed Sep 14 09:44:16 CDT 2011 udev-147-2.38.el6 BUILT: Fri Sep 9 16:25:50 CDT 2011 device-mapper-1.02.66-2.1.el6 BUILT: Wed Sep 14 09:44:16 CDT 2011 device-mapper-libs-1.02.66-2.1.el6 BUILT: Wed Sep 14 09:44:16 CDT 2011 device-mapper-event-1.02.66-2.1.el6 BUILT: Wed Sep 14 09:44:16 CDT 2011 device-mapper-event-libs-1.02.66-2.1.el6 BUILT: Wed Sep 14 09:44:16 CDT 2011 cmirror-2.02.87-2.1.el6 BUILT: Wed Sep 14 09:44:16 CDT 2011
Fix verified in the latest official rpms. 2.6.32-198.el6.x86_64 lvm2-2.02.87-3.el6 BUILT: Wed Sep 21 09:54:55 CDT 2011 lvm2-libs-2.02.87-3.el6 BUILT: Wed Sep 21 09:54:55 CDT 2011 lvm2-cluster-2.02.87-3.el6 BUILT: Wed Sep 21 09:54:55 CDT 2011 udev-147-2.38.el6 BUILT: Fri Sep 9 16:25:50 CDT 2011 device-mapper-1.02.66-3.el6 BUILT: Wed Sep 21 09:54:55 CDT 2011 device-mapper-libs-1.02.66-3.el6 BUILT: Wed Sep 21 09:54:55 CDT 2011 device-mapper-event-1.02.66-3.el6 BUILT: Wed Sep 21 09:54:55 CDT 2011 device-mapper-event-libs-1.02.66-3.el6 BUILT: Wed Sep 21 09:54:55 CDT 2011 cmirror-2.02.87-3.el6 BUILT: Wed Sep 21 09:54:55 CDT 2011 SCENARIO - [redundant_log_on_small_extent_vg] Create a redundant logged mirror on a VG with small extents Recreating VG with smaller (256K) extent size taft-01: vgcreate -s 256k mirror_sanity /dev/sdd1 /dev/sdd2 /dev/sde1 /dev/sde2 /dev/sdf1 /dev/sdf2 /dev/sdg1 /dev/sdg2 /dev/sdh1 /dev/sdh2 taft-01: lvcreate -n mirrored_log_on_256kextent_vg -L 200M -m 1 --mirrorlog mirrored mirror_sanity Deactivating mirror mirrored_log_on_256kextent_vg... and removing Restoring VG to default extent size
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: Do not document.
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