-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Support for writable snapshots or similar functionality to create application consistent snapshots #16733
Comments
You can do 'zfs promote' the clone and delete the original dataset at some point if it helps. This way you can get rid of the previous fork and create a new fork (snapshot+clone) later when needed. |
Thanks @IvanVolosyuk No sadly this does not help. I looked into all type of flows and did not find any flow that allows me to keep the original volume and just a single snapshot with the backup. It looks like there is no way to remove the intermediate snapshot. But then the intermediate snapshot cannot be deleted. |
Assuming that you really thought it through and you must have a "writable snapshot" I see only one way. From the traditional ZFS clones perspective there is indeed no way to disconnect a clone from its origin without deleting one or another. Just because it would require some mechanism for tracking overlapped space, which was just not there. Though some time ago, after block cloning was implemented, somebody proposed an idea that we could create a fake records in BRT table for each block shared by the clone and its origin and just forget the clone's relationship with the snapshot, effectively making it an independent dataset, sharing space only via block cloning, which you can do anything with. It would be quite a brain surgery, but may be possible. At this point we assert that block cloning and deduplication are applicable only to data blocks, but may we could change that. But the clones freed that way would be much more expensive than traditional ones, so it would probably make sense only once clone and its origin diverged far enough, unless you already use deduplicaiton on the dataset, in which case it would cost only DDT records for metadata. |
@amotin thanks for your feedback! But it really sounds like when we want to use it with the existing functionality we need to create two snapshots and keep both. The answer that this isn't something we get soon and it might add overhead is a helpful answer to see what else we can use. |
ZFS snapshots are working great for us.
But some applications require application consistent snapshots.
On Windows VSS supports Auto Recovery snapshots which allows a backup to mount the snapshot to be mounted during backup operations before the backup completes.
Having a writable snapshot would allow to build similar integrations on Linux.
btrfs has support for writable snapshots, but we really would like to have customers use ZFS, because of many other ZFS features.
Maybe I am thinking into the wrong direction and there is a better way.
I tried to come up with a flow where we take a snapshot, mount it as a new file-system and apply changes.
But the snapshot we are taking from that new clone still has dependencies to the previous snapshot which cannot be removed.
The problem we are trying to solve:
A way to have writable snapshot or a similar way that could allow us to bring an application into a consistent state, take a snapshot and then merge the deltas occurred during the freeze time would help us to use ZFS in more environments.
Thanks for any feedback and ideas how we could get this solved with today's features and taking into account my feature request for future releases in some way.
-- Daniel
The text was updated successfully, but these errors were encountered: