Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Suppose I have three networked computers: A, B and C.

A mounts a directory from B and from C.

A/mnt/im-on-B/
A/mnt/im-on-C/

A then copies a file:

cp /mnt/im-on-B/file ../im-on-C/

What happens to the data - does it pass from B to C via A?

Is this significantly more inefficient than cping the file from B to C directly?

share|improve this question
add comment

1 Answer

Yes to both questions. B transmits the data to A, which retransmits it to C. This means there's twice as much activity on the network as a direct copy from B to C would generate. How significant that is depends on the topology of your network and what other traffic there is.

The standard workaround is to SSH into either B or C, and then start the copy from there (using NFS mounts or scp or rsync or whatever). That way, the data goes directly from B to C and doesn't need to pass through or be duplicated by A.

share|improve this answer
1  
is there a way (system utility) to directly copy it from B to C from A but not passing the data through A? –  amphibient Feb 26 '13 at 21:56
1  
@foampile You could simply SSH into B or C computer and do you file operations bypassing A. There is a way to put SSH commands into a script and run it from A. How to ssh from within a bash script?. –  Desmond Hume Feb 26 '13 at 22:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.