[GH-ISSUE #337] Files appear empty after reboot, issue between del_cache and stat cache #175

Closed
opened 2026-03-04 01:42:54 +03:00 by kerem · 1 comment
Owner

Originally created by @diasjorge on GitHub (Jan 20, 2016).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/337

We were having issues with s3fs after rebooting the servers. The files would appear mounted but when checked with cat for instance they'd appear empty.

To start s3 we use:

/usr/bin/s3fs -o use_cache=/var/cache/s3fs -o del_cache -o ensure_diskfree=1024 -o allow_other -o nonempty -o iam_role=ROLE BUCKET FOLDER

After some debugging we noticed that If we kill s3fs and start it again then the problem always happens, which explains the issue happening on reboot.

Then if we delete the folder /var/cache/s3fs/.FOLDER.stat and start s3fs again the problem is gone.

It appears to me that when del_cache is used and s3fs is restarted then it presents the metainformation about the files stored in .stat but they files are not present in the cache and so they are empty since they're not fetched again.

It'd seem to me that when using del_cache the stat cache should be deleted as well.

Originally created by @diasjorge on GitHub (Jan 20, 2016). Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/337 We were having issues with s3fs after rebooting the servers. The files would appear mounted but when checked with cat for instance they'd appear empty. To start s3 we use: /usr/bin/s3fs -o use_cache=/var/cache/s3fs -o del_cache -o ensure_diskfree=1024 -o allow_other -o nonempty -o iam_role=ROLE BUCKET FOLDER After some debugging we noticed that If we kill s3fs and start it again then the problem always happens, which explains the issue happening on reboot. Then if we delete the folder /var/cache/s3fs/.FOLDER.stat and start s3fs again the problem is gone. It appears to me that when del_cache is used and s3fs is restarted then it presents the metainformation about the files stored in .stat but they files are not present in the cache and so they are empty since they're not fetched again. It'd seem to me that when using del_cache the stat cache should be deleted as well.
kerem closed this issue 2026-03-04 01:42:54 +03:00
Author
Owner

@ggtakec commented on GitHub (Feb 6, 2016):

@diasjorge
I fixed this problem by #352.
#352 added removing stat cache directory at starting/exiting s3fs if del_cache option is specified.
Please try to use and check it.
I close this issue, but if you find a problem please reopen this issue.
Thanks in advance for your help.

<!-- gh-comment-id:180839667 --> @ggtakec commented on GitHub (Feb 6, 2016): @diasjorge I fixed this problem by #352. #352 added removing stat cache directory at starting/exiting s3fs if del_cache option is specified. Please try to use and check it. I close this issue, but if you find a problem please reopen this issue. Thanks in advance for your help.
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#175
No description provided.