为什么我的 CIFS 共享多次显示相同的文件?

为什么我的 CIFS 共享多次显示相同的文件?

我在 ServerFault 上问过这个但没有收到任何回复,所以我想我应该在这里尝试一下!

我有一个运行 FreeBSD 内核的 D​​ebian 备份服务器和一个 ZFS 文件系统,我使用 ZFS 的快照和压缩技术在其上存储备份。 Debian 服务器rsync通过 cron 作业从多个其他服务器中提取文件。这个过程效果很好。

然后,我使用 CIFS 将备份共享回原始服务器,这样我就可以轻松浏览它们并从每台服务器恢复文件。但是,当我ls在服务器上查看备份共享(通过 CIFS 安装)上某些目录的内容时,我看到多次列出相同的文件。事实上很多很多次:

[root@webserver01 public_html]# ls -li /backup/scripts/|less
total 663621
57872359 drwxr-xr-x  4 root root      0 Apr  3 21:40 ./
       2 drwxr-xr-x 20 root root      0 Mar 24 18:20 ../
57872880 -rw-r--r--  1 root root   6494 Dec 16  2008 AcctLock.pm
57873180 lrwxrwxrwx  1 root root      7 Mar 15 15:21 adddns -> add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*
57872571 -rwxr-xr-x  1 root root   2010 Nov  8 20:55 add_dns*

但在 debian 备份服务器上,看起来不错:

root@timestandstill:/# ls -l /backups/myvenue/scripts/|less
total 1893
-rw-r--r-- 1 root root   6494 Dec 16  2008 AcctLock.pm
lrwxrwxrwx 1 root root      7 Mar 15 15:21 adddns -> add_dns
-rwxr-xr-x 1 root root   2010 Nov  8 20:55 add_dns
-rwxr-xr-x 1 root root   5797 Nov  8 20:55 addfpmail
-rwxr-xr-x 1 root root   1949 Nov  8 20:55 addpop
-rwxr-xr-x 1 root root    490 Oct 10  2007 addservlets
-rwxr-xr-x 1 root root     53 Mar 10  2008 adduser
-rwxr-xr-x 1 root root    305 Mar 23  2006 admin
-rwxr-xr-x 1 root root   3926 Nov  8 20:55 after_perl_upgrade
-rw-r--r-- 1 root root    654 Mar 23  2006 anonuser.patch
-rwxr-xr-x 1 root root   2961 Nov  8 20:55 apachelimits
-rwxr-xr-x 1 root root   1014 Sep 23  2010 apacheloadcheck
-rw-r--r-- 1 root root     99 Mar 23  2006 aquota.user_emptyfs.gz
-rw-r--r-- 1 root root   3023 Nov  8 20:55 archive_sync_zones
-rwxr-xr-x 1 root root   1109 Nov  8 20:55 autorepair
-rwxr-xr-x 1 root root   5167 Nov  8 20:55 bandminup
-rwxr-xr-x 1 root root   1540 Nov  8 20:55 biglogcheck
-rwxr-xr-x 1 root root    252 Mar 23  2006 bitstest
-rwxr-xr-x 1 root root   2224 Nov  8 20:55 bsdbindfix
-rwxr-xr-x 1 root root   2479 Nov  8 20:55 bsdcryptoinstall
-rwxr-xr-x 1 root root   3003 Nov  8 20:55 bsdi386compatinstall
-rwxr-xr-x 1 root root    430 Nov  8 20:55 bsdldconfig
-rwxr-xr-x 1 root root   2363 Nov  8 20:55 bsdpkgpingtest
-rwxr-xr-x 1 root root    452 Dec 16  2008 buildbsdexpect
-rwxr-xr-x 1 root root   2766 Nov  8 20:55 builddovecotconf
-rwxr-xr-x 1 root root   5298 Nov  8 20:55 buildeximconf

可能是什么原因造成的?我该如何解决?我不受 CIFS 的束缚,所以如果有更好的技术,我愿意接受。我之前使用的是NFS,备份服务器是Open Solaris,但是Debian在使用FreeBSD内核时似乎不支持NFS...

答案1

你正在经历桑巴错误 4715,报告为Debian 错误 #612503。目前建议的修复方法是directory name cache size = 0在 中的全局部分下添加smb.conf

相关内容