diff options
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index f02b6197428..66eb9408a6b 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -13408,8 +13408,17 @@ glusterd_handle_snapd_option (glusterd_volinfo_t *volinfo) return 0; if (glusterd_is_snapd_enabled (volinfo)) { - if (!glusterd_is_volume_started (volinfo)) + if (!glusterd_is_volume_started (volinfo)) { + if (glusterd_is_snapd_running (volinfo)) { + ret = glusterd_snapd_stop (volinfo); + if (ret) + gf_log (this->name, GF_LOG_ERROR, + "Couldn't stop snapd for " + "volume: %s", + volinfo->volname); + } goto out; + } ret = glusterd_create_snapd_volfile (volinfo); if (ret) { |