From 12921693b572f642156d3167d1c92d3449dfc8ec Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Tue, 7 Mar 2017 18:01:25 +0100 Subject: 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 URL: http://lists.gluster.org/pipermail/gluster-users/2017-March/030189.html BUG: 1433425 Signed-off-by: Niels de Vos Reviewed-on: https://review.gluster.org/16867 Smoke: Gluster Build System Reviewed-by: Atin Mukherjee Reviewed-by: Prashanth Pai NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System --- xlators/mgmt/glusterd/src/glusterd-utils.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c') 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) -- cgit