[lvm-devel] [RFC][PATCH] lvm2: adjust region size of mirrored log

Takahiro Yasui takahiro.yasui at hds.com
Sat Jun 26 13:08:26 UTC 2010


Another approach to fix this problem is to extend a log volume size to a physical
extent size.

Appreciate your reviews and comments.

Thanks,
Taka

________________________________________
From: lvm-devel-bounces at redhat.com [lvm-devel-bounces at redhat.com] On Behalf Of Takahiro Yasui [takahiro.yasui at hds.com]
Sent: Friday, June 25, 2010 1:25 PM
To: lvm-devel at redhat.com
Subject: [lvm-devel] [RFC][PATCH] lvm2: adjust region size of mirrored log

Fix bz608048

The same region size is used for both mirror volume and mirrored
log volume, but when physical extent size is bigger than region size,
the size of mirror leg for mirrored log is smaller than the region size
and lvcreate command fails.

This patch adjusts a region size of mirrored log to a smaller value of
region size or physical extent size.


Signed-off-by: Takahiro Yasui <takahiro.yasui at hds.com>
---
 lib/metadata/mirror.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Index: LVM2-2.02.68/lib/metadata/mirror.c
===================================================================
--- LVM2-2.02.68.orig/lib/metadata/mirror.c
+++ LVM2-2.02.68/lib/metadata/mirror.c
@@ -1816,7 +1816,9 @@ int add_mirror_images(struct cmd_context
         * create and initialize mirror log
         */
        if (log_count &&
-           !(log_lv = _set_up_mirror_log(cmd, ah, lv, log_count, region_size,
+           !(log_lv = _set_up_mirror_log(cmd, ah, lv, log_count,
+                                         (region_size > lv->vg->extent_size) ?
+                                         lv->vg->extent_size : region_size,
                                          alloc, mirror_in_sync()))) {
                stack;
                goto out_remove_images;

--
Takahiro Yasui
Hitachi Data Systems

--
lvm-devel mailing list
lvm-devel at redhat.com
https://www.redhat.com/mailman/listinfo/lvm-devel




More information about the lvm-devel mailing list