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
Introduce the rawblock snapshotter #3130
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3130 +/- ##
==========================================
+ Coverage 43.58% 43.63% +0.05%
==========================================
Files 104 107 +3
Lines 11156 11527 +371
==========================================
+ Hits 4862 5030 +168
- Misses 5555 5714 +159
- Partials 739 783 +44
Continue to review full report at Codecov.
|
f315333
to
982b426
Compare
@bergwolf Hi, do you mean? Although fstrim the mountpoint which will make discard request to thin device and free disk space can be returned back to the thin device, the fs still cannot use those space? |
hmm, if used by kata runtime, each thin device will be passed through to the guest, why is there "host filesystem"? |
It isn't kata specific. I was referring to the dm-thin pool data and metadata files. They are usually files on the host file system.
dm-thin needs to translate the trim command into |
Hi,
Aha, I probably got the point. The DM devices you talk about here use files as underlaying storage, not raw disk. Thanks. |
406836c
to
7794595
Compare
Is there a separate repository this driver currently exists in and shown as useable through the proxy driver interface? |
@dmcgowan No, there isn't yet. Due to its simplicity, I want to propose to make it builtin. The actual implementation is quite simple. Almost half of the patch is to enable the |
@dmcgowan For testing, one can simply use the |
Build succeeded.
|
Build succeeded.
|
If a mount has specified `loop` option, we need to handle it on our own instead of passing it to the kernel. In such case, create a loopback device, attach the mount source to it, and mount the loopback device rather than the mount source. Signed-off-by: Peng Tao <bergwolf@hyper.sh>
Build succeeded.
|
Build succeeded.
|
CI failure seems unrelated?
|
It creates local file based block device and formats configured file system on it. If local file system supports reflink (e.g., btrfs, ocfs2, xfs, NFSv4.2), snapshots creation can be very fast and underlying data blocks are shared by the local file system. Signed-off-by: Peng Tao <bergwolf@hyper.sh>
Build succeeded.
|
Another network issue?
|
re-running it and hope it can get green. |
Maybe we can accept this as a non-core project and as a gRPC plugin first. |
@AkihiroSuda In that case, we still need the first commit 37c9ddb to add loopback support to containerd's mount package. What do others think? I can split the PR if that is the decision. |
SGTM |
Please see #4178 for add loopback support to the mount package. |
Loopback mounts PR is in, please open a proposal for a non-core project in order to get started with grpc version of the plugin. |
Hello,
The PR introduces a new snapshotter for containerd named
rawblock
, based on the original work from @laijs in hyperhq/hyperd. It is a file based block storage snapshotter. Each snapshot is a file on the host file system and can be mounted via loopback device to provide a file system view. Child snapshots are created via local file system's reflink capability (when available). The reflink capability is implemented in several Linux kernel file systems such as btrfs, xfs and NFSv4.2. With it, therawblock
snapshotter can be pretty space efficient and convenient to use.A few interesting questions people might ask:
To compare them is to compare dm-thin vs. file system snapshots. Here are what I can find/think of so far:
FALLOC_FL_PUNCH_HOLE
so I'm not sure if it is still the case./cc @laijs @lifupan