From 065b91b4993f1ab0abc8b1db4d5745a6b58545b0 Mon Sep 17 00:00:00 2001 From: Vijaikumar M Date: Tue, 6 May 2014 14:32:28 +0530 Subject: glusterd/snapshot: Add brick-count suffix for the LVM snapshot When there are more than one brick created from the same LVM volume group, there will be a conflict with the LVM snapshot name we use. Solution is to add a brick-count suffix to the LVM snapshot name Change-Id: I7258e69fe0b50e86b81c66ab1db523ab3c7cbae0 BUG: 1091934 Signed-off-by: Vijaikumar M Reviewed-on: http://review.gluster.org/7581 Tested-by: Gluster Build System Reviewed-by: Rajesh Joseph Reviewed-by: Krishnan Parthasarathi Tested-by: Krishnan Parthasarathi --- xlators/mgmt/glusterd/src/glusterd-utils.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.h') diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.h b/xlators/mgmt/glusterd/src/glusterd-utils.h index 05d5ce6eb50..14f6ce4d08a 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.h +++ b/xlators/mgmt/glusterd/src/glusterd-utils.h @@ -693,7 +693,8 @@ int32_t glusterd_compare_volume_name(struct list_head *, struct list_head *); char* -glusterd_get_brick_mount_details (char *brick_path); +glusterd_get_brick_mount_device (char *brick_path); + struct mntent * glusterd_get_mnt_entry_info (char *mnt_pt, FILE *mtab); @@ -789,13 +790,9 @@ glusterd_get_brick_mount_dir (char *brickpath, char *hostname, char *mount_dir); int32_t glusterd_aggr_brick_mount_dirs (dict_t *aggr, dict_t *rsp_dict); -char * -glusterd_take_lvm_snapshot (glusterd_volinfo_t *snap_vol, - char *brick_path); - int32_t -glusterd_snap_brick_create (char *device, glusterd_volinfo_t *snap_volinfo, - int32_t brick_count, char *snap_brick_dir); +glusterd_take_lvm_snapshot (glusterd_brickinfo_t *brickinfo, + char *origin_brick_path); int32_t glusterd_snap_quorum_check (dict_t *dict, gf_boolean_t snap_volume, @@ -816,4 +813,8 @@ glusterd_volume_quorum_calculate (glusterd_volinfo_t *volinfo, dict_t *dict, int glusterd_merge_brick_status (dict_t *dst, dict_t *src); +int32_t +glusterd_snap_brick_create (glusterd_volinfo_t *snap_volinfo, + glusterd_brickinfo_t *brickinfo, + int32_t brick_count); #endif -- cgit