S3FS is a FUSE-based filesystem backed by Amazon S3. CSM uses it to provide temporary overflow storage, as well as to support SDU and NMD services to provide space for dumps.
S3FS maintains a local cache, which can fill up if left unchecked, so CSM periodically clears the cache. The S3FS cache parent directory is /var/lib/s3fs_cache
, with a subdirectory
corresponding to a given S3FS mount point. On master nodes, this will contain an sds/
subdirectory. Otherwise, on all other nodes, it will contain a boot-images/
subdirectory.
Periodically, one of two cron jobs runs to clear out cache files. sds/
is cleared at 00:05 daily when it surpasses 100 GiB, and boot-images/
is cleared at 00:00 daily when it surpasses 150 GiB.
Note: Other arbitrary files and directories directly under /var/lib/s3fs_cache
will not be pruned, and will continue to occupy disk space until they are deleted manually. Do not store large files in this directory expecting them to be pruned.
Gather creds from radosgw
NOTES:
radosgw-admin user info --uid <radosgw-user>|jq -r '.keys[]|.access_key +":"+ .secret_key' >>${HOME}/.<filename>.s3fs
chmod 600 ~/.<filename>.s3fs
mkdir <mount path>
Mounting the volume
Mount without cache
# s3fs <radosgw-user> <mount path> -o passwd_file=${HOME}/.<filename>.s3fs,url=http://rgw-vip.nmn,use_path_request_style
Mount w/ cache
IMPORTANT: To use this option there must be a dedicated landing space that is a partition. This ensures that the usage does not impact the root drive.
s3fs <radosgw-user> <mount path> -o passwd_file=${HOME}/.<filename>.s3fs,url=http://rgw-vip.nmn,use_path_request_style,use_cache=<dedicated_cache_partition_location>,check_cache_dir_exist=true
Unmounting the volume
umount <mount path>