Bug 7619 - I can't see all files and directory with mount.cifs
Summary: I can't see all files and directory with mount.cifs
Status: RESOLVED FIXED
Alias: None
Product: CifsVFS
Classification: Unclassified
Component: kernel fs (show other bugs)
Version: 2.6
Hardware: x86 Linux
: P3 major
Target Milestone: ---
Assignee: Suresh Jayaraman (mail address is dead)
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-13 08:56 UTC by Guy Roussin
Modified: 2010-11-03 10:17 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guy Roussin 2010-08-13 08:56:18 UTC
Hi,

First, I reported the bug on http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=591944
They said to report here.

I discovered the bug when upgrading from debian lenny to debian squeeze.

When I mount.cifs a windows share from a server (samba 3.0),
I can see only 151 files and dir with ls -al | wc -l but there are
around 600 files and dirs on this share. If I reboot my host
with 2.6.26 (kernel from lenny) I can see all files and dirs ...

Note that I can 'cd' and 'cat' "invisible" files and dirs if I
know their names (but I can't see them with 'ls') ! The problem
does not occur with smbclient or nautilus with smb://server/share,
only with mount.cifs

I've tested various kernel versions (using snapshot.debian.org) :
linux-image-2.6.26-5 (2.6.26-24 from lenny) is OK
linux-image-2.6.30-2-686-bigmem: (2.6.30-8squeeze1 from old squeeze) is OK
linux-image-2.6.31-1-686-bigmem: (2.6.31-2 from old sid) is NOT OK
linux-image-2.6.32-x-686 (lot of versions debian, ubuntu 10.04) is NOT OK
linux-image-2.6.34-1-686 (2.6.34-1~experimental.2) is NOT OK

It seems to me that all kernels after 2.6.30 (2.6.3[1234], ....) are NOT OK

I can make more tests if necessary.

Regards,

Guy
Comment 1 Suresh Jayaraman (mail address is dead) 2010-10-01 01:29:46 UTC
I tried this with both Samba 3.5 and Windows XP server and I can see all the files on the server on a CIFS client running 2.6.34 kernel.

Are you seeing this with different Samba version > 3.0?
What kind of files you have on those servers? Is there a common pattern that you can relate to those missing files (for e.g. files with specific extension)?
What are your mount options?
Are the permissions of the missing files different from others?
Comment 2 Guy Roussin 2010-10-05 07:38:16 UTC
(In reply to comment #1)
> I tried this with both Samba 3.5 and Windows XP server and I can see all the
> files on the server on a CIFS client running 2.6.34 kernel.
> 
> Are you seeing this with different Samba version > 3.0?
server : samba 3.0.14a

> What kind of files you have on those servers? Is there a common pattern that
> you can relate to those missing files (for e.g. files with specific extension)?
no specific extension. I can't see anything special on missing files.

> What are your mount options?
For example :
sudo /sbin/mount.cifs //mtd-cpd/guy /homeL/guy/shares/mtd-cpd_guy/ -o uid=1002,gid=1000,credentials=/homeL/guy/.smbcred,iocharset=iso8859-15
In /etc/mtab :
//mtd-cpd/guy/ /homeL/guy/shares/mtd-cpd_guy cifs rw,mand 0 0

I test with a lot of different option (on debian, ubuntu, ...) 

> Are the permissions of the missing files different from others?
No, there is no difference 

There is a lot of shares on this server and it seems to me that 
the problem only affect homedir user [homes] in smb.conf.
No problems on the other shares on the serveur ...



Comment 3 Suresh Jayaraman (mail address is dead) 2010-10-25 23:26:41 UTC
Does the mount option "noserverino" help?
Is the server running Linux or a Filer running different OS?
Comment 4 Guy Roussin 2010-11-03 03:06:28 UTC
(In reply to comment #3)
> Does the mount option "noserverino" help?
Yes, with this option i see all the files :-)

> Is the server running Linux or a Filer running different OS?
This is a debian linux server with samba 3.0.14a
Comment 5 Suresh Jayaraman (mail address is dead) 2010-11-03 03:44:37 UTC
Some CIFS servers does not guarantee unique inode numbers if multiple server side mounts are exported under a single share (since inode numbers on the servers might not be unique). But AFAICT, Samba server with Unix extensions (I'm assuming you are not using "nounix" option) enabled would provide unique inode numbers (not sure about older versions).

It appears to me mostly like a Server side bug. I strongly suggest you to upgrade your Samba server and try.

Alternatively, you could try using the "noserverino" option. The only drawback is that the client may not be able to detect hardlinks properly all the time. 
Also, see man page of mount.cifs especially sections describing serverino, noserverino mount options and INODE NUMBERS.
Comment 6 Guy Roussin 2010-11-03 09:45:20 UTC
> It appears to me mostly like a Server side bug. I strongly suggest you to
> upgrade your Samba server and try.
Thank you Suresh, we planned to update our server.
I suppose you can close the bug.
Guy
Comment 7 Suresh Jayaraman (mail address is dead) 2010-11-03 10:17:18 UTC
Marking it FIXED and it is not reproducible with the recent Samba and cifs code and "noserverino" option helps with Old servers where the Server cannot guarantee unique inode numbers. Thanks!