summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorDan Lambright <dlambrig@redhat.com>2016-03-01 15:03:54 -0500
committerDan Lambright <dlambrig@redhat.com>2016-03-16 23:12:04 -0700
commitadbce4e9b7dadc226d3de326d98007ed10913919 (patch)
treeb45232da1fc176e3ceef08c6cf0f015a2c237bbb /xlators/mgmt
parent8fda324df01b6de9c58a1395263ce9755465b26d (diff)
cluster/tier: add tunable to migrate files based on size
This fix adds a paramater "tier-max_promote_size" to control wether a file is migrated or not based on its size. By default the value is 0, meaning all files are migrated. If set to a non-zero value, files larger than the parameter won't be moved in tiered volumes. Change-Id: Ia6b88e9b2508935bef500d956f9192e59670fe00 BUG: 1313495 Signed-off-by: Dan Lambright <dlambrig@redhat.com> Reviewed-on: http://review.gluster.org/13570 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Joseph Fernandes
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-set.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
index 5d9aafeb661..d0e5efbd9a0 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c
@@ -452,6 +452,7 @@ validate_tier (glusterd_volinfo_t *volinfo, dict_t *dict, char *key,
}
} else if (strstr (key, "tier-promote-frequency") ||
strstr (key, "tier-max-mb") ||
+ strstr (key, "tier-max-promote-file-size") ||
strstr (key, "tier-max-files") ||
strstr (key, "tier-demote-frequency")) {
if (origin_val < 1) {
@@ -2496,6 +2497,16 @@ struct volopt_map_entry glusterd_volopt_map[] = {
" Cache mode does so based on whether the cache is full or not,"
" as specified with watermarks."
},
+ { .key = "cluster.tier-max-promote-file-size",
+ .voltype = "cluster/tier",
+ .option = "tier-max-promote-file-size",
+ .value = "0",
+ .op_version = GD_OP_VERSION_3_7_10,
+ .flags = OPT_FLAG_CLIENT_OPT,
+ .validate_fn = validate_tier,
+ .description = "The maximum file size in bytes that is promoted. If 0, there"
+ " is no maximum size (default)."
+ },
{ .key = "cluster.tier-max-mb",
.voltype = "cluster/tier",
.option = "tier-max-mb",