We use the CloudVPS objectstore to store data in a redundant and cheap way. Cloudfuse enables us to mount an objectstore container as a disk in Linux, this way we can store, for example, images from a large image site on the objectstore and mount the objectstore container as the images folder in the public_html folder.
CloudVPS has a nice tutorial on how to do this:
However, for customers that mount the objectstore on a CloudVPS virtual server, following this tutorial will result in Cloudfuse exchanging files with the objectstore through the external URL (https://<projectid>.objectstore.eu), which means you will have to pay for all the traffic of which you thought to stay on the internal CloudVPS network, but is actually externally routed. This is caused by the objectstore authentication mechanism that tells Cloudfuse to use https://<projectid>.objectstore.eu as the URL to connect to, and this authentication mechanism is controlled by CloudVPS and cannot be changed by you.
Therefore we created a patch for Cloudfuse which enabled you to override this URL with the internal URL, so traffic from your CloudVPS will flow via the internal URL, which is free traffic. To apply this patch use the following installation method for Cloudfuse:
Download the cloudfuse files:
git clone https://github.com/redbo/cloudfuse.git
Go in to the cloudfuse directory, patch Cloudfuse and build the Cloudfuse binary:
yum install gcc make fuse-devel curl-devel libxml2-devel openssl-devel git
patch < cloudfuse_patchv2.txt
Add the following 2 extra lines to your authentication file (/root/.cloudfuse), below the previous added lines, see CloudVPS tutorial.
cloudvps_internal can be set to True or False.
True means the value of “cloudvps_os_url” will be used to connect to the objectstore.
False means the value of the authentication mechanism will be used (= external URL).
cloudvps_os_url is the internal URL to connect to the objectstore.
Now run the following command and see the output:
The bottom of the output will show something like:
!!! storage_url: https://<projectid>.internal.objectstore.eu
!!! url config: https://<projectid>.internal.objectstore.eu
!!! storage_token: <token>
fuse: missing mountpoint parameter
The storage_url is the url used to connect to the objectstore. If this contains the bold part then your setup should work with the internal URL. Test it out on a test server!
Update 25-05-2017: a new patch is added to this post compatible with the new version of Cloudfuse.
The old patch can be found here (but does not work with the current version of Cloudfuse): http://www.sysblog.nl/wp-content/uploads/2016/02/patch.txt
*warning* We are not responsible for any kind of damage or incompatibilities you experience when using this article, test this on a test server first before using it in production. Always check the code of the patch file yourselves before implementing it. */warning*.