slu@sernet.com.cn
2003-Nov-27 12:38 UTC
[Samba] File corrupted when copy one large file(10G) from NT4.0 to samba
Hi All,
When I copied one file from NT4.0 to Linux through samba with
'copy'
command in NT4.0, the file was always corrupted. Size of the file copied
into Linux was always about 4G. If I copied it through Windows Explorer,
it was OK. It seems samba cannot process the "Write Raw" request sent
by
'copy' command correctly when file size is larger than 4G bytes. Thanks
for
any help!
Best Regards
Shearer Lu
John H Terpstra
2003-Nov-27 17:18 UTC
[Samba] File corrupted when copy one large file(10G) from NT4.0 to samba
Shearer, I do not want to sound picky, but please look at this posting from the perspective of one of the developers. If your were a developer, and you saw this posting, what would you do? First, as a developer, I look at the facts: 1) There appears to be a problem - acknowledged 2) It involves a DOS copy, Hmmm. - Was it the DOS 'command' shell? - Was it the NT 'cmd' shell? Questions: A) What version of Samba - Oops not given! B) Configuration - Oops not given! Developer response: We will have to wait until we get enough information to work from. Let's move on to the next problem. Net effect of posting: No resolution achived. Possible problem acknowledged. Insufficient information. Sorry. Guessing (ny guess): Does NT4 have a file size limit in the command shells? - if so, what are the file size limits and what happens beyond the end of that limit if a file exceeds this? Please help us to understand what you want done to solve your problem. We would love to help you, but as you can see, you did not provide much for us to go on. The next step is in your hands. If you want action, please show us from samba log files, what is not working correctly. For example, set "log level = 3" and then do the copy. It will create a massive file for you to scan. From that file you can determine what smbd (the samba file daemon) is doing with the large file. In order for one of us to diagnose the problem, we need the log section that demonstrates the problem as well as your configuration file and sufficient information to allow the problem to be reproduced. - John T. On Thu, 27 Nov 2003 slu@sernet.com.cn wrote:> Hi All, > When I copied one file from NT4.0 to Linux through samba with 'copy' > command in NT4.0, the file was always corrupted. Size of the file copied > into Linux was always about 4G. If I copied it through Windows Explorer, > it was OK. It seems samba cannot process the "Write Raw" request sent by > 'copy' command correctly when file size is larger than 4G bytes. Thanks for > any help! > > Best Regards > Shearer Lu > > >-- John H Terpstra Email: jht@samba.org
slu@sernet.com.cn
2003-Dec-01 02:26 UTC
[Samba] File corrupted when copy one large file(10G) from NT4.0 to samba
Hi John,
I used the NT 'cmd' shell, and the version of samba is 2.2.7a. I
set
the debug level to be 8 and obtained the following log messages.
[2003/11/28 17:18:38, 3] smbd/reply.c:reply_writebraw(2863)
writebraw2 fnum=6525 start=4294963200 num=44860 wrote=61440
[2003/11/28 17:18:38, 6] smbd/process.c:process_smb(877)
got message type 0x0 of len 0x4104
[2003/11/28 17:18:38, 3] smbd/process.c:process_smb(878)
Transaction 69921 of length 16648
[2003/11/28 17:18:38, 5] lib/util.c:show_msg(274)
size=16644
smb_com=0x1d
smb_rcls=0
smb_reh=0
smb_err=0
smb_flg=24
smb_flg2=3
[2003/11/28 17:18:38, 5] lib/util.c:show_msg(282)
smb_tid=1
smb_pid=51966
smb_uid=100
smb_mid=18368
smt_wct=14
[2003/11/28 17:18:38, 5] lib/util.c:show_msg(291)
smb_vwv[0]=6525 (0x197D)
[2003/11/28 17:18:38, 5] lib/util.c:show_msg(291)
smb_vwv[1]=61440 (0xF000)
[2003/11/28 17:18:38, 5] lib/util.c:show_msg(291)
smb_vwv[2]=0 (0x0)
[2003/11/28 17:18:38, 5] lib/util.c:show_msg(291)
smb_vwv[3]=57344 (0xE000)
[2003/11/28 17:18:38, 5] lib/util.c:show_msg(291)
smb_vwv[4]=0 (0x0)
[2003/11/28 17:18:38, 5] lib/util.c:show_msg(291)
smb_vwv[5]=0 (0x0)
[2003/11/28 17:18:38, 5] lib/util.c:show_msg(291)
smb_vwv[6]=0 (0x0)
[2003/11/28 17:18:38, 5] lib/util.c:show_msg(291)
smb_vwv[7]=0 (0x0)
[2003/11/28 17:18:38, 5] lib/util.c:show_msg(291)
smb_vwv[8]=0 (0x0)
[2003/11/28 17:18:38, 5] lib/util.c:show_msg(291)
smb_vwv[9]=0 (0x0)
[2003/11/28 17:18:38, 5] lib/util.c:show_msg(291)
smb_vwv[10]=16580 (0x40C4)
[2003/11/28 17:18:38, 5] lib/util.c:show_msg(291)
smb_vwv[11]=64 (0x40)
[2003/11/28 17:18:38, 5] lib/util.c:show_msg(291)
smb_vwv[12]=1 (0x1)
[2003/11/28 17:18:38, 5] lib/util.c:show_msg(291)
smb_vwv[13]=0 (0x0)
[2003/11/28 17:18:38, 5] lib/util.c:show_msg(297)
smb_bcc=16581
[2003/11/28 17:18:38, 3] smbd/process.c:switch_message(685)
switch message SMBwritebraw (pid 3487)
[2003/11/28 17:18:38, 4] smbd/uid.c:change_to_user(123)
change_to_user: Skipping user change - already user
[2003/11/28 17:18:38, 3] smbd/reply.c:reply_writebraw(2800)
writebraw1 fnum=6525 start=57344 num=16580 wrote=16580 sync=0
[2003/11/28 17:18:38, 6] lib/util_sock.c:write_socket(518)
write_socket(12,41)
[2003/11/28 17:18:38, 6] lib/util_sock.c:write_socket(521)
write_socket(12,41) wrote 41
[2003/11/28 17:18:38, 3] smbd/reply.c:reply_writebraw(2863)
writebraw2 fnum=6525 start=57344 num=44860 wrote=61440
In above log messages, when the file size reachs 4Gbytes, the offset is
wrong, it back from 4294963200 to 57344. As a result, the content of the
file was corrupted.
I aslo copied the same large file from NT to Win2k and WinXP, it was OK. So
I think it is one compatibility between NT4 and samba.
And the following is my configurations in smb.conf:
[global]
config file=/etc/samba/smb.conf
coding system = SJIS
client code page = 932
os level = 8
workgroup = workgroup
write raw = no
read raw = no
server string printcap name = /etc/printcap
load printers = yes
max log size = 1000
security = user
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
socket options = TCP_NODELAY SO_KEEPALIVE SO_SNDBUF=8192 SO_RCVBUF=8192
preferred master = yes
dns proxy = no
preserve case = yes
short preserve case = yes
default case = upper
case sensitive = no
mangled names = yes
null passwords = yes
mangle case = yes
dos filetimes = yes
veto files = /.ShareConfFile
delete veto files = False
force directory mode=771
force create mode=660
create mask=771
map system=yes
map to guest=Never
guest account=guest
name resolve order = wins bcast host
....
Any ideas for the problem. Thanks
Best Regards
Shearer Lu
John H Terpstra
<jht@samba.org> ¦¬¥ó¤H¡G slu@sernet.com.cn
°Æ¥»§Û°e¡G
samba@lists.samba.org
2003-11-28 01:18 ¥D¦®¡G Re: [Samba] File
corrupted when copy one large file(10G) from NT4.0 to samba
Shearer,
I do not want to sound picky, but please look at this posting from the
perspective of one of the developers. If your were a developer, and you
saw this posting, what would you do?
First, as a developer, I look at the facts:
1) There appears to be a problem - acknowledged
2) It involves a DOS copy, Hmmm.
- Was it the DOS 'command' shell?
- Was it the NT 'cmd' shell?
Questions:
A) What version of Samba - Oops not given!
B) Configuration - Oops not given!
Developer response:
We will have to wait until we get enough information to work from.
Let's move on to the next problem.
Net effect of posting:
No resolution achived. Possible problem acknowledged. Insufficient
information. Sorry.
Guessing (ny guess):
Does NT4 have a file size limit in the command shells?
- if so, what are the file size limits and what happens
beyond the end of that limit if a file exceeds this?
Please help us to understand what you want done to solve your problem.
We would love to help you, but as you can see, you did not provide much
for us to go on. The next step is in your hands.
If you want action, please show us from samba log files, what is not
working correctly. For example, set "log level = 3" and then do the
copy.
It will create a massive file for you to scan. From that file you can
determine what smbd (the samba file daemon) is doing with the large file.
In order for one of us to diagnose the problem, we need the log section
that demonstrates the problem as well as your configuration file and
sufficient information to allow the problem to be reproduced.
- John T.
On Thu, 27 Nov 2003 slu@sernet.com.cn wrote:
> Hi All,
> When I copied one file from NT4.0 to Linux through samba with
'copy'> command in NT4.0, the file was always corrupted. Size of the file copied
> into Linux was always about 4G. If I copied it through Windows Explorer,
> it was OK. It seems samba cannot process the "Write Raw" request
sent by
> 'copy' command correctly when file size is larger than 4G bytes.
Thanks
for> any help!
>
> Best Regards
> Shearer Lu
>
>
>
--
John H Terpstra
Email: jht@samba.org