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

optionally ignore datasets which are readonly=on #75

Open
mlan opened this issue Dec 5, 2017 · 0 comments
Open

optionally ignore datasets which are readonly=on #75

mlan opened this issue Dec 5, 2017 · 0 comments

Comments

@mlan
Copy link

mlan commented Dec 5, 2017

In some use cases it would be convenient if zfs-auto-snapshot ignores datasets which are readonly=on regardless of the value in com.sun:auto-snapshot.

I am considering a setup using both zfs-auto-snapshot and zrep. zrep facilitates two way zfs replication with failover. The status of of the paired fs is kept in zfs properties. The 'master' have zrep:master=yes and readonly=off whereas the 'slave' have zrep:master=no and readonly=on.

For the replication to work snapshots cannot be added to the 'slave'. This could potentially be avoided if
zfs-auto-snapshot, perhaps by providing an optional flag '--skip-readonly', did not create snapshots for datasets that are readonly=on regardless of their value in com.sun:auto-snapshot. #76

With such modification of zfs-auto-snapshot's behavior, it would be possible to run 'zrep sync all' as a cron job together with zfs-auto-snapshot on both servers and auto-snapshot and replication-failover would "just work", where failover or takeover can be issued on each dataset individually.

Yes, in general, snapshotting datasets which are readonly=on costs very little, but for the above mentioned reason, and potentially others reasons too, usability can in some instances improve if it can be avoided.

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

1 participant