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

RPC endpoint for syncing filesystem #2698

Open
v6ak opened this Issue Mar 12, 2017 · 5 comments

Comments

Projects
None yet
3 participants
@v6ak

v6ak commented Mar 12, 2017

I'd appreciate a synchronous endpoint for flushing all FS changes. Currently, I can run qvm-run -p vm_name sync (from dom0). It will work on Linux. But its behavior on other systems is generally not defined (it will most likely be an undefined command).

Why? Because of syncing a running VMs: v6ak/qubes-incremental-backup-poc#46

@jpouellet

This comment has been minimized.

Show comment
Hide comment
@jpouellet

jpouellet Mar 13, 2017

Contributor

I cannot possibly imagine any way to implement this in a race-free way (with fs state flushed & return from RPC (& block-level snapshot taking affect) being atomic).

It seems to me that the only way to really guarantee consistency would be vfs-layer snapshot capability and to do syncing from that at that layer, or to be happy with backups only between vm shutdowns.

This is quite unfortunate, but I do not see any way around it other than crossing your fingers and hoping that journaling has reasonable outcome.

Contributor

jpouellet commented Mar 13, 2017

I cannot possibly imagine any way to implement this in a race-free way (with fs state flushed & return from RPC (& block-level snapshot taking affect) being atomic).

It seems to me that the only way to really guarantee consistency would be vfs-layer snapshot capability and to do syncing from that at that layer, or to be happy with backups only between vm shutdowns.

This is quite unfortunate, but I do not see any way around it other than crossing your fingers and hoping that journaling has reasonable outcome.

@jpouellet

This comment has been minimized.

Show comment
Hide comment
@jpouellet

jpouellet Mar 13, 2017

Contributor

There is also the question of application state (consider a database that has a file open and locked). From OS/kernel view, all pending things are synced. In reality (with respect to data user cares about) that is not the case.

Consistency is hard :(

Personally, I'm totally fine with backups requiring rebooting. For the uptime of typical Qubes use case (laptop/workstation) IMHO this is reasonable.

Contributor

jpouellet commented Mar 13, 2017

There is also the question of application state (consider a database that has a file open and locked). From OS/kernel view, all pending things are synced. In reality (with respect to data user cares about) that is not the case.

Consistency is hard :(

Personally, I'm totally fine with backups requiring rebooting. For the uptime of typical Qubes use case (laptop/workstation) IMHO this is reasonable.

@jpouellet

This comment has been minimized.

Show comment
Hide comment
@jpouellet

jpouellet Mar 13, 2017

Contributor

Don't let my ramblings be discouraging though. I'm just happy someone is continuing the effort to improve backups :)

Contributor

jpouellet commented Mar 13, 2017

Don't let my ramblings be discouraging though. I'm just happy someone is continuing the effort to improve backups :)

@v6ak

This comment has been minimized.

Show comment
Hide comment
@v6ak

v6ak Mar 13, 2017

v6ak commented Mar 13, 2017

@jpouellet

This comment has been minimized.

Show comment
Hide comment
@jpouellet

jpouellet Mar 13, 2017

Contributor

[...] but it does not mean that syncing is totally pointless

Fair enough

Contributor

jpouellet commented Mar 13, 2017

[...] but it does not mean that syncing is totally pointless

Fair enough

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment