Conflict Resolution

Creating the Same Filename across Multiple Sites

If the same file is created on multiple sites during the same replication interval (or when sites are disconnected from each other), then the Global Namespace will automatically create two versions of the file, a site-local file with the original name, and a second file representing the remote version of the file. If more than 2 sites collide at the same time, there may be multiple versions.

The following example shows a different size file from each site to illustrate the behavior. The command is run from a local Linux client located on each site, with the DataCore vFilO share mounted under "/global".

SITE A (ID: 0) SITE B (ID: 1) SITE C (ID: 2)
Create a file concurrently on all three sites.
# cd /global # dd if=/dev/urandom of=file bs=1024k count=1 # cd /global # dd if=/dev/urandom of=file bs=1024k count=5 # cd /global # dd if=/dev/urandom of=file bs=1024k count=9
Wait until the replication interval has passed and view the file directly with "ls –l" command. The highlighted text in the following row shows the files across shares.

# ls -l

total 15360

1048576 Feb 28 00:44 file

5242880 Feb 28 00:44 file[#S!=1]

9437184 Feb 28 00:44 file[#S!=2]

# ls -l

total 15360

5242880 Feb 28 00:44 file

1048576 Feb 28 00:44 file[#S!=0]

9437184 Feb 28 00:44 file[#S!=2]

# ls -l

total 15360

9437184 Feb 28 00:44 file

1048576 Feb 28 00:44 file[#S!=0]

5242880 Feb 28 00:44 file[#S!=1]

As can be seen in the table, the same filename exists on all the sites however the conflict from the other sites is automatically renamed to [FILENAME].[#!=[SITE ID]. This is done to ensure that the name of the local file does not suddenly change and that other sites do not overwrite the local file content.

To resolve a conflict:

  1. Copy the renamed file to the original file name.
  2. Delete the automatically named file if it is no longer needed.

Changing Site Ownership of Files

By default, the last writer will take precedence when two sites write to the same file within the same replication interval. To protect against user mistakes, the Global Namespace feature has the capability to preserve previous file content. This functionality must be enabled in the form of an objective.

Since the site ownership creates additional copies of files (similar to Undelete functionality), the extra copies have an expiration date, with the time is set by the objective. If snapshots are taken before they are deleted, then the file will remain in the snapshot until the snapshot retention expires or the file expiration expires, whichever is the longest.

Site Ownership Objectives

The name indicates how long these files are retained. When a retained file is copied, the retention is not copied with the file.

  • Log-xfer-1-hour
  • Log-xfer-1-day
  • Log-xfer-1-week
  • Log-xfer-1-month

The retained files are available in .snapshot/current and the name is made unique by appending a timestamp at the end of the file.

Example Output

In this example, the file entry represents the live tree version and second entry represents the saved version of the file with the timestamp appended to the file.

# ls -lt .snapshot/current/

-rw-r--r-- 1 root root 217 Feb 28 07:33 file

-rw-r--r-- 1 root root 174 Feb 28 07:30 file[?.m=2020-02-28T07-33-21.41647]