The simplest way to work with file you have in Cynny Space is to load them by a fuse driver for S3 protocol.
By this approach you'll be able to mount a bucket (let assume bkt
) in a specific folder (let assume /mnt/space
).
You can easily install s3fs
by standard system tools as apt-get
or yum
.
In Ubuntu/Debian:
apt-get install s3fs
In Fedora/Centos/RedHat:
yum install s3fs
Once you completed the installation step, you just have to add credentials in:
~/.passwd-s3fs
that will contain:
<your_access_key>:<your_secret_key>
NOTE: you can find the above information in your dashboard https://admin.cynnyspace.com/#/s3
click on the
hidden
button in order to visualize them. Also note the parameterhttp://cs2.cynnyspace.com/
that will be used in the next command line.
Once you've done this you'll be able to mount your bucket by the following:
./s3fs bkt /mnt/space/ \
-o url=http://cs2.cynnyspace.com/ \
-o use_path_request_style -o allow_other \
-o noatime \
-o auto_unmount \
-o sigv2 \
-o default_permissions \
-o ensure_diskfree=10000 \
-o multipart_size=10 \
-o parallel_count=10 \
-o multireq_max=10 \
-o enable_noobj_cache \
-o use_cache=/mnt/tmp/cache/
NOTE: ensure_diskfree=10000 grants that cache folder (i.e. /mnt/tmp/cache) will increase in size but it will be always ensured at least 10GB of disk free.
Permanently mounted Bucket
Once you tested that everything works, you can permanently mount your bucket by insert the following in /etc/fstab
:
s3fs#bkt /mnt/space fuse auto,_netdev,x-systemd.mount-timeout=30s,url=https://cs2.cynnyspace.com/,use_path_request_style,allow_other,noatime,sigv2,default_permissions,ensure_diskfree=10000,multipart_size=10,parallel_count=10,multireq_max=10,enable_noobj_cache,use_cache=/mnt/tmp/cache 0 0
NOTE: that in that case the file .passwd-s3fs
has to be placed in the home of root
user.