diff options
author | Raghavendra Bhat <raghavendra@redhat.com> | 2013-10-16 18:18:04 +0530 |
---|---|---|
committer | shishir gowda <sgowda@redhat.com> | 2013-11-15 12:38:59 +0530 |
commit | cc4fa72926f9ac517365d91ae6144530dc67c001 (patch) | |
tree | 9da64c3ceeda354726be21c6df118f2ce6616b5c /xlators/mgmt/glusterd/src/glusterd.h | |
parent | d15ad38e8623f510fb1e121a8ff0d845a99238e4 (diff) |
mgmt/glusterd: snapshot create command
This is still a work in progress.
As of now, these things are done:
* Take the snapshot of the backend brick
* Create the new volume for the snapshot
* Create the brick and the client volfiles
* Store the snapshot related info in /var/lib/glusterd
* Create the snap object representing the snapshot
TODO:
Start the brick processes for the snapshot
Change-Id: I26fbb0f8e5cf004d4c1dbca51819bab1cd1bac15
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.h')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h index d51f8d2ce..48da712f8 100644 --- a/xlators/mgmt/glusterd/src/glusterd.h +++ b/xlators/mgmt/glusterd/src/glusterd.h @@ -157,6 +157,7 @@ typedef struct { rpcsvc_t *uds_rpc; /* RPCSVC for the unix domain socket */ uint32_t base_port; struct list_head snap_cg; + char *snap_bricks_directory; } glusterd_conf_t; @@ -406,6 +407,8 @@ enum glusterd_vol_comp_status_ { #define GLUSTERD_VOL_SNAP_FILE "snap_list.info" #define GLUSTERD_VOL_SNAP_DIR_PREFIX "snaps" +#define GLUSTERD_DEFAULT_SNAPS_BRICK_DIR "/var/run/gluster/snaps" + /* definitions related to replace brick */ #define RB_CLIENT_MOUNTPOINT "rb_mount" #define RB_CLIENTVOL_FILENAME "rb_client.vol" @@ -453,7 +456,7 @@ typedef ssize_t (*gd_serialize_t) (struct iovec outmsg, void *args); GLUSTERD_GET_VOLUME_DIR (volpath, volinfo, priv); \ GLUSTERD_REMOVE_SLASH_FROM_PATH (brickinfo->path, exp_path); \ snprintf (pidfile, PATH_MAX, "%s/run/%s-%s.pid", \ - volpath, brickinfo->hostname, exp_path); \ + volpath, brickinfo->hostname, exp_path); \ } while (0) #define GLUSTERD_GET_NFS_PIDFILE(pidfile,nfspath) { \ @@ -486,7 +489,6 @@ typedef ssize_t (*gd_serialize_t) (struct iovec outmsg, void *args); uuid_utoa(MY_UUID)); \ } while (0) - int glusterd_uuid_init(); int glusterd_uuid_generate_save (); @@ -874,4 +876,11 @@ glusterd_find_snap_cg_by_id (glusterd_conf_t *conf, uuid_t cg_id); glusterd_snap_cg_t* glusterd_find_snap_cg_by_name (glusterd_conf_t *conf, char *cg_name); +int +glusterd_snapshot_prevalidate (dict_t *dict, char **op_errstr, + dict_t *rsp_dict); +int +glusterd_snapshot (dict_t *dict, char **op_errstr, dict_t *rsp_dict); +char * +glusterd_build_snap_device_path (char *device, char *snapname); #endif |