diff options
author | Avra Sengupta <asengupt@redhat.com> | 2014-04-22 10:27:23 +0000 |
---|---|---|
committer | Krishnan Parthasarathi <kparthas@redhat.com> | 2014-05-06 00:25:11 -0700 |
commit | 86fccad56d2ffd6c65e1571ff87dbf625b8ce55e (patch) | |
tree | f78322f5b0bad5457e34935b336090fe3eb5d60b /xlators/mgmt/glusterd/src/glusterd-utils.h | |
parent | f846e54b8844decbc8bd73840e7d35b2dcaed2e0 (diff) |
glusterd/snashot: Perform missed snap creates
When a brick is started, and the glusterfsd process requests
for volfile, the brick_name is sent in the req dict. In
glusterd, after fetching the spec the brick_name is looked
up in the missed_snap_list, and any missing snap creates on
the same brick are performed. After this, the glusterd
responds back with the specfile.
Also collate brick data from the node's hosting the bricks
during restore. In case the data is absent, the local node's
data is used. This is needed to ensure that, during a restore
we collect the information created when a missed snap create
is performed.
Change-Id: I47cefdeba96f2702be810965734cf0fac61d3d2d
BUG: 1061685
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/7551
Reviewed-by: Santosh Pradhan <spradhan@redhat.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.h')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.h | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.h b/xlators/mgmt/glusterd/src/glusterd-utils.h index 2cf328f91ab..d36444e9d9a 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.h +++ b/xlators/mgmt/glusterd/src/glusterd-utils.h @@ -693,8 +693,7 @@ int32_t glusterd_compare_volume_name(struct list_head *, struct list_head *); char* -glusterd_get_brick_mount_details (glusterd_brickinfo_t *brickinfo); - +glusterd_get_brick_mount_details (char *brick_path); struct mntent * glusterd_get_mnt_entry_info (char *mnt_pt, FILE *mtab); @@ -709,9 +708,11 @@ int glusterd_compare_snap_vol_time(struct list_head *, struct list_head *); int32_t -glusterd_snap_volinfo_restore (dict_t *rsp_dict, +glusterd_snap_volinfo_restore (dict_t *dict, dict_t *rsp_dict, glusterd_volinfo_t *new_volinfo, - glusterd_volinfo_t *snap_volinfo); + glusterd_volinfo_t *snap_volinfo, + int32_t volcount); + int32_t glusterd_lvm_snapshot_remove (dict_t *rsp_dict, glusterd_volinfo_t *snap_vol); @@ -733,10 +734,11 @@ glusterd_add_missed_snaps_to_export_dict (dict_t *peer_data); int32_t glusterd_import_friend_missed_snap_list (dict_t *peer_data); -int32_t -gd_restore_snap_volume (dict_t *rsp_dict, +int +gd_restore_snap_volume (dict_t *dict, dict_t *rsp_dict, glusterd_volinfo_t *orig_vol, - glusterd_volinfo_t *snap_vol); + glusterd_volinfo_t *snap_vol, + int32_t volcount); int32_t glusterd_mount_lvm_snapshot (char *device_path, char *brick_mount_path); @@ -787,4 +789,11 @@ 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); #endif |