Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I asked this on ServerFault but received no response, so I figured I'd give it a try over here instead!

I have a Debian backup server running the FreeBSD kernel and a ZFS filesystem on which I store backups, using ZFS's snapshot and compression technologies. The Debian server uses rsync to pull files from multiple other servers via a cron job. This process works great.

I then use CIFS to share the backups back to the original servers, so I can easily browse them and restore files from each server. However, when I use ls on the servers to look at the contents of certain directories on the backup share (mounted via CIFS) I see the same exact files listed multiple times. Many, many times in fact:

[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*

But on the debian backup server, it looks fine:

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

What could be causing this and how can I resolve it? I'm not tied to CIFS, so if there's a better technology I am open to it. I was using NFS before when the backup server was Open Solaris, but it seems Debian doesn't support NFS when using the FreeBSD kernel...

share|improve this question
    
I'm not quite sure how to do it, or even if it would work in your case, but as I understand it, ZFS implements its own NFS server at a more rudimentary level, and it wouldn't necessarily be Debian running the NFS server at that point. If you're interested, I could try to track down some links for how the ZFS NFS server works/is configured. –  killermist Jun 25 '12 at 4:43
add comment

1 Answer

up vote 2 down vote accepted

You're experiencing Samba bug 4715, reported as Debian bug #612503. Currently the recommended fix is to add directory name cache size = 0 under the global section in smb.conf.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.