samba/smbfs problem

Urban Widmark urban at svenskatest.se
Sun Nov 12 12:32:38 GMT 2000


On Fri, 10 Nov 2000, Robert P. Goldman wrote:

> 
> I've been trying to work with a number of directories samba mounted
> onto a linux box (2.2.18-pre15 kernel on top of a RH 6.1 install), and 
> am having a lot of trouble, particularly when using (x)emacs, on files 
> in samba-mounted directory.
> 
> The problem is that I frequently get errors that claim that there are
> too many files open.  

Known problem with smbfs vs a "NetApp". It has nothing to do with open
files.
(Assuming you are using a NetApp ... that would sort of indicate that the
 dir listing problems you were having are gone. correct?)

Try 2.2.18-pre21, it includes the NT4/OS2/NetApp dir listing fixes you and
others have tested. It also includes a fix for truncate (smb_proc_trunc)
to use a documented way of truncating files.

You may also need to force smbfs to win95 mode (if it doesn't work, try
adding the change below).

Here is one way of reproducing the truncate problem:
touch foo     # too many files open in system
cp foo bar    # works, no complaints
cp foo bar    # cannot create .. too many files open in system
cp -f foo bar # works, no complaints


> 1.  Something about either emacs or about the way I'm mounting
> directories is causing me to actually have way too many files open.  I 
> don't believe that this is correct, since I see the following in 
> /proc/sys/fs/file-nr:
> 1408	83	4096
> 
> I don't actually know what is the format of this "file," but my guess
> is that I have 1408 files open and have a maximum of 4096.  I'm pretty 

Read Documentation/sysctl/fs.txt in the kernel source
(Also available as "/usr/doc/kernel-doc-*/sysctl/fs.txt" in many cases)

/Urban


--- linux-2.2.18-pre21-orig/fs/smbfs/inode.c	Sun Nov 12 13:02:18 2000
+++ linux-2.2.18-pre21-smbfs/fs/smbfs/inode.c	Sun Nov 12 13:20:20 2000
@@ -401,6 +401,9 @@
 	mnt->dir_mode  |= S_IFDIR;
 	sb->u.smbfs_sb.mnt = mnt;
 
+	/* Force win95 mode for NetApp */
+	mnt->flags |= SMB_MOUNT_WIN95;
+
 	smb_setcodepage(&sb->u.smbfs_sb, &mnt->codepage);
 	if (!sb->u.smbfs_sb.convert)
 		PARANOIA("convert funcptr was NULL!\n");





More information about the samba mailing list