Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replication of multiple (nested) dataset #166

Open
Peter2121 opened this issue Feb 5, 2021 · 8 comments
Open

Replication of multiple (nested) dataset #166

Peter2121 opened this issue Feb 5, 2021 · 8 comments

Comments

@Peter2121
Copy link

I need to replicate some nested datasets. There is a 'root' dataset zroot/jails and multiple child datasets like zroot/jais/mail, zroot/jais/web etc. Following #165 I abandoned the idea of nested replication, so I try to configure separately the replication of every dataset. The problem is that I need to replicate several datasets inside zroot/jails AND zroot/jails itself (there are some configuration data and system roots there). And when I configure the replication of zroot/jails - the ZFS parameters of this dataset, added by zrep, are propagated to all child datasets, so when I try to configure a child dataset - I get an error from zrep:

zroot/jais/mail is at least partially configured by zrep
Error: zrep:master detected!!

Evidently, zrep clear zroot/jais/mail does not help here as the ZFS parameters, set by zrep, are inherited from zroot/jails. A workaround - configure firstly all child datasets and then the root dataset - works correctly, but when I need to add a new child dataset or reconfigure an old one - I hit the same problem.
How can I deal with this problem?

@ppbrown
Copy link
Member

ppbrown commented Feb 5, 2021 via email

@Peter2121
Copy link
Author

If I understand correctly, exporting ZREP_TAG=zreproot should change the prefix of ZFS parameters of the dataset? It is not the case for my current version, the root dataset is reinitialized with zrep:... parameters despite ZREP_TAG=zreproot set in the environment.

@ppbrown
Copy link
Member

ppbrown commented Feb 9, 2021 via email

@Peter2121
Copy link
Author

@ppbrown I don't try to use or migrate the existing setup.
I removed the existing configuration for the 'root' dataset with zrep clear, then I added a new jail dataset with zrep -i (successfully), then I configured ZREP_TAG with the command export ZREP_TAG=zreproot (I'm using zsh). The environment variable is visible in env. Then I tried to configure the replication of 'root' dataset with zrep -i. The replication was successfully finished, but if I do zfs get all on the 'root' dataset - I see zrep:master yes local etc. What did I miss here?

@ppbrown
Copy link
Member

ppbrown commented Feb 12, 2021 via email

@Peter2121
Copy link
Author

With ZREPTAG it almost works, but, as the 'child' datasets inherit the zfs parameters from the root one, during snapshots cleanup their snapshots are accidentally deleted, so the replication of child snapshots is broken following the cleanup of snapshots of the 'root' dataset. As I cannot block the inheritance, the system remains really fragile and it is impossible to configure the different number of snapshots to save for different datasets.

@ppbrown
Copy link
Member

ppbrown commented Feb 28, 2021 via email

@Peter2121
Copy link
Author

It seems that the problem is more complicated than I thought. I created a simple 'lab' setup, and I cannot reproduce the problem here. I definitely need to digg more...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants