Using s3fs with Eucalyptus

Follow

Eucalyptus Versions:  3.4 and above.

Introduction

s3fs is a FUSE-based file system backed by Amazon S3 and compatible storage. It allows a user to mount a bucket as a local file system read/write and store files/folders natively and transparently.

Pre-requisites

DNS must be enabled on your cloud [1], this is required for DNS bucket names.  You also need to have a port redirect setup for the Walrus service, redirecting port 80 to port 8773.  You can use iptables to do this on the server hosting Walrus:

iptables -t nat -A PREROUTING -i <interface> -p tcp --dport 80 -j REDIRECT --to-port 8773

replace <interface> with the user-facing network interface.

Configuring s3fs

s3fs may be packaged for your distribution, so search common repositories before trying a source installation.  Otherwise you can download the source from here and compile it yourself, follow instructions in the wiki.

Once you have s3fs installed and built, create a file named .passwd-s3fs in your home directory. Open up this file and add your users access key and secret key, in the following format:

<ACCESSKEY>:<SECRETKEY>

Connecting to your Bucket

Now you're ready to connect to your bucket.  Run the following command:

s3fs -o --url=http://walrus.mycloud.mysubdomain.com -o nomultipart -o noxmlns mybucket /my/mountpoint

Replace the url with the DNS name of your Walrus, mybucket with the name of your bucket and the mountpoint as the path in which you want to mount the bucket.

Note the nomultipart option.  Walrus in Eucalyptus 3.x does not support multipart upload.

References

[1] https://www.eucalyptus.com/docs/eucalyptus/3.4/index.html#shared/setting_up_dns.html

Have more questions? Submit a request

Comments

Powered by Zendesk