linux - Glusterfs 融合客户端在复制文件时显示陈旧文件句柄错误

标签 linux google-cloud-platform glusterfs

我已经在 GCP 服务器上将我的 glusterfs 集群设置为 Striped-Replicated,但是我在将文件复制到已安装的卷以及执行 git 操作(git pull、git clone 等)时遇到了陈旧的文件句柄错误。

glusterfs server 和 glusterfs fuse client 都使用最新版本(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 服务器使用默认设置。如果有任何补丁或修复,请帮助。

最佳答案

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

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

其次:有些人说 strip 化卷的效果很差,但没有答案。

尝试改用分布式复制卷,或者可能使用分散卷。

第三:您可以使用 strip 化卷并可以使用一些挂载/GlusterFS 选项,但我认为这是一个糟糕的方法。

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

关于linux - Glusterfs 融合客户端在复制文件时显示陈旧文件句柄错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53257870/

相关文章:

python - 我需要一种直接的方法来在图片上传到 Google Cloud Storage 时自动调整图片大小

go - 如何使用 Go Google SDK 模拟用户?

kubernetes - 使用用户名和密码访问Kubernetes API

database - 警告 : could not open statistics file "pg_stat_tmp/global.stat": Stale file handle

linux - 无法从远程客户端连接 Mariadb

linux - 为什么 nano 和 rnano 不同?

python - ipython,从 bash 到变量

linux - 如何在不重新安装/删除文件的情况下修复/恢复 Linux 权限?

google-app-engine - Google Cloud 重定向到不同的服务名称

linux - 无法通过 samba 从 Windows 访问 GlusterFS 安装卷