I've got a script running on a number of Ubuntu Server 12.04 computers that are all mounted to a single NFS share. When the script completes, it copies the output to the share. Most of the time it works fine, but occasionally it will just create an empty file (of the correct name) that has no permissions and has a modified date of 1971, and then it will return an error cp: cannot create regular file '<filename>': File exists
. This is driving me insane!
Here's my /etc/exports
file:
/export 192.168.0.0/24(rw,fsid=0,insecure,no_subtree_check,async,no_root_squash)
/export/home 192.168.0.0/24(rw,nohide,insecure,no_subtree_check,async,no_root_squash)
/export/opt 192.168.0.0/24(rw,nohide,insecure,no_subtree_check,async,no_root_squash)
And here's an example /etc/fstab
from one of the client machines:
...
192.168.0.254:/home /home nfs4 _netdev,auto 0 0
192.168.0.254:/opt /opt nfs4 _netdev,auto 0 0