S3FS Cache on WEkEO Elasticity

By default, S3FS Cache is enabled in preconfigured Linux images on WEkEO Elasticity. To examine its directory location you can take a look at the configuration in /etc/fstab.

#s3fs#DIAS /eodata fuse passwd_file=/root/.passwd-s3fs,_netdev,allow_other,use_path_request_style,uid=0,umask=0222,mp_umask=0222,mp_umask=0222,gid=0,stat_cache_expire=20,url=http://data.cloudferro.com,use_cache=1,max_stat_cache_size=60000,list_object_max_keys=10000 0 0

Use_cache parameter points on the folder “1” (it is located at the beginning of Filesystem Hierarchy /).

Following is an excerpt from the documentation:

-o use_cache (default="" which means disabled)
local folder to use for local file cache.

Directory “1” is the destination for products from the EOData repositories during processing or downloading.

If you encounter problems with displaying the folders and/or files inside “/eodata” (e.g. “no such file or directory”) please empty the “/1” folder.

To avoid situations when you cannot remount your resources because the cache directory is occupying a lot of space on the disk, you might want to set a value for the parameter ‘ensure_diskfree’.

A common prompt message when you cannot remount the /eodata repository is this:

clnt_create: RPC: Timed out
s3fs: There is no enough disk space for used as cache(or temporary) directory by s3fs.

In the s3 documentation you can also find more information about the ‘ensure_diskfree’ parameter.

-o ensure_diskfree(default 0)

It sets the parameter to ensure free disk space. This option determines the threshold of free space size on the disk which is used for the cache file by s3fs. s3fs creates files for downloading, uploading and caching files. If the disks free space is smaller than this value, s3fs will not use diskspace if possible in exchange for lower performance.