Exposing a replicated snapshot to users

Status
Not open for further replies.

f4242

Explorer
Joined
Mar 16, 2017
Messages
97
Hello,

I have two NAS in two offices. I have a replicated snapshot for one dataset. This work great and give me a read only mirror of the most important data.

I would like to give access to this data to my users. It's useful for them because this avoid the slow internet link.

So the goal is to give user access to a read only mirror of the dataset hosted on the other NAS. The mirror should be located on the same existing share, in a sub directory.

My idea is to create a script that would rsync my data from the replicated snapshot to a sub directory of the share. The scripts would then need to reset permissions to avoid writes to this sub directory. The script would run as a cron/task.

Do you think about a better idea? Any way to expose directly the read-only snapshot as a sub directory of my share?

Thanks!
 
Joined
Jul 3, 2015
Messages
926
Why don't you just share the snapshotted and replicated dataset directly from the replica system as you would the primary? Assuming your users are the same on the primary and the secondary it should work as desired out of the box.
 

f4242

Explorer
Joined
Mar 16, 2017
Messages
97
I thought about that too, but they would need to mount a second share. The replicated snapshot is just a subset of the data of the primary location. By using the same share, I can locate the replica to a logical path for my users.
 
Joined
Jul 3, 2015
Messages
926
I thought about that too, but they would need to mount a second share. The replicated snapshot is just a subset of the data of the primary location. By using the same share, I can locate the replica to a logical path for my users.
Ok, I understand. Could they not mount higher up the tree and traverse down?
 

f4242

Explorer
Joined
Mar 16, 2017
Messages
97
It would work, but this would not by ideal.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
You can't mount stuff from different computers on a single share just like that. That is simply not what the classical sharing protocols were designed for and there's no hope in hell of that happening.

You'd need a rather convoluted setup for this to work and I'm not sure even the upcoming clustering features will help.
 

f4242

Explorer
Joined
Mar 16, 2017
Messages
97
No this is not what I'm trying to do.

Each NAS have similar contains, but not the same (differents projects). Most users use files located on the local share most of the time.

Right now, on our current setup (non-freenas and non-zfs), we have a rsync jobs that run daily to sync a subset of the data on both NAS. The rsync destination is inside the share path so the users can get an read-only access to theses documents. They can also mount the other share when really needed (if they need latest revision of a document or if they need to update it).

I'm trying to do a similar thing with our new freenas setup by leveraging the replicated snapshot feature. I'm not looking to do any clustering or any magic things. The users understand they don't get live data on the replica.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
No this is not what I'm trying to do.

Each NAS have similar contains, but not the same (differents projects). Most users use files located on the local share most of the time.

Right now, on our current setup (non-freenas and non-zfs), we have a rsync jobs that run daily to sync a subset of the data on both NAS. The rsync destination is inside the share path so the users can get an read-only access to theses documents. They can also mount the other share when really needed (if they need latest revision of a document or if they need to update it).

I'm trying to do a similar thing with our new freenas setup by leveraging the replicated snapshot feature. I'm not looking to do any clustering or any magic things. The users understand they don't get live data on the replica.

Well, since zfs send/recv operates on datasets, there's really no way to accomplish what you want, without resorting to ugly hacks. Or rsync, which seems to be working well enough for you.
 

f4242

Explorer
Joined
Mar 16, 2017
Messages
97
The replicated snapshot is not the issue. The data I want to replicate is inside a single (sub)dataset.
 
Status
Not open for further replies.
Top