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

Exclude datasets with readonly=on if the --skip-readonly flag is set #76

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mlan
Copy link

@mlan mlan commented Dec 7, 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.

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

Successfully merging this pull request may close these issues.

1 participant