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.

The situation: Server with Gentoo Linux and Samba on it. There's around 15 Windows PCs, one MacBook Pro and one Samsung's laptop with Ubuntu. There's no domain, just a workgroup and the server is used only for Samba shares. On Ubuntu I use gvfs to mount samba shares.

And the problem: One day around half of directories went missing, but only when viewing on this Ubuntu laptop. If I ssh to the server I can see the missing files/dirs and I can also see the missing things from win or mac computers.

The tempfix: When I rename some of the missing directories, even if it's one symbol, missing directories reappear … even without reloading/refreshing the gvfs-mounted share. If I rename instantly back to the previous directories/file names, all previously missing dirs/files instantly go missing again.

So, as this problem reappeared again around month later, I could use some advice where to start checking.

share|improve this question

1 Answer 1

I might have experienced similar problem, but just with single file missing. I suspect, that linux samba mount helper is problematic.

Could you run following tests on your client?

cd [dir-with-missing-subdirs]

ls -al | grep [missing name]     -> nothing found (readdir is broken)
ls -al [missing name]            -> lists the element (stat working) -- use -d when [missing name] is a directory

To find out if kernel is hiding those files from you:

umount smb-share
start "tcpdump -p -i [your nic] -s0 -w net.dump host [your samba host]"
mount the share
run the "ls -al | grep [missing name]" test
stop tcpdump
Verify that the filename is in tcpdump, but not shown in dirlisting. Therefore:
strings --encoding=b net.dump | grep [missing name]
strings --encoding=l net.dump | grep [missing name]

If name is included at least once, that would indicate, that the samba server is sending the whole listing, but linux discards some entries.

share|improve this answer
    
I will try this out when this problem reappears or if I can reproduce the symptoms as described in the link you provided. –  elv Jul 23 '12 at 22:17

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.