-
Notifications
You must be signed in to change notification settings - Fork 59
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
"Snapshot" of writable layers #223
Comments
This reuse is risky, because it probably incurs inconsistency between disk content and that cached in kernel. I would advise against reconfigure (sightly change the content of) a block device without detaching it from kernel. Except in the case that you are 100% sure that the inconsistency will not happen. |
Would data still be inconsistent when first flushing the kernel writeback buffer by invoking |
Basically yes, as the kernel will not be aware that you have changed (reconfigured) the disk. |
Ok, I agree that inconsistencies will arise. I'm wondering whether
Now my question is: Do I need a stronger primitive to ensure this will work(like pausing the VM for a moment)? In Hocus we don't use containerd or the overlaybd containerd snapshotter, we use |
No, Dropping caches with |
reconfiguration seems easy to implement because libtcmu already supports it. But it must be used with caution due cache consistency problems. sync
echo 3 > /proc/sys/vm/drop_caches
blockdev --flushbufs $DISK
hdparm -F $DISK from https://stackoverflow.com/questions/9551838/how-to-purge-disk-i-o-caches-on-linux |
Anyway, |
I don't see why purging the read cache is required when the only thing which changes is the upper writable layer so the data on disk remains the same. I see that problems will arise if one changes the disk image entirely but if only the upper layer changes then the read caches are still ok. |
Because you "pulls changes from the remote repository". This may incur inconsistency even if you don't "changes the disk image entirely". |
What is the version of your Overlaybd
No response
What would you like to be added?
I would like for the
overlaybd-tcmu
binary to implement a TCMU reconfigure handler which:Sealing is quick, so the IO pause shouldn't be noticeable for users of the block device.
Why is this needed for Overlaybd?
OverlayBD will be the main storage back-end for https://github.com/hocus-dev/hocus (we're currently finishing the migration from raw sparse files to OverlayBD). We would have 2 use cases for reconfiguration:
Are you willing to submit PRs to contribute to this feature?
The text was updated successfully, but these errors were encountered: