node.js rename and AWS
Problem
Possible Duplicate:
Move file to a different partition using node.js
I'm using fs.renameSync to Rename a /tmp file to a file in a directory on a mounted EBS file-system on an AWS micro-instance. I get the error :
Error: EXDEV, Invalid cross-device link '/tmp/55fb21262ba306f70e2d7ccaac5a59e0'
at Object.renameSync (fs.js:320:18)
The rename works fine on my local server. I'm running node with sudo on AWS and have write access to both directories.
Also, the mv command works fine, which with spawn, could be my workaround.
Is there something special about /tmp on the AWS micro-instance?
Solution
This is a duplicate of: How do I move file a to a different partition or device in Node.js?
You can't create cross-device hard links, which apparently fs.renameSync does. An EBS volume is a different device than where /tmp is mounted.
Discussion
View additional discussion.