Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

What is the best way to duplicate a file on an NFS mount, specifically is there any way to to that without looping the read/write back through the local network interface?

I have a large application that is currently doing copy() in a few places and we've tracked down some performance issues to this step - we're considering moving our disk array mount to something like iSCSI but would really be keen to see if there's a fast fix we could apply to the NFS.

Thanks.

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

Really the only way to do this is to run the copy operating on your fileserver. You could conceivably set up some sort RPC-ish mechanism so that the application can request the copy, and then wait for a notification that the copy is complete.

Even moving to iSCSI you'll still be looping the copy operating through your local network interface.

share|improve this answer
    
This answer makes sense but I have to believe this problem has already been solved somewhere. Seems an obvious optimization. –  Phil Hollenback Sep 12 '11 at 15:17
    
larsks - Is that true about iSCSI? I was under the impression it would show the disks as a block device and allow the operation to take place remotely –  Ciaran McNulty Sep 12 '11 at 15:40
    
Sure, the disks are block devices...and to copy a file on a block device, you read the data from the first file and write it to the second file. Since you're talking to your block device over the network, the blocks come in for the read and go back out for the write. It's possible that there are SCSI operations that instruct the remote device to copy data blocks around, but (a) I don't know for sure if they exist, and even if they do, I don't know (b) how well they're supported by various iSCSI implementations. –  larsks Sep 12 '11 at 15:43
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.