Actually, I am suprised that you got duplicate files in the first place. The
current behaviour is to truncate any existing file to zero length prior to
writing it. If the file exists, the client will be driven to that location.
If it doesn't exist, a random server will be chosen. If more than one copy
exists then the write will be denied. So, how did you manage to get
differing duplicate copies?
----- Original Message -----
From: "wen guan" <[log in to unmask]>
To: "Andrew Hanushevsky" <[log in to unmask]>
Cc: <[log in to unmask]>
Sent: Tuesday, May 11, 2010 8:20 AM
Subject: xrdcp overwrite a file
> Hi Andrew,
> Could xrdcp overwrite a file which already exists? Because now
> "xrdcp -f " will create a new file if the file already exists. It
> caused a lot of problem for us. Because some of us used "xrdcp -f" to
> rerun failed jobs, it created more than one replication for some
> files(one good file and the others are bad files). When reading these
> files, xrootd randomly select one replication to read. The result is
> that many bad files are read.
> So could xrdcp have an option to overwrite the old file instead of
> creating a new replication?