Shouldn't a replicated zfs be read-only?

Status
Not open for further replies.
Joined
Jan 27, 2014
Messages
26
Hello,

1. I set up replication between two freenas machines.

2. The dataset on PUSH is called volume_a/foo/

3. The dataset on PULL is called vol0/remote/foo

4. I manually created volume_a/foo on PUSH and vol0/remote on PULL. I made neither of these read-only

5. I created and ran the snapshot task and the replication task.

6. During the first replication, freenas created vol0/remote/foo and copied the data. It is still copying (it's a lot of data).

7. As I type this, and while the data is copying, the zfs (aka "dataset") on PULL is not read-only!

Code:
[root@milli] ~# zfs get all vol0/remote/foo | grep readonly
vol0/remote/foo  readonly              off                      default


Questions:

Q1: Why didn't FreeNAS make vol0/remote/foo readonly?
a) It never occurred to FreeNAS to do this
b) It will mark it readonly after the first replication is complete. Just be patient.
c) [your answer here]

Q2: Who would ever want a writable periodic-replication-PULL dataset?
a) Nobody. It's dangerous and stupid.
b) [your answer here]
Thank you,
Chris
 
Joined
Jan 27, 2014
Messages
26
Hi,

Please if anyone has any input on this let me know. I my "PULL" machine is going to be thousands of miles away and I do not want to risk the replicated dataset getting borked causing me to restart the replication from scratch. Plus I want remote users to be able to view the reaplicated dataset in a readonly manner.

Chris
 

toadman

Guru
Joined
Jun 4, 2013
Messages
619
It's a good point. In a backup use case, yes, the replicated dataset should probably be read only. Then again, most backup target systems don't have active users poking around that might modify something.

I the easiest way to achieve this is you could modify the replication script or write one that runs after replication to insure the remote datasets are read only.
 
Status
Not open for further replies.
Top