LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Samba - Copying between shares (http://www.linuxquestions.org/questions/linux-software-2/samba-copying-between-shares-875500/)

reticent 04-17-2011 03:09 PM

Samba - Copying between shares
 
Hey Guys,

I recently replaced my windows fileserver with one running Ubuntu. One thing I've noticed (which is a annoying) is that when I copy files between two samba shares from my windows machine, it copies the file through my PC to the new destination. On windows shares it just did some sort of local copy (ie it took about 2 seconds) rather than 3-4 minutes. Is this the normal behaviour, is there any way around it on Linux?

Cheers

markush 04-17-2011 03:54 PM

Hello reticent,

as far as I know the behavior in Windows is equal. If you copy files from one share to another (even if both shares are on the same computer) it will be copied over your PC.

If your new fileserver is to slow, I'd recommend to check the DNS-settings. Did you make sure that every client can resolve the server's name? is your router properly configured?

The most efficient method would be to connect via ssh to one of the computers with the shares and use the scp command to copy the files.

Markus

reticent 04-17-2011 04:03 PM

In that case, perhaps I'm mistaken. I will test tomorrow at work to see if I can replicate the issue. I'm almost certain on windows I had a 'incoming' share, and then an 'apps' share and I could copy files between the two without it coming via my PC! I move a lot of big files (2-4GB) so it takes a little while on a 100mb link. I'm maxing out that link so the bottleneck is simply the network connect I have to the server.

Thanks for the suggestion re: SSH'ing to the server and copying it there. I guess I'm just a little lazy, it's easy to drag and drop!

Cheers

jschiwal 04-17-2011 04:43 PM

That doesn't sound right. I think the use of rpc calls should cause the traffic to go between the two servers. What happens if you map both shares? Does copying between the two mapped shares in the cli take as long?

I would look at the samba logs for clues.

reticent 04-17-2011 05:26 PM

I think you may have misunderstood what I was asking, which is probably my own fault. I am copying files between shares on the same server, ie I have a share on the same server /raid/apps and /raid/incoming. If I drag file, from windows, between those two shares the files come via the PC that did the drag and drop. I _thought_ on windows when doing the same thing it didn't do this..

jschiwal 04-17-2011 05:30 PM

Thanks for the reply. Yes, I took it that you were copying a file from one server to another.

I tried a test myself. It seems that going through a graphical client, the data stream passes through the client so it can display the progress indicator.

I even used konqueror after sshing to a server, so the client was on the same machine. It might not be a samba issue but a GUI client issue. I realize I'm using a different client in this test, as I don't use Windows at all.

I'd suggest two experiments.
1) map the shares and copy the file in the terminal in the DOS terminal. E.G.
cp I:file J:file
2) ssh to the server and copy it, preceding the command with "time"
time cp dir1/file dir2/file

The time command will return the user and system time used executing the command.
The first test will still use Samba, but not a GUI client.
The second test won't use Samba.


All times are GMT -5. The time now is 11:07 AM.