FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 02-26-2010, 10:36 PM
Jonathan Brassow
 
Default LVM: monitor mirrored logs

Patch name: lvm-monitor-mirrored-logs.patch

Log volume of a mirror can also be a mirror with the following patchset.
http://thread.gmane.org/gmane.linux.kernel.device-mapper.devel/10232
If so, monitor such log volumes.

Signed-off-by: Malahal Naineni (malahal@us.ibm.com)

Index: LVM2/lib/activate/activate.c
================================================== =================
--- LVM2.orig/lib/activate/activate.c
+++ LVM2/lib/activate/activate.c
@@ -737,6 +737,7 @@ int monitor_dev_for_events(struct cmd_co
int r = 1;
struct dm_list *tmp, *snh, *snht;
struct lv_segment *seg;
+ struct lv_segment *log_seg;
int (*monitor_fn) (struct lv_segment *s, int e);
uint32_t s;

@@ -772,6 +773,16 @@ int monitor_dev_for_events(struct cmd_co
return r;
}

+ /*
+ * If the volume is mirrored and its log is also mirrored, monitor
+ * the log volume as well.
+ */
+ if ((seg = first_seg(lv)) != NULL && seg->log_lv != NULL &&
+ (log_seg = first_seg(seg->log_lv)) != NULL &&
+ seg_is_mirrored(log_seg))
+ if (!monitor_dev_for_events(cmd, seg->log_lv, monitor))
+ r = 0;
+
dm_list_iterate(tmp, &lv->segments) {
seg = dm_list_item(tmp, struct lv_segment);


--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 11:57 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org