mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 05:16:00 +03:00
[GH-ISSUE #11] 0 byte files #5
Labels
No labels
bug
bug
dataloss
duplicate
enhancement
feature request
help wanted
invalid
need info
performance
pull-request
question
question
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/s3fs-fuse#5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jonbev on GitHub (Jan 27, 2014).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/11
We have a problem where we are getting 0 byte files written back to s3. I can seem to find a way to replicate as it seems to be quite random. We cant tell if it is a s3fs issue or something on our side.
I was wondering if there is a way of disallowing 0 byte files from being written?
Thanks.
@ggtakec commented on GitHub (Jan 27, 2014):
The 0 byte file is made by something error occurred dialing uploading and changing file attributes etc.
(These action are sent from fuse to s3fs.)
I think it is difficult to remove 0 byte file by s3fs after something error is occurred.
But maybe we think that it is best way.
If you can, please run s3fs with -d option, it makes s3fs write messages(/var/log/) for debug.
Probably this messages helps us to know why this error occurred.
Thanks in advance for your help.
@geekpete commented on GitHub (Sep 5, 2014):
I see the same behaviour, but it seems to be creating these zero byte files at the start of a transfer and once the transfer is completed, the file size becomes correct.
This is really annoying, as the usual behaviour for an s3 upload tool is to only reveal the file once the full multipart upload is entirely completed.
Is there any way to disable this "poor man's locking" mechanism and make it so that the empty file is not written at the start of the transfer?
@geekpete commented on GitHub (Sep 9, 2014):
Is the creation of the zero byte file absolutely necessary for the operation of s3fs-fuse or can the zero byte file creation be skipped/optional?
Is there any way to just start the multipart upload and close it off when it completes, only then revealing the file to s3 clients?
From https://github.com/s3fs-fuse/s3fs-fuse/blob/master/src/curl.cpp:
@ggtakec commented on GitHub (Sep 9, 2014):
On FUSE, s3fs works following:
create 0 byte file
and returns file descriptor to FUSE.
returns file status to FUSE.
write a part of data to file.
repeat this calling.
flush file discriptor
close file descriptor
At (1), s3fs makes temporary file, and open it, returns this local file descriptor to FUSE.
Then at this time, s3fs uploads 0 byte file to S3.(*)
At (3), s3fs writes data to local file descriptor which is returned at (1) to FUSE.
At (4), s3fs uploads(multipart upload) local file data to S3.
All these operation are given an order to start by FUSE, then s3fs do working.
I think it is not a wrong thing that s3fs makes a file of 0 bytes, because a file was made in the same way as other file system.
In the case of normal file system, it does not take time to file closing from file creating.
However, in s3fs, it takes time. So I think that this becomes the problem.
Maybe I can change a cord for not uploading 0 byte file on S3.
However, It probabry become the problem when other systems which mounts same bucket accesses that object.
So that, I think that this change should not do.
And I should know detail of your problem, please let me know detail, it helps us for solving this issue.
Thanks in advance for your help.
@geekpete commented on GitHub (Sep 10, 2014):
If this is a limitation (feature?) of fuse filesystems then I'll close this ticket.
My use case is a bit odd, I need an SFTP to S3 service, but for reasons I cannot go into, I am stuck building the solution this way.
So I have proftpd dropping files right onto an s3fs-fuse mount to get files up to S3.
I then have another process doing things to new files that appear in the s3 bucket from the other end.
My problem is that if I have a temporary file appear while the transfer is still in progress, then the process at the other end will start trying to process it while it is still zero bytes and fail. Also trying to avoid altering code of this process as it is legacy.
BUT!
With proftpd, I am now using HiddenStores and DeleteAbortedStore to drop the zero byte file as a temporary filename, once the sftp upload completes successfully the file is renamed.
If the upload fails, the temp file is deleted.
This is working well for me currently.
@ggtakec commented on GitHub (Sep 15, 2014):
Hi, geekpete
Making 0 byte file that is limitation on fuse.(I think this is normally when local disk.)
About 0 byte file uploaded and completely file after that, so these object have original ETag, does proftpd can know it(ETag)?
If it can, ETag header is used for checking objects.
Thanks.
@ggtakec commented on GitHub (Jan 17, 2016):
I'm sorry about this Issue had been left at a long period of time.
s3fs makes 0 byte file before uploading new file(object), normally the object size is changed after uploading the object.
But that the file size is still 0 bytes means that it has failed to upload.
Latest codes are fixed about multipart uploading etc, please test latest codes.
Anf if you have a problem yet, please post new issue about latest codes.
I'm closing this issue now, thanks in advance for your help.
@KrzysztofMadejski commented on GitHub (Dec 28, 2016):
Just noting as I have problem related to that: My provider of S3 don't like 0-byte files (soft refuses to upload it) and that stops me from being able to write to S3. I'll come back if I find any solution.
@alperen66 commented on GitHub (Feb 18, 2021):
Hi Im really new to github just made a account to write here
Recently fuse is not working ı cant export anything it says 0kb everytime
ı also try to reinstall but never worked, even try to download it from other websites.
and today ı found the adobe fuse cc version and tried to export again but it didnt worked again
please ı really need to use this software if you know the solve of this problem what can ı do ?
thanks