-
Notifications
You must be signed in to change notification settings - Fork 218
[BUG] No "empty" chinks in empty file. #644
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
Comments
Changing Storage Class of empty file to So here lies potential for obvious optimisation improvement: to detect "empty" chunks and process them accordingly, instead of burdening chunkservers with unnecessary tasks. |
It's not a bug per se, it's just how the system behaves. If you create an empty file (use truncate?) directly on MooseFS, the chunks will not be created. If you copy an empty file, physical zeros will be copied (even copy from MooseFS to MooseFS). That's what happened in your example. That's what would have happened on v3 if you did it that way there (copied, not created). |
I tried the following, unsuccessfully:
I do not know of other methods to sparsify existing files... |
You can't sparsify (aka delete chunks) an existing file on MooseFS. If a file is created directly on MooseFS as empty, it will not have chunks. If it's copied over from another file (even on MooseFS) it will have chunks. That's what I was saying in my previous post. Example:
|
I have a (old) large mostly empty file created on MooseFS v3.
mfsfileinfo
shows that it have "empty" chunks like this:On current MooseFS 4.56.6, I'm trying to reproduce that by making a large empty file:
Ops, I wish that worked but no worries, I've made that empty file on local file system then moved it to MFS.
(File is in storage class
2
.)Now:
But all those chunks should be "empty", without any chunk files.
(For what it's worth, all my chunkservers are configured with
HDD_SPARSIFY_ON_WRITE = 1
but that shouldn't matter.)The text was updated successfully, but these errors were encountered: