summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2017-03-07 18:01:25 +0100
committerAtin Mukherjee <amukherj@redhat.com>2017-03-27 12:57:31 -0400
commit12921693b572f642156d3167d1c92d3449dfc8ec (patch)
tree15a6c2f9d900dc62e7604ecf749ea1024f9586a7 /xlators/mgmt
parent16cfe427397d5b8f7a66dfe0b86d9fa5b06de4c1 (diff)
glusterd: support filesystems with dynamic inode sizes
btrfs and zfs are two filesystems that do not have fixed sizes for inodes. Instead of logging an error, skip checking and mark the size as "N/A" like other properties that can not be reported. The error message that was reported by users on the mailinglist shows up like: [glusterd-utils.c:5458:glusterd_add_inode_size_to_dict] 0-management: could not find (null) to getinode size for /dev/vdb (btrfs): (null) package missing? Change-Id: Ib10b7a3669f2f4221075715d9fd44ce1ffc35324 Reported-by: Arman Khalatyan <arm2arm@gmail.com> URL: http://lists.gluster.org/pipermail/gluster-users/2017-March/030189.html BUG: 1433425 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: https://review.gluster.org/16867 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Prashanth Pai <ppai@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 2169a69add0..f8525611ed4 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -5904,6 +5904,7 @@ static struct fs_info {
{ "ext3", "tune2fs", "-l", "Inode size:", "e2fsprogs" },
{ "ext4", "tune2fs", "-l", "Inode size:", "e2fsprogs" },
{ "btrfs", NULL, NULL, NULL, NULL },
+ { "zfs", NULL, NULL, NULL, NULL },
{ NULL, NULL, NULL, NULL, NULL}
};
@@ -5947,6 +5948,16 @@ glusterd_add_inode_size_to_dict (dict_t *dict, int count)
for (fs = glusterd_fs ; fs->fs_type_name; fs++) {
if (strcmp (fs_name, fs->fs_type_name) == 0) {
+ if (!fs->fs_tool_name) {
+ /* dynamic inodes */
+ gf_msg (THIS->name, GF_LOG_INFO, 0,
+ GD_MSG_INODE_SIZE_GET_FAIL, "the "
+ "brick on %s (%s) uses dynamic inode "
+ "sizes", device, fs_name);
+ cur_word = "N/A";
+ goto cached;
+ }
+
snprintf (fs_tool_name, sizeof (fs_tool_name),
"/usr/sbin/%s", fs->fs_tool_name);
if (sys_access (fs_tool_name, R_OK|X_OK) == 0)