I have cluster using NFS with a program myprogram which writes to a fixed location, e.g. /home/sharedfs/somedir/somefile.txt.
This means that if you run myprogram from each node, they all write to the shared /home/sharedfs/somedir/somefile.txt, but this is not desirable.
So, I was thinking: is there a way to create a file for each node, and make a soft link in NFS such that the link on each node points to a different node-specific file? That is, having
/home/sharedfs/somedir/somefile.node0.txt
/home/sharedfs/somedir/somefile.node1.txt
/home/sharedfs/somedir/somefile.nodeN.txt
and
/home/sharedfs/somedir/somefile.txt -> link to somefile.node0.txt only on node0
/home/sharedfs/somedir/somefile.txt -> link to somefile.node1.txt only on node1
/home/sharedfs/somedir/somefile.txt -> link to somefile.nodeN.txt only on nodeN
Is this possible?
Another option is to have different directories somedir which are mounted differently for each node, so that somedir/somefile.txt points to a different (non shared) directory on each node.
Any idea is welcome!