Jump to content
  • 0

Non-Realtime Duplication Mechanics


gj80

Question

When realtime duplication is disabled, and an already-duplicated file is updated, presumably this file is written to only one drive (out of, say, 2 it was duplicated onto) ... how does DrivePool later know which of the 2 now-different versions of the file to duplicate?

 

I ask this because I'm writing a file auditing / change indexing / integrity-verifying program that utilizes a custom alternate data stream which is added to each file with miscellaneous tracking information. When that happens, the main data stream ($DATA) doesn't change, and I'm using special overrides to disable updating the DateModified values.

 

My guess is that DP probably looks at whichever file has the newest date, and chooses that as the new "master" file and overwrites the other one...maybe taking into account the filesize as well?

 

Since I'm not changing DateModified and I'm writing to an alternate stream (so the primary "file size" would be the same I think), would this end up randomly writing to 1 file only out of a duplicated pair and not getting duplicated?

 

If the answer to that is yes, then - if I have realtime duplication *enabled* and all of the above is true, would my new data stream get duplicated to both duplicates of a file, in spite of the primary file size not changing and the datemodified not changing?

 

I'm not only writing this program for use with DrivePool, but since I obviously use it, I want to make sure it works, and how I need to have it set for it to work properly. Thanks!

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

If real time duplication is disabled, then it depends on the file. And what you're doing.

  • If the file is already duplicated, then any modification to the file is done in parallel to all copy of the files.  This includes writing to the file or moving them around
  • Newly created files are not duplicated, until a duplication pass occurs (IIRC, 1AM, daily). 

If you're reading the file, then this is handled "normally". If read striping is enabled, then it depends on ... well, more factors.

 

Additionally, when duplicating the file, IIRC, we do set the modify time to be the same.

Specifically, if there are multiple files, during a duplication pass or when accessing the file, we check the modified time. If that doesn't match, we may check the CRC of the file.  If that doesn't match, then we flag the user for a duplication mismatch... otherwise, we update the info on both files to match the newest file.

 

(IIRC, I'm not 100% sure about that)

 

 

As for the Alternate data stream, I'm not sure.  However, I do believe that yes, it would get duplicated to both disks (as ADS are just a special file type, essentially). 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...