*** This project is not maintained anymore ***
The Swift Virtual File System
SVFS is a Virtual File System over Openstack Swift built upon fuse. It is compatible with hubiC, OVH Public Cloud Storage and basically every endpoint using a standard Openstack Swift setup. It brings a layer of abstraction over object storage, making it as accessible and convenient as a filesystem, without being intrusive on the way your data is stored.
This is not an official project of the Openstack community.
Download and install the latest release packaged for your distribution.
On Linux (requires fuse and ruby) :
mount -t svfs -o <options> <device> /mountpoint
On OSX (requires osxfuse and ruby) :
mount_svfs <device> /mountpoint -o <options>
- You can pick any name you want for the
- All available mount options are described later in this document.
Credentials can be specified in mount options, however this may be desirable to read them from an external source. The following sections desribe alternative approaches.
Reading credentials from the environment
SVFS supports reading the following set of environment variables :
- If you are using HubiC :
- If you are using a vanilla Swift endpoint (like OVH PCS), after sourcing your OpenRC file :
OS_AUTH_URL OS_USERNAME OS_PASSWORD OS_REGION_NAME OS_TENANT_NAME
- If you already authenticated to an identity endpoint :
Reading credentials from a configuration file
All environment variables can also be set in a YAML configuration file placed at
For instance :
hubic_auth: XXXXXXXXXX.. hubic_token: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...
Usage with OVH products
auth_url: keystone URL (default is https://auth.cloud.ovh.net/v2.0).
username: your keystone user name.
password: your keystone password.
tenant: your project name.
region: the region where your tenant is.
version: authentication version (
0means auto-discovery which is the default).
storage_url: the storage endpoint holding your data.
internal_endpoint: the storage endpoint type (default is
token: a valid token.
token are guessed during authentication if
hubic_auth: hubic authorization token as returned by the
hubic_times: use file times set by hubic synchronization clients. Option
attrshould also be set for this to work.
hubic_token: hubic refresh token as returned by the
container: which container should be selected while mounting the filesystem. If not set, all containers within the tenant will be available under the chosen mountpoint.
storage_policy: expected containers storage policy. This is used to ignore containers not matching a particular storage policy name. If empty, this setting is ignored (default).
segment_size: large object segments size in MB. When an object has a content larger than this setting, it will be uploaded in multiple parts of the specified size. Default is 256 MB. Segment size should not exceed 5 GB.
connect_timeout: connection timeout to the swift storage endpoint. Default is 15 seconds.
request_timeout: timeout of requests sent to the swift storage endpoint. Default is 5 minutes.
block_size: Filesystem block size in bytes. This is only used to report correct
readahead_size: Readahead size in KB. Default is 128 KB.
readdir: Overall concurrency factor when listing segmented objects in directories (default is 20).
attr: Handle base attributes.
xattr: Handle extended attributes.
transfer_mode: Enforce network transfer optimizations. The following flags / features can be combined :
1: disable explicit empty file creation.
2: disable explicit directory creation.
4: disable directory content check on removal.
8: disable file check in read only opening.
cache_access: cache entry access count before refresh. Default is -1 (unlimited access).
cache_entries: maximum entry count in cache. Default is -1 (unlimited).
cache_ttl: cache entry timeout before refresh. Default is 1 minute.
Access restriction options
allow_root: Restrict access to root and the user mounting the filesystem.
default_perm: Restrict access based on file mode (useful with
uid: default files uid (defaults to current user uid).
gid: default files gid (defaults to current user gid).
mode: default files permissions (default is 0700).
ro: enable read-only access.
debug: enable debug log.
stdout: stdout redirection expression (e.g.
stderr: stderr redirection expression (e.g.
profile_addr: Golang profiling information will be served at this address (
ip:port) if set.
profile_cpu: Golang CPU profiling information will be stored to this file if set.
profile_ram: Golang RAM profiling information will be stored to this file if set.
go_gc: set garbage collection target percentage. A garbage collection is triggered when the heap size exceeds, by this rate, the remaining heap size after the previous collection. A lower value triggers frequent GC, which means memory usage will be lower at the cost of higher CPU usage. Setting a higher value will let the heap size grow by this percent without collection, reducing GC frequency. A Garbage collection is forced if none happened for 2 minutes. Note that unused heap memory is not reclaimed after collection, it is returned to the operating system only if it appears unused for 5 minutes.
Be aware that SVFS doesn't transform object storage to block storage.
SVFS doesn't support :
- Opening files in other modes than
- Moving directories.
- Renaming containers.
- SLO (but supports DLO).
- Per-file uid/gid/permissions (but per-mountpoint).
- Symlink targets across containers (but within the same container).
Take a look at the docs for further discussions about SVFS approach.
Got errors using
rsync with svfs ? Can't change creation time ? Why svfs after all ?
Take a look at the FAQ.
Make sure to use the latest version of go and follow contribution guidelines of SVFS.
This work is under the BSD license, see the LICENSE file for details.