Set Up ObjectiveFS With Amazon S3

This document covers the steps to set up your ObjectiveFS filesystem with Amazon S3 using IAM role. If you are using S3 keys, use this guide instead.

What You Need

  1. IAM role with S3 permission is attached to your EC2 instances.
  2. ObjectiveFS license key from the Filesystem section on your profile page

Steps

  1. Download and install ObjectiveFS

  2. Configure Objectivefs
    The config parameters will be stored in /etc/objectivefs.env/

    $ sudo mount.objectivefs config -i
    Enter ObjectiveFS license: <your ObjectiveFS license>
    Enter Metadata Host [169.254.169.254]: <press enter>
    Enter Default Region (optional): <your S3 region, e.g. eu-west-1>
    
    Note: This will use the default AWS metadata host at 169.254.169.254

  3. Create your filesystem (one-time only)

    • Use a globally unique name for your filesystem name. ObjectiveFS will create a new S3 bucket with this name.
    • Choose a strong passphrase, write it down and store it somewhere safe.
      IMPORTANT: Without the passphrase, there is no way to recover any files.

    $ sudo mount.objectivefs create <your filesystem name>
    Passphrase (for s3://<filesystem>): <your passphrase>
    Verify passphrase (for s3://<filesystem>): <your passphrase>
    
    Note: Your filesystem will be created in the default region if specified in step 2 or in us-west-2 otherwise.
    If you need to use an existing empty S3 bucket, see this doc.

  4. Mount your filesystem
    Mount your filesystem on an existing empty directory, e.g. /ofs. The ObjectiveFS process will run in the background.

    $ sudo mkdir /ofs
    $ sudo mount.objectivefs <your filesystem name> /ofs
    Passphrase (for s3://<filesystem>): <your passphrase>
    

  5. [Optional] Multi-server setup
    Mount this filesystem on as many servers as you wish by running steps 1, 2 and 4 on each server. Each server can read and write to the same filesystem at the same time.

Tips

  1. Store your filesystem passphrase in /etc/objectivefs.env/OBJECTIVEFS_PASSPHRASE to mount the filesystem without manually entering the passphrase each time.
  2. To mount the filesystem via /etc/fstab, see the mount on boot guide.

Reference

If you have questions, please email us at support@objectivefs.com.

Last updated by ObjectiveFS staff, July 11, 2020


ObjectiveFS is a shared filesystem for Linux and macOS that automatically scales up and out with high performance. In production use by Fortune 500 companies since 2013.