n1ght28
Posts: 6
Joined: Thu Sep 20, 2012 4:20 pm

Large files fail to copy to smb share!

Tue Oct 30, 2012 12:39 am

while accessing the smb share hosted on my pi (a mounted usb hard drive)
from a ubuntu laptop via wifi I encounter two problem

1) get a disk full error when trying to copy files over to the share from the laptop,
2) if I hit "copy anyway" and the file is over 100mb aprox, it fails after a few mb.

the smb share is mounted on the laptop using fstab

here is my fstab

Code: Select all

/dev/sda3       /               ext4    errors=remount-ro 0       1
//192.168.1.18/public /media/pi cifs uid=myuser,credentials=/home/myuser/.smbcredentials,iocharset=utf8,file_mode=0777,dir$
# swap was on /dev/sda5 during installation
UUID=60df05e9-f81c-493c-a338-f6fa33b2d9f5 none            swap    sw              0       0

my /etc/samba/smb.conf

Code: Select all

[public]
  comment = Public Storage
  path = /home/shares/public
  admin users = root
  available = yes
  read only = no
  browsable = yes
  public = yes
  writeable = yes
any ideas where I'm going wrong?

smartpatrol
Posts: 23
Joined: Thu Oct 18, 2012 2:28 am

Re: Large files fail to copy to smb share!

Thu Nov 01, 2012 10:07 pm

If your share is on an SD card try running df -i if it says 100% you are out of inodes.

Voya
Posts: 3
Joined: Wed Sep 19, 2012 11:22 am

Re: Large files fail to copy to smb share!

Thu Nov 08, 2012 10:33 pm

Not sure if it is the same problem.

My Pi used to drop the connection when transferring files over 100mb via samba to either SD or USB. SFTP was no problem. This has been bugging the hell out of me for months and I have searched endless samba pages for the answer. Nothing has helped.

Turns out the Ethernet and Samba are not friends on my Pi. I found an unused nano wifi adapter which worked out of the box and finally Samba is stable.

GregMo
Posts: 2
Joined: Tue Dec 11, 2012 2:18 pm

Re: Large files fail to copy to smb share!

Tue Dec 11, 2012 2:30 pm

It's odd that sftp worked when Samba didn't as I found this post because I'm having the exact same issue with sftp. I've searched and searched and can't find a precise reason for the issue. I know it's related to the Pi because using the same origin machine with a FreeBSD box works with no issues. Other places have suggested lowering the MTU as the issue, but that didn't help. You really wouldn't expect it to given when/how it fails for me. If you watch the file on the Pi the file is created and increases in size till it reaches the size of the file on the remote. I'm guessing what's happening here is that the space is being allocated for the copy, only on the FreeBSD box this happens instantly. Next, the size of the file changes almost immediately to something like 64440 bytes right before it's removed completely. This happens exactly the same way every time I attempt it with a file around 700mb so I know it's not a question of transmission issues. Haven't test to find where the break point is but I do know smaller files work fine.

GregMo
Posts: 2
Joined: Tue Dec 11, 2012 2:18 pm

Re: Large files fail to copy to smb share!

Thu Dec 13, 2012 10:10 pm

After debugging, researching, pulling out hair, I think I know where my particular issue is, though not how to fix it. I'm 99% sure that the issue is a buffer size in either dropbear or sftp. Now, mind you, I'm using a distro from Raspbmc that's based of Ubuntu rather than Debian so I'm not sure the issues would prevail in both cases. My best guess, based on things I've been able to find similar to my problem is that with it's configuration that the sftp is trying to write to an in-memory buffer prior to writing to the disk and when the buffer overflows, the process errors and deletes the file. There should be a setting to have the server write directly to a file, which imho, is how it should be by default. I don't have anything concrete on this, so I could still be way off, but this seems to be the case based on my trials and research.

Return to “Networking and servers”