Skip to content
This repository has been archived by the owner on Jun 18, 2022. It is now read-only.

sync() and fsfreeze() when creating a snapshot #195

Open
peebles opened this issue Feb 21, 2017 · 5 comments
Open

sync() and fsfreeze() when creating a snapshot #195

peebles opened this issue Feb 21, 2017 · 5 comments

Comments

@peebles
Copy link

peebles commented Feb 21, 2017

Inspired by the ec2-consistent-snapshot project, I wonder if, when creating snapshots, it'd be nice to run sync() and fsfreeze() before creating the snapshot, and then unfreezing. I am tempted to create a pull request for this, if anyone thinks this is useful or even necessary in the context of docker volume plugins. Please advise.

@yasker
Copy link
Member

yasker commented Mar 1, 2017

It's really interesting. I think it's useful. It makes EBS snapshots to be application consistency instead of crash consistency. A PR will definitely be welcome!

@peebles
Copy link
Author

peebles commented Mar 1, 2017

I have something working ... I'll generate a PR request momentarily.

@yasker
Copy link
Member

yasker commented Mar 1, 2017

thanks! @peebles

@peebles
Copy link
Author

peebles commented Mar 1, 2017

By the way ... sync() and fsfreeze() for for EBS driver. For VFS, fsfreeze() does not work... I guess that isn't supposed to work with NFS mounted file systems. I haven't found any alternatives. So for VFS I'll just sync(). For device mapper it seems neither sync() or fsfreeze() are appropriate as device mapper natively supports snapshots with suspends.

So I think I'll hard code the sync() into VFS and EBS, and I'll make fsfreeze() a driver option for EBS, false by default. What do you think?

@yasker
Copy link
Member

yasker commented Mar 1, 2017

That's very reasonable. I thought it was only for EBS, but it's nice to have sync() for VFS as well.

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

No branches or pull requests

2 participants