{"action":"opened","issue":{"url":"https://api.github.com/repos/s3fs-fuse/s3fs-fuse/issues/337","labels_url":"https://api.github.com/repos/s3fs-fuse/s3fs-fuse/issues/337/labels{/name}","comments_url":"https://api.github.com/repos/s3fs-fuse/s3fs-fuse/issues/337/comments","events_url":"https://api.github.com/repos/s3fs-fuse/s3fs-fuse/issues/337/events","html_url":"https://github.com/s3fs-fuse/s3fs-fuse/issues/337","id":127696690,"number":337,"title":"Files appear empty after reboot, issue between del_cache and stat cache","user":{"login":"diasjorge","id":2731,"avatar_url":"https://avatars.githubusercontent.com/u/2731?v=3","gravatar_id":"","url":"https://api.github.com/users/diasjorge","html_url":"https://github.com/diasjorge","followers_url":"https://api.github.com/users/diasjorge/followers","following_url":"https://api.github.com/users/diasjorge/following{/other_user}","gists_url":"https://api.github.com/users/diasjorge/gists{/gist_id}","starred_url":"https://api.github.com/users/diasjorge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diasjorge/subscriptions","organizations_url":"https://api.github.com/users/diasjorge/orgs","repos_url":"https://api.github.com/users/diasjorge/repos","events_url":"https://api.github.com/users/diasjorge/events{/privacy}","received_events_url":"https://api.github.com/users/diasjorge/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-20T14:41:29Z","updated_at":"2016-01-20T14:41:29Z","closed_at":null,"body":"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.\r\n\r\nTo start s3 we use:\r\n\r\n /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\r\n\r\nAfter 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.\r\n\r\nThen if we delete the folder /var/cache/s3fs/.FOLDER.stat and start s3fs again the problem is gone.\r\n\r\nIt 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.\r\n\r\nIt'd seem to me that when using del_cache the stat cache should be deleted as well. \r\n"}}