Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set Cache Limit or Expiration for S3FS

Tags:

amazon-s3

s3fs

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?

like image 885
Jafo Avatar asked Jan 20 '15 05:01

Jafo


2 Answers

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.

like image 58
davemyron Avatar answered Sep 29 '22 14:09

davemyron


At this time there is an option ensure_diskfree to preserve some space.

like image 34
dr-evil Avatar answered Sep 29 '22 13:09

dr-evil