Qnap: NAS to NAS question

mwc104

Prominent
Mar 27, 2017
27
0
540
My brother came to me about the business he works for and how their backup devices are slow and don't always work right. After talking to him today and getting details, here is what I have gathered:

They have a Qnap NAS in one town and another Qnap NAS in another town. They have the 2 devices sync at midnight. The problem I see is he is telling me they access and modify the files on both NAS devices. For example, a file named 123.doc is on both qnap devices. Employees at town 1 are accessing the 123.doc on their NAS and the employees at town 2 are accessing the 123.doc on their NAS. "Same" file but on 2 different NAS devices.....so, if the employee at town 1 saves the document on their NAS at 5pm and then an employee from town 2 saves the document on their NAS at 5:30pm, then when the NAS syncs at night, it's going to sync the file from 5:30 over the one at 5. Technically, they are modifying 2 different files but the Qnap is replacing the one with the newer time stamp.

In my mind, it makes more sense for data integrity that all employees access the same files on one Qnap device and then the other is strictly synced to the other for off-site disaster recovery. What do you all think?
 
Yes that would be a conflict if the two locations are modifying the same files that are stored separately from each and synced after the fact. If that's what they are doing they should either A) have office 1 host a master file-server and have office 2 connect directly to it instead like you suggested. Or B) don't bother with a file-server and setup an online cloud file service instead; Dropbox, Onedrive/Sharepoint, A custom Amazon AWS job, there are others.
 
Hoo boy. This is the classic deadlock situation given in every intro to symmetric multiprocessing course. Only instead of locking up the system because they can't preserve both person's work, they are simply discarding one person's work.

https://en.wikipedia.org/wiki/Deadlock

As you've surmised, you can only have one "master" set of files. If two people try to work on the same file at the same time, the second person needs to be locked out of changing it until the first person finishes their edits. Synchronizing the files between both offices is going to require some sort of always-on VPN so there's only one master set of files. Edit: Or host the files in a single cloud server as why_wolf suggests.

Or if they want to continue what they're doing, they're going to need to start using some sort of version control system. And when the two QNAP devices sync, if it detects a VCS conflict (two conflicting edits to the same file), it flags it for a human to review the next morning and decide how to handle it. Throw away person A's edits, throw away person B's edits, or somehow try to merge them.

https://en.wikipedia.org/wiki/Version_control

VCS is a fact of life in group programming projects. But I'm now sure how well it'll go over with non-programmers. Since the two systems somehow connect to each other at night to sync up, the VPN method is probably the better option.
 

mwc104

Prominent
Mar 27, 2017
27
0
540


Great! Thanks for verifying that. I was thinking I wasn't crazy but sometimes, ya never know! I'm going to keep having him find out information and see where their mapped drives are too. That will tell me for sure if each location is looking at their own NAS like I fear.

I'm assuming that whoever set it up like that did so in hopes that accessing the files would be faster at the locations, but didn't quite understand what complications that makes.
 


They might also have been thinking that each office was independent of the other and there were no cross office file changes happening. Just individual folders for users at each branch and the nightly backup was just that a backup. That's never how it works though. For sure their accounting records are being manipulated by both offices.