[GH-ISSUE #40] Moving a directory containing more than 1000 files truncates the directory #23

Closed
opened 2026-03-04 01:41:16 +03:00 by kerem · 6 comments
Owner

Originally created by @kubrickfr on GitHub (Jun 18, 2014).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/40

Move to a s3fs mount point and

mkdir test test2
cd test
for i in {0..1234}; do echo Hello > $i; done
ls | wc -l

The directory contains 1235 files
now do

cd ..
mv test test2
ls test2/test/ | wc -l

You may see an error such as
mv: cannot move test' to test2/test': Input/output error
and the directory only contains only 1000 files.

A quick look at the code, maybe this is the problem?
github.com/s3fs-fuse/s3fs-fuse@29a37645dd/src/s3fs.cpp (L2244)

Originally created by @kubrickfr on GitHub (Jun 18, 2014). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/40 Move to a s3fs mount point and ``` mkdir test test2 cd test for i in {0..1234}; do echo Hello > $i; done ls | wc -l ``` The directory contains 1235 files now do ``` cd .. mv test test2 ls test2/test/ | wc -l ``` You may see an error such as `mv: cannot move `test' to `test2/test': Input/output error` and the directory only contains only 1000 files. A quick look at the code, maybe this is the problem? https://github.com/s3fs-fuse/s3fs-fuse/blob/29a37645ddb1f12d9e23d97c5633f0552b297954/src/s3fs.cpp#L2244
kerem 2026-03-04 01:41:16 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@kubrickfr commented on GitHub (Jun 18, 2014):

Also the problem is a lot worse with subdirectories as the mv operation actually loses content.

<!-- gh-comment-id:46421378 --> @kubrickfr commented on GitHub (Jun 18, 2014): Also the problem is a lot worse with subdirectories as the mv operation actually loses content.
Author
Owner

@thenickdude commented on GitHub (Jun 18, 2014):

Ouch. Does it permanently lose content, or does executing "mkdir test" make
the old files appear again?

On 18 June 2014 22:58, François Guerraz notifications@github.com wrote:

Also the problem is a lot worse with subdirectories as the mv operation
actually loses content.


Reply to this email directly or view it on GitHub
https://github.com/s3fs-fuse/s3fs-fuse/issues/40#issuecomment-46421378.

<!-- gh-comment-id:46421729 --> @thenickdude commented on GitHub (Jun 18, 2014): Ouch. Does it permanently lose content, or does executing "mkdir test" make the old files appear again? On 18 June 2014 22:58, François Guerraz notifications@github.com wrote: > Also the problem is a lot worse with subdirectories as the mv operation > actually loses content. > > — > Reply to this email directly or view it on GitHub > https://github.com/s3fs-fuse/s3fs-fuse/issues/40#issuecomment-46421378.
Author
Owner

@kubrickfr commented on GitHub (Jun 18, 2014):

no you're right, the content is actually still here, it's probably only deleted from the stat cache.

<!-- gh-comment-id:46421898 --> @kubrickfr commented on GitHub (Jun 18, 2014): no you're right, the content is actually still here, it's probably only deleted from the stat cache.
Author
Owner

@ggtakec commented on GitHub (Jun 22, 2014):

When I tried to reappear, sometimes I got a error(EIO) while making files.
s3fs returns EIO error when s3fs gets 400 status code from S3 server.
It seems that the error is because time of the request is the future(1s) from S3 server's time.
I continue to find the reason of this error.

Regards,

<!-- gh-comment-id:46783853 --> @ggtakec commented on GitHub (Jun 22, 2014): When I tried to reappear, sometimes I got a error(EIO) while making files. s3fs returns EIO error when s3fs gets 400 status code from S3 server. It seems that the error is because time of the request is the future(1s) from S3 server's time. I continue to find the reason of this error. Regards,
Author
Owner

@ggtakec commented on GitHub (Jun 23, 2014):

The EIO error is a bug, I posted new issue #41
And I could reappear this issue, I'm checking codes.
Please wait.

<!-- gh-comment-id:46860861 --> @ggtakec commented on GitHub (Jun 23, 2014): The EIO error is a bug, I posted new issue #41 And I could reappear this issue, I'm checking codes. Please wait.
Author
Owner

@ggtakec commented on GitHub (Jun 28, 2014):

Mereged #44
Fixed this issue(bug) by #44

<!-- gh-comment-id:47433828 --> @ggtakec commented on GitHub (Jun 28, 2014): Mereged #44 Fixed this issue(bug) by #44
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/s3fs-fuse#23
No description provided.