【问题标题】:Glusterfs fuse client showing Stale File Handle error while copying filesGlusterfs fuse 客户端在复制文件时显示 Stale File Handle 错误
【发布时间】:2018-11-12 07:54:33
【问题描述】:

我已在 GCP 服务器上将我的 glusterfs 集群设置为条带复制,但在将文件复制到已挂载的卷以及执行 git 操作(git pull、git clone 等)时,我遇到了过时的文件句柄错误。

glusterfs 服务器和 glusterfs fuse 客户端都使用最新版本(Client-4.1.5,Server-4.1)。请在下面找到错误消息

提取文件时

tar:basecode/wp-content/uploads/cache/wpml:无法 mkdir:过时的文件句柄

所有权变更时

chown:无法读取目录“www.jithin.ca/wp-content/plugins/acfml/classes”:过时的文件句柄 chown:更改“www.jithin.ca/wp-content/plugins/advanced-custom-fields-pro”的所有权:过时的文件句柄 chown:无法读取目录“www.jithin.ca/wp-content/plugins/wp-speed-of-light/inc/pages”:过时的文件句柄

我的 glusterfs 客户端日志文件中也出现以下错误 (/var/log/glusterfs/mnt-glusterfs.log)

[2018-10-21 04:08:46.921985] W [fuse-bridge.c:1201:fuse_setattr_cbk] 0-glusterfs-fuse: 3705309: SETATTR() /Production/example.com/wp-content/cache /wpsol-cache/4bd4f0bf132901ecb17261f388864fd3 => -1(旧文件句柄)

另外,我的 glusterfs 服务器正在使用默认设置。如果有任何补丁或修复,请提供帮助。

【问题讨论】:

  • 如果您在此处附加您的 /etc/fstab(带有挂载选项)并显示 GlusterFS 配置会更好。
  • @slava 请在下面找到客户端中运行的 fstab 条目和 glusterfs 进程。关于配置,我在 GCP 服务器上使用 Striped-Replicated。 gluster1:/gluster-volume /mnt/glusterfs glusterfs defaults 0 0
  • 您可以尝试通过在所有节点上将attribute-timeoutentry-timeout 设置为零来禁用缓存,看看会发生什么。有关详细信息,请参阅systutorials.com/docs/linux/man/8-mount.glusterfs。要查看当前的挂载选项,您可以使用 grep /proc/mounts - 它会显示一些默认选项。
  • 将 WP 缓存放在 GlusterFS 上并不是一个好主意,因为集群中的每个节点都会同时写入缓存文件夹。这可能会导致一些问题。
  • @slava 当我们使用节点集群时,是否有任何选项可以禁用对每个节点的缓存写入。

标签: linux google-cloud-platform glusterfs


【解决方案1】:

第一:不要将 WP 缓存放在 GlusterFS 上。

集群中每个节点上的WP会同时写入缓存文件夹,可能会导致一些问题。尝试将 WP 指向 GlusterFS 外部的缓存目录(例如,/wp-cache)。我对 WP 不是很熟悉,无法为您提供合适的配置选项。或者只是在 basecode/wp-content/uploads/ 中创建一个指向新缓存目录的符号链接。

第二:有人说条带卷效果很差,没有答案。

尝试使用分布式复制卷,或者,也许,使用分散卷。

第三:您可以使用条带卷并且可以使用一些挂载/GlusterFS 选项,但我认为这是一种不好的方法。

第一个播放选项 - entry-timeoutattribute-timeout,在此处描述 http://systutorials.com/docs/linux/man/8-mount.glusterfs。如果将它们设置为0,则可以禁用属性缓存。这可以帮助您解决Stale file handle 错误,但性能会非常低(在某些情况下)。更多关于Attribute caching的信息在这里:https://linux.die.net/man/5/nfs

【讨论】:

    猜你喜欢
    • 2021-12-02
    • 2016-03-31
    • 2021-12-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-10-05
    • 2017-09-22
    相关资源
    最近更新 更多