[linux-cifs-client] cifs data transfer issues -- Linux to Linux

Sam Snow sam.snow at christianheritageschool.org
Thu Sep 16 03:19:23 GMT 2004


I upgraded a debian Woody machine to Sarge the other day and suddenly was
unable to do larger data transfers on a smbfs mounted drive on another
sarge machine running samba. The error I was getting was

Sep 15 18:54:40 aslan kernel: smb_get_length: Invalid NBT packet, code=4f
Sep 15 18:54:44 aslan kernel: smb_get_length: Invalid NBT packet, code=c7
Sep 15 18:54:44 aslan kernel: smb_get_length: Invalid NBT packet, code=60
Sep 15 18:54:44 aslan kernel: smb_get_length: Invalid NBT packet, code=91
Sep 15 18:54:44 aslan kernel: smb_get_length: Invalid NBT packet, code=a1
Sep 15 18:54:44 aslan kernel: smb_get_length: Invalid NBT packet, code=8b
Sep 15 18:54:44 aslan kernel: smb_get_length: Invalid NBT packet, code=59
Sep 15 18:54:44 aslan kernel: smb_get_length: Invalid NBT packet, code=1
Sep 15 18:54:44 aslan kernel: smb_get_length: Invalid NBT packet, code=26
Sep 15 18:54:44 aslan kernel: smb_writepage_sync: failed write,
wsize=4096, write_ret=-9

That is old news. I have since upgraded to a 2.6.8 kernel and made a run
at getting things using CIFS.


At first I was getting the following error:

aslan:/# mount -t cifs //wardrobe/backup /backup -o user=user,pass=pass
mount: wrong fs type, bad option, bad superblock on //wardrobe/backup,
       or too many mounted file systems

In the syslog I would only get one error line:
Sep 15 20:27:29 aslan kernel:  CIFS VFS: cifs_mount failed w/return code =
-22

I set the error log higher (echo 1 > /proc/fs/cifs/cifsFYI and echo 1 >
/proc/fs/cifs/traceSMB ) and did not get much more info:
Sep 15 20:29:50 aslan kernel:  fs/cifs/cifsfs.c: Devname:
//wardrobe/backup flags: 0
Sep 15 20:29:50 aslan kernel:  fs/cifs/connect.c: CIFS VFS: in cifs_mount
as Xid: 61701 with uid: 0
Sep 15 20:29:50 aslan kernel:  fs/cifs/connect.c: Username: user
Sep 15 20:29:50 aslan kernel:  fs/cifs/connect.c: CIFS VFS: leaving
cifs_mount (xid = 61701) rc = -97
Sep 15 20:29:50 aslan kernel:  CIFS VFS: cifs_mount failed w/return code =
-22


On a whim I decided to try calling out the server via IP address. Ping
servername works from the command line, but maybe there was something else
going on? The result was a new error; I was making progress:

mount -t cifs //172.30.0.201/backup /backup -o user=test_non_winbind,pass=123
mount: block device //172.30.0.201/backup is write-protected, mounting
read-only
mount: cannot mount block device //172.30.0.201/backup read-only

Setting the error logging to more detail (echo 1 > /proc/fs/cifs/cifsFYI)
produced a hint among the other lines:
Sep 15 19:30:42 aslan kernel: Status code returned 0xc000006d
NT_STATUS_LOGON_FAILURE

The Linux samba server that I am connecting to (and from) are both running
winbind which checks passwords on a 2000 domain controller. I was
specifying a user and pass for a Linux only (/etc/passwd) user, whose
account exists on both of these machines (but not on the 2000 domain
controller).

So I tried using a user/pass that exists on the domain controller. Bingo;
I had a connection and a successful mount.

aslan:/home/snowsam# cat /proc/fs/cifs/DebugData
Display Internal CIFS Data Structures for Debugging
---------------------------------------------------
Servers:

1) Name: 172.30.0.201  Domain: CHS Mounts: 1 ServerOS: Unix
        ServerNOS: Samba 3.0.6-Debian   Capabilities: 0x80e3fd
        SMB session status: 1   TCP status: 1
        Local Users To Server: 1 SecMode: 0x3 Req Active: 0
MIDs:


Shares:

1) \\172.30.0.201\backup Uses: 1 Type: NTFS Characteristics: 0x0
Attributes: 0xb
PathComponentMax: 255 Status: 1 type: 0

=======================

Just as with smbfs I was able to browse the newly mounted share, touch
files, etc... but when I tried to cp a "large" ~60 MB file from the share
to a local directory (or from the share to a share) things fell back
apart:

from syslog, repeating over and over:
Sep 15 21:09:15 aslan kernel:  CIFS VFS: Unknown RFC 1002 frame
Sep 15 21:09:15 aslan kernel:  Received Data: : dump of 36 bytes of data
at 0xc31e0120
Sep 15 21:09:15 aslan kernel:
Sep 15 21:09:15 aslan kernel:  e4a6d273 8f2d2c71 1b2063a8 4571622b s Ò ¦ ä
q , - . ¨ c   . + b q E
Sep 15 21:09:15 aslan kernel:  2325028b a70d76eb 18a32dd6 cd324ac5 . . %%
# ë v . § Ö - £ . Å J 2 Í
Sep 15 21:09:15 aslan kernel:  6b9a5fa4 ¤ _ . k
Sep 15 21:09:15 aslan kernel:  CIFS VFS: Unknown RFC 1002 frame

top part of top:
top - 21:11:48 up 12 min,  2 users,  load average: 0.95, 1.08, 0.58
Tasks:  93 total,   1 running,  92 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.7% us,  0.7% sy,  0.0% ni, 98.7% id,  0.0% wa,  0.0% hi,  0.0% si
Mem:    159484k total,   157112k used,     2372k free,     3004k buffers
Swap:   498004k total,        0k used,   498004k free,    79980k cached

The file transferred, but it was corrupt.



So, here are my questions:
1. Any ideas why I had to use the IP to the server rather than the server
name when connecting?

2. Why am I not able to connect using a linux only user-- but am able to
using a linux + 2000 domain user?

3. Ideas on why I am not able to copy "large" files but am able to do
small tasks without any problems?

Any ideas / hints on where to go from here?

Thanks,
Sam


More information about the linux-cifs-client mailing list