This document describes how multiple ObjectiveFS filesystems can be mounted on the same server using different config directories.
The ObjectiveFS config directory (default:
/etc/objectivefs.env/) stores the environment variables used to mount a filesystem, such as the object store keys (
AWS_SECRET_ACCESS_KEY), your ObjectiveFS license (
OBJECTIVEFS_LICENSE), filesystem passphrase (
OBJECTIVEFS_PASSPHRASE), memory cache size (
CACHESIZE), etc. For the complete list of environment variables, see the user guide.
When mounting multiple filesystems, you can have separate config directories, one for each mount. The
env=<dir> mount option can be used to select the config directory for each mount. This way, each mount can have their own separate keys, passphrase, cache sizes, etc.
Here is an example of how to mount three different filesystems on the same server.
Set up three ObjectiveFS config directories (e.g.
Each config directory contains the following files for the corresponding mount. The filename represents the environment variable and the file content represents the value.
/etc/fstab entries to mount three filesystems, each with a different config directory.
Note: To add other mount options, you can add them after the config directory separated by comma. Here is an entry using an additional mount option (
s3://bucket1 /ofs1 objectivefs auto,_netdev,env=/etc/ofs1.env 0 0 s3://bucket2 /ofs2 objectivefs auto,_netdev,env=/etc/ofs2.env 0 0 s3://bucket3 /ofs3 objectivefs auto,_netdev,env=/etc/ofs3.env 0 0
s3://bucket1 /ofs1 objectivefs auto,_netdev,env=/etc/ofs1.env,mt 0 0
Example commands if you prefer to mount the filesystems from the command line.
$ sudo mount.objectivefs -oenv=/etc/ofs1.env s3://bucket1 /ofs1 $ sudo mount.objectivefs -oenv=/etc/ofs2.env s3://bucket2 /ofs2 $ sudo mount.objectivefs -oenv=/etc/ofs3.env s3://bucket3 /ofs3
A few items to note when running multiple mounts on the same server.
The memory cache (
CACHESIZE, default: 20% per mount) is cumulative.
You may want to reduce this value depending on the number of mounts and amount of memory available on the server. For example, four mounts (at the default 20% value) would use 80% of memory.
The disk cache can be shared by all mounts on the same server if using the same
We recommend having all mounts share the same disk cache (i.e. same
DISKCACHE_PATH). This allows ObjectiveFS to manage the space efficiently. The data from different filesystems are encrypted and will not be shared across filesystems.
The disk cache size is shared when using the same
If multiple filesystems are mounted using different
DISKCACHE_SIZE values and point to the same
DISKCACHE_PATH, ObjectiveFS will use the minimum disk cache size and the maximum free space value.
We suggest setting the
DISKCACHE_PATH on all config directories to the same value and path.
Last updated by ObjectiveFS staff, August 1, 2019
ObjectiveFS is a shared file system for OS X and Linux that automatically scales and gives you scalable cloud storage. If you have questions or article idea suggestions, please email us at firstname.lastname@example.org