LVM patch to mirror a mirror log
PATCH 1/1 LVM patch to mirror a mirror log
This patch adds '--mirroredlog' option to lvcreate to create a mirror with mirrored log device.
Signed-off-by Jens Wilke ([email protected])
Malahal Naineni ([email protected])
Thanks, Malahal.
tools/args.h +1 -0
@@ -52,6 +52,7 @@ arg(config_ARG, '\0', "config", string_a arg(config_ARG, '\0', "config", string_arg) arg(trustcache_ARG, '\0', "trustcache", NULL) arg(ignoremonitoring_ARG, '\0', "ignoremonitoring", NULL) +arg (mirroredlog_ARG,'\0' ,"mirroredlog" ,NULL ) /* Allow some variations */arg (resizable_ARG,'\0' ,"resizable" , yes_no_arg)
tools/commands.h +2 -2
@@ -123,7 +123,7 @@ xx(lvcreate,"\t{-l|--extents LogicalExtentsNumber |\n" "\t -L|--size LogicalVolumeSize[kKmMgGtTpPeE]}\n" "\t[-M|--persistent {y|n}] [--major major] [--minor minor]\n" -"\t[-m|--mirrors Mirrors [--nosync] [--corelog]]\n" +"\t[-m|--mirrors Mirrors [--nosync] [--corelog] [--mirroredlog]]\n" "\t[-n|--name LogicalVolumeName]\n" "\t[-p|--permission {r|rw}]\n" "\t[-r|--readahead ReadAheadSectors]\n"
@@ -159,7 +159,7 @@ xx(lvcreate, corelog_ARG, extents_ARG, major_ARG, minor_ARG, mirrors_ARG, name_ARG, nosync_ARG, permission_ARG, persistent_ARG, readahead_ARG, regionsize_ARG, size_ARG, snapshot_ARG, stripes_ARG, stripesize_ARG, test_ARG, type_ARG, - zero_ARG) + zero_ARG, mirroredlog_ARG) xx(lvdisplay, "Display information about a logical volume",
tools/lvconvert.c +47 -14
77 lines not on this page · raw message
tools/lvcreate.c +61 -20
115 lines not on this page · raw message
tools/toollib.c +77 -21
132 lines not on this page · raw message
tools/toollib.h +18 -0
@@ -95,6 +95,15 @@ int generate_log_name_format(struct voluint generate_log_name_format (struct volume_group *vg,const char *lv_name,char *buffer,size_t size); +struct logical_volume *create_mirror_log_create_lv ( +struct volume_group *vg, +alloc_policy_t alloc, +const char *lv_name); + +int activate_new_mirror_log (struct cmd_context *cmd, +struct logical_volume *log_lv,int in_sync, +struct list *tags); + struct logical_volume *create_mirror_log(struct cmd_context *cmd, struct volume_group *vg, struct alloc_handle *ah,
@@ -103,6 +112,15 @@ struct logical_volume *create_mirror_logint in_sync, struct list *tags); +struct logical_volume *create_mirror_log_mirrored (struct cmd_context *cmd, +struct volume_group *vg, +struct alloc_handle *ah, +alloc_policy_t alloc, +const char *lv_name, +int in_sync, +struct list *tags, +int mirrors); +int set_lv (struct cmd_context *cmd,struct logical_volume *lv,uint64_t sectors,int value);