[oclug] Partial directory listing on SMB mounted share

Hugh Campbell hdc at fs.ca
Tue Jun 1 11:03:27 EDT 2004


On Tue, 1 Jun 2004 14:58:54 +0100, Matthew Wilcox wrote:

>On Tue, Jun 01, 2004 at 09:44:42AM +0000, Hugh Campbell wrote:
>> I am not able to read the full directory contents of an SMB mounted
>> share from my Linux computer.
>
>I'd suggest trying one of the samba lists for help, but let me help you
>make this report more useful to them..

>
>> We have a very large directory in my office which is located on an SMB
>> server - ie not Samba running on Linux, but just a normal, native SMB
>> server.  It is fully accessible from other SMB clients - this problem
>> only occurs on my Linux client.
>
>What SMB server?  I presume Windows of some description.  Which version
>of Windows?  What service packs are applied?
>
>> I want to back the directory up to my Linux PC by mounting it locally
>> as an smb mounted share - for example:
>> 
>> mount //serverpc/bigdirectory -t smbfs /mnt/serverpc
>
>What kernel are you running?  Could you try the cifs filesystem instead
>of the dmbfs one?
>
>> The problem is that when I do a directory listing (or anything else) of
>> the mounted share, the listing only goes about as far as directories
>> starting with the letter N before it terminates normally.  In other
>> words, it will list all files a through z in the root directory, and
>> then list the directories until it gets to somewhere in the N's.
>
>Good description.
>
>> The same effect occurs when using the cp command to do backups - no
>> errors, but the cp process will terminate 'normally' abnormally early.
>
>That's to be expected -- if ls doesn't see it, cp won't either.
>
>> If I request a listing of a specific "invisible" directory, Linux will
>> get it, but if I try to do a wildcard search, Linux returns an
>> input/output error.  For example, I have a directory on the SMB server
>> named OCLUG which doesn't show up just doing an 'ls /mnt/serverpc'.
>> 
>> However, if I type "ls /mnt/serverpc/OCLUG", I will get the listing of
>> the OCLUG subdirectory.
>> 
>> On the other hand, if I type the following wildcard request:
>> 
>> 	"ls /mnt/serverpc/O*", I get the following:
>> 
>> 	ls: /mnt/serverpc/O*: Input/output error
>
>That's interesting.  it may be related or it may be a separate problem.
>
>> The mounted share is quite large (about 8 Gigs in about 170, 000
>> files), and it seems clear that I am just running into an smbmount
>> configuration issue - it is just running out of room to process my 'ls'
>> request in full because of the size of the drive in question.  I need
>> to increase something somewhere, but what is it?
>
>Actually, that's not clear at all.  It looks to me like there's something
>wrong with the kernel's handling of large directories when using the
>smbfs filesystem.  The total number of files in the share isn't terribly
>interesting, but the number of files in the directory and the average
>length of the name are interesting.
>
>> As an aside, note that the 170k files are not all in one big root
>> directory, but are probably in several thousand subdir's, sub-subdir's,
>> etc.  However, Linux does seem to "look ahead" a lot when doing
>> directory-related commands, which is an intense irritation when using
>> Open Office, for example.
>
>Can you describe what you mean by "look ahead"?
>
>> I'm running Mandrake 9.0 at the moment.  Sorry to be so wordy.
>
>That might be a useful clue, but it requires that people know what
>packages are in Mandrake 9.0.
>
>Hope this helps you get a useful answer.
>
>-- 
>"Next the statesmen will invent cheap lies, putting the blame upon 
>the nation that is attacked, and every man will be glad of those
>conscience-soothing falsities, and will diligently study them, and refuse
>to examine any refutations of them; and thus he will by and by convince 
>himself that the war is just, and will thank God for the better sleep 
>he enjoys after this process of grotesque self-deception." -- Mark Twain
>-- 
>OCLUG general discussion list
>OCLUG at lists.oclug.on.ca
>http://www.oclug.on.ca/mailman/listinfo/oclug





More information about the OCLUG mailing list