1

我有一个服务器,其中包含我通过 NFS 导出到他们正在备份的服务器的 ZFS 快照,因此您可以通过内部编写的自定义应用程序进行恢复。问题如下:

注意:我没有使用 ZFS 内置 NFS 是有原因的,所以请不要告诉我使用它!

这都是 NFS v4
主机运行 CentOS 6.2 客户端运行 CentOS 5.7

我在主机上默认启动了 8 个 nfs 服务器。

在保存 NFS 共享的备份服务器上,我可以根据需要遍历目录结构并查看所有预期的文件。

在客户端,我可以遍历文件系统,但有时,当我深入 2 个或更多目录时,我最终会看到来自另一台服务器的文件。

这是一个例子:

[NFSSERVER /nfs/share]#  ls -l
total 60
drwx--x--x 30 root root 4096 Feb 25 00:15 20120225
drwx--x--x 30 root root 4096 Feb 26 00:05 20120226
drwx--x--x 30 root root 4096 Feb 27 00:06 20120227
.....

很快

[NFSCLIENT /app/backups]# ls -l
total 60
drwx--x--x 30 nobody nobody 4096 Mar  2 00:25 20120225/
drwx--x--x 30 nobody nobody 4096 Mar  2 00:25 20120226/
drwx--x--x 30 nobody nobody 4096 Mar  2 00:25 20120227/
......

很快

你可以看到它们是相同的,因为它们应该是相同的。

这就是问题开始的地方。如果我进入:

[NFSCLIENT /app/backups/20120225/home] #  ls -l

当我在客户端上运行这个 ls -l 时,有时我会看到正确的文件,有时我会看到另一台服务器的主目录。

如果我必须[NFSSERVER /nfs/share/20120225/home]# ls -l

当我运行这个 ls -l 时,我看到了正确的文件。如果我删除 /nfs/share/ 中的文件夹,我可以立即在客户端上看到结果。只有当我更深入时,我才会看到这些“交叉安装”的文件系统。

这是我的 /etc/exports 的一部分(主机名已更改)

/nfs *.domain.com(fsid=0,ro,nohide,no_root_squash)
/nfs/server1/20120308 *.domain.com(ro,nohide,no_root_squash)
/nfs/server1/20120309 *.domain.com(ro,nohide,no_root_squash)
/nfs/server1/20120310 *.domain.com(ro,nohide,no_root_squash)
/nfs/server1/20120311 *.domain.com(ro,nohide,no_root_squash)
/nfs/server2/20120308 *.domain.com(ro,nohide,no_root_squash)
/nfs/server2/20120309 *.domain.com(ro,nohide,no_root_squash)
/nfs/server2/20120310 *.domain.com(ro,nohide,no_root_squash)
/nfs/server2/20120311 *.domain.com(ro,nohide,no_root_squash)
/nfs/server3/20120204 *.domain.com(ro,nohide,no_root_squash)
/nfs/server3/20120205 *.domain.com(ro,nohide,no_root_squash)
/nfs/server3/20120206 *.domain.com(ro,nohide,no_root_squash)
/nfs/server3/20120207 *.domaincom(ro,nohide,no_root_squash)

如果我从 etc 导出中删除所有行,除了交叉挂载的行,然后重新加载导出文件(即,只在 /etc/exports 中留下一个条目),它会显示客户端计算机上的所有正确目录。

那么,陈旧的 NFS 句柄?默认运行更多 NFS 服务器?还有什么?有任何想法吗?我已经在这个问题上敲了几个星期的头。

4

0 回答 0