I have this option "-o use_cache=/tmp" set when I mount my S3 bucket. Is there a limit on how much room it will try to use in tmp? Is there a way to limit that or otherwise expire items after X amount of time?
You could use the (unsupported) sample_delcache.sh
script from the s3fs-fuse project. Set up a cron job to run it every so often. There'd still be the risk of running out space (or inodes, as I just did) before the next time you ran the cleanup script, but you should be able to dial it in.
At this time there is an option ensure_diskfree to preserve some space.
The local cache's growth is apparently unbounded but it is truly a "cache" (as opposed to what might be called a "working directory") in the sense that it can be safely purged at any time, such as with a cron job that removes files after a certain age, combining find
and xargs
and rm
.
(xargs
isn't strictly necessary, but it avoids issues that can occur when too many files are found to remove in one invocation.)
© 2022 - 2024 — McMap. All rights reserved.